MWF.xDesktop.requireApp("MinderEditor","lp."+MWF.language,null,false);MWF.xDesktop.requireApp("MinderEditor","Commands",null,false);MWF.xApplication.MinderEditor.LeftToolbar=new Class({Extends:MWF.widget.Common,Implements:[Options,Events],options:{style:"default"},initialize:function(t,e,i,s){this.container=t;this.app=s;this.lp=MWF.xApplication.MinderEditor.LP;this.actions=this.app.restActions;this.editor=e;this.minder=i;if(this.editor.commands){this.commands=this.editor.commands}else{this.commands=new MWF.xApplication.MinderEditor.Commands(this.editor);this.commands.load()}this.path="/x_component_MinderEditor/$LeftToolbar/";this.cssPath=this.path+this.options.style+"/css.wcss";this._loadCss()},load:function(t){this.creat()},destroy:function(){this.node.destroy();delete this},getHtml:function(){var e;var t=this.editor.options.tools;if(t&&t.left){e=t.left}else{e=["zoom","camera","resetlayout","move","expandLevel","selectAll","preview","template","theme","search"]}var i="";var s=this.editor.options.disableTools||[];s.each(function(t){e.erase(t)});this.itemCount=0;e.each(function(t){if(t!="zoom")this.itemCount++;switch(t){case"zoom":this.hasZoom=true;i+="
";break;case"camera":i+="
";break;case"resetlayout":i+="
";break;case"move":i+="
";break;case"expandLevel":i+="
";break;case"selectAll":i+="
";break;case"preview":i+="
"+"
";break;case"template":i+="
";break;case"theme":i+="
";break;case"search":i+="
"+"
";break}}.bind(this));return i},setSize:function(){var t=0;if(!this.hasZoom)t=131;t+=(9-this.itemCount)*27;if(t>0){var e=this.node.getSize().y-10;this.node.setStyle("height",e-t)}},creat:function(){this.node=new Element("div",{styles:this.css.nav}).inject(this.container);this.node.set("html",this.getHtml());this.setSize();this.node.getElements("[styles]").each(function(t){if(!t.get("item")){t.setStyles(this.css[t.get("styles")])}}.bind(this));this.commands.addContainer("lefttoolbar",this.node,this.css)}});