//>>built
define("dojox/editor/plugins/CollapsibleToolbar","dojo dijit dojox dijit/_Widget dijit/_TemplatedMixin dijit/_editor/_Plugin dijit/form/Button dijit/focus dojo/_base/connect dojo/_base/declare dojo/i18n dojo/i18n!dojox/editor/plugins/nls/CollapsibleToolbar".split(" "),function(a,e,q,m,n,p){var f=a.declare("dojox.editor.plugins._CollapsibleToolbarButton",[m,n],{templateString:"\x3cdiv tabindex\x3d'0' role\x3d'button' title\x3d'${title}' class\x3d'${buttonClass}' dojoAttachEvent\x3d'ondijitclick: onClick'\x3e\x3cspan class\x3d'${textClass}'\x3e${text}\x3c/span\x3e\x3c/div\x3e",
title:"",buttonClass:"",text:"",textClass:"",onClick:function(b){}}),k=a.declare("dojox.editor.plugins.CollapsibleToolbar",p,{_myWidgets:null,setEditor:function(b){this.editor=b;this._constructContainer()},_constructContainer:function(){var b=a.i18n.getLocalization("dojox.editor.plugins","CollapsibleToolbar");this._myWidgets=[];var l=a.create("table",{style:{width:"100%"},tabindex:-1,"class":"dojoxCollapsibleToolbarContainer"}),d=a.create("tbody",{tabindex:-1},l),c=a.create("tr",{tabindex:-1},d);
d=a.create("td",{"class":"dojoxCollapsibleToolbarControl",tabindex:-1},c);var g=a.create("td",{"class":"dojoxCollapsibleToolbarControl",tabindex:-1},c);c=a.create("td",{style:{width:"100%"},tabindex:-1},c);c=a.create("span",{style:{width:"100%"},tabindex:-1},c);var h=new f({buttonClass:"dojoxCollapsibleToolbarCollapse",title:b.collapse,text:"-",textClass:"dojoxCollapsibleToolbarCollapseText"});a.place(h.domNode,d);b=new f({buttonClass:"dojoxCollapsibleToolbarExpand",title:b.expand,text:"+",textClass:"dojoxCollapsibleToolbarExpandText"});
a.place(b.domNode,g);this._myWidgets.push(h);this._myWidgets.push(b);a.style(g,"display","none");a.place(l,this.editor.toolbar.domNode,"after");a.place(this.editor.toolbar.domNode,c);this.openTd=d;this.closeTd=g;this.menu=c;this.connect(h,"onClick","_onClose");this.connect(b,"onClick","_onOpen")},_onClose:function(b){b&&a.stopEvent(b);b=a.marginBox(this.editor.domNode);a.style(this.openTd,"display","none");a.style(this.closeTd,"display","");a.style(this.menu,"display","none");this.editor.resize({h:b.h});
a.isIE&&(this.editor.header.className=this.editor.header.className,this.editor.footer.className=this.editor.footer.className);e.focus(this.closeTd.firstChild)},_onOpen:function(b){b&&a.stopEvent(b);b=a.marginBox(this.editor.domNode);a.style(this.closeTd,"display","none");a.style(this.openTd,"display","");a.style(this.menu,"display","");this.editor.resize({h:b.h});a.isIE&&(this.editor.header.className=this.editor.header.className,this.editor.footer.className=this.editor.footer.className);e.focus(this.openTd.firstChild)},
destroy:function(){this.inherited(arguments);if(this._myWidgets){for(;this._myWidgets.length;)this._myWidgets.pop().destroy();delete this._myWidgets}}});k._CollapsibleToolbarButton=f;a.subscribe(e._scopeName+".Editor.getPlugin",null,function(b){b.plugin||"collapsibletoolbar"!==b.args.name.toLowerCase()||(b.plugin=new k({}))});return k});