//>>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,n,k,l,m){var g=a.declare("dojox.editor.plugins._CollapsibleToolbarButton",[k,l],{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(a){}}),d=a.declare("dojox.editor.plugins.CollapsibleToolbar",m,{_myWidgets:null,setEditor:function(a){this.editor=a;this._constructContainer()},_constructContainer:function(){var b=a.i18n.getLocalization("dojox.editor.plugins","CollapsibleToolbar");this._myWidgets=[];var e=a.create("table",{style:{width:"100%"},tabindex:-1,"class":"dojoxCollapsibleToolbarContainer"}),f=a.create("tbody",{tabindex:-1},e),c=a.create("tr",{tabindex:-1},f),
f=a.create("td",{"class":"dojoxCollapsibleToolbarControl",tabindex:-1},c),d=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),h=new g({buttonClass:"dojoxCollapsibleToolbarCollapse",title:b.collapse,text:"-",textClass:"dojoxCollapsibleToolbarCollapseText"});a.place(h.domNode,f);b=new g({buttonClass:"dojoxCollapsibleToolbarExpand",title:b.expand,text:"+",textClass:"dojoxCollapsibleToolbarExpandText"});
a.place(b.domNode,d);this._myWidgets.push(h);this._myWidgets.push(b);a.style(d,"display","none");a.place(e,this.editor.toolbar.domNode,"after");a.place(this.editor.toolbar.domNode,c);this.openTd=f;this.closeTd=d;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}}});d._CollapsibleToolbarButton=g;a.subscribe(e._scopeName+".Editor.getPlugin",null,function(a){a.plugin||"collapsibletoolbar"!==a.args.name.toLowerCase()||(a.plugin=new d({}))});return d});