//>>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,d,e,i,j,k){a.declare("dojox.editor.plugins._CollapsibleToolbarButton",[i,j],{templateString:"<div tabindex='0' role='button' title='${title}' class='${buttonClass}' dojoAttachEvent='ondijitclick: onClick'><span class='${textClass}'>${text}</span></div>",
title:"",buttonClass:"",text:"",textClass:"",onClick:function(){}});a.declare("dojox.editor.plugins.CollapsibleToolbar",k,{_myWidgets:null,setEditor:function(a){this.editor=a;this._constructContainer()},_constructContainer:function(){var b=a.i18n.getLocalization("dojox.editor.plugins","CollapsibleToolbar");this._myWidgets=[];var d=a.create("table",{style:{width:"100%"},tabindex:-1,"class":"dojoxCollapsibleToolbarContainer"}),f=a.create("tbody",{tabindex:-1},d),c=a.create("tr",{tabindex:-1},f),f=a.create("td",
{"class":"dojoxCollapsibleToolbarControl",tabindex:-1},c),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),h=new e.editor.plugins._CollapsibleToolbarButton({buttonClass:"dojoxCollapsibleToolbarCollapse",title:b.collapse,text:"-",textClass:"dojoxCollapsibleToolbarCollapseText"});a.place(h.domNode,f);b=new e.editor.plugins._CollapsibleToolbarButton({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(d,this.editor.toolbar.domNode,"after");a.place(this.editor.toolbar.domNode,c);this.openTd=f;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});if(a.isIE)this.editor.header.className=this.editor.header.className,this.editor.footer.className=this.editor.footer.className;d.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});if(a.isIE)this.editor.header.className=this.editor.header.className,
this.editor.footer.className=this.editor.footer.className;d.focus(this.openTd.firstChild)},destroy:function(){this.inherited(arguments);if(this._myWidgets){for(;this._myWidgets.length;)this._myWidgets.pop().destroy();delete this._myWidgets}}});a.subscribe(d._scopeName+".Editor.getPlugin",null,function(a){if(!a.plugin&&"collapsibletoolbar"===a.args.name.toLowerCase())a.plugin=new e.editor.plugins.CollapsibleToolbar({})});return e.editor.plugins.CollapsibleToolbar});