diff options
author | Dave Lawrence <dlawrence@mozilla.com> | 2012-12-04 22:13:12 +0100 |
---|---|---|
committer | Dave Lawrence <dlawrence@mozilla.com> | 2012-12-04 22:13:12 +0100 |
commit | 1ee605864f227d40cc83e798dc117ad8e01acb64 (patch) | |
tree | 42cc3ff5007202fad4932941b477ac96d5ea0643 /js/yui3/editor-br | |
parent | b061ce481380dfd01f85ea84ef700eb7589433e3 (diff) | |
download | bugzilla-1ee605864f227d40cc83e798dc117ad8e01acb64.tar.gz bugzilla-1ee605864f227d40cc83e798dc117ad8e01acb64.tar.xz |
Bug 818091 - Install a full copy of YUI3 into the js directory for use with new extensions/projects
Diffstat (limited to 'js/yui3/editor-br')
-rw-r--r-- | js/yui3/editor-br/editor-br-min.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/js/yui3/editor-br/editor-br-min.js b/js/yui3/editor-br/editor-br-min.js new file mode 100644 index 000000000..ab4d5a8a3 --- /dev/null +++ b/js/yui3/editor-br/editor-br-min.js @@ -0,0 +1,7 @@ +/* +YUI 3.7.3 (build 5687) +Copyright 2012 Yahoo! Inc. All rights reserved. +Licensed under the BSD License. +http://yuilibrary.com/license/ +*/ +YUI.add("editor-br",function(e,t){var n=function(){n.superclass.constructor.apply(this,arguments)},r="host",i="li";e.extend(n,e.Base,{_onKeyDown:function(t){if(t.stopped){t.halt();return}if(t.keyCode===13){var n=this.get(r),s=n.getInstance(),o=new s.EditorSelection;o&&(e.UA.ie&&(!o.anchorNode||!o.anchorNode.test(i)&&!o.anchorNode.ancestor(i))&&(n.execCommand("inserthtml",s.EditorSelection.CURSOR),t.halt()),e.UA.webkit&&!o.anchorNode.test(i)&&!o.anchorNode.ancestor(i)&&(n.frame._execCommand("insertlinebreak",null),t.halt()))}},_afterEditorReady:function(){var t=this.get(r).getInstance();try{t.config.doc.execCommand("insertbronreturn",null,!0)}catch(n){}(e.UA.ie||e.UA.webkit)&&t.on("keydown",e.bind(this._onKeyDown,this),t.config.doc)},_onNodeChange:function(e){switch(e.changedType){case"backspace-up":case"backspace-down":case"delete-up":var t=this.get(r).getInstance(),n=e.changedNode,i=t.config.doc.createTextNode(" ");n.appendChild(i),n.removeChild(i)}},initializer:function(){var t=this.get(r);if(t.editorPara){e.error("Can not plug EditorBR and EditorPara at the same time.");return}t.after("ready",e.bind(this._afterEditorReady,this)),e.UA.gecko&&t.on("nodeChange",e.bind(this._onNodeChange,this))}},{NAME:"editorBR",NS:"editorBR",ATTRS:{host:{value:!1}}}),e.namespace("Plugin"),e.Plugin.EditorBR=n},"3.7.3",{requires:["editor-base"]}); |