//>>built
define("dijit/_editor/plugins/Print","dojo/_base/declare dojo/i18n dojo/_base/lang dojo/sniff ../../focus ../_Plugin ../../form/Button dojo/i18n!../nls/commands".split(" "),function(k,l,d,e,m,f,n){var h=k("dijit._editor.plugins.Print",f,{_initButton:function(){var a=l.getLocalization("dijit._editor","commands"),b=this.editor;this.button=new n({label:a.print,ownerDocument:b.ownerDocument,dir:b.dir,lang:b.lang,showLabel:!1,iconClass:this.iconClassPrefix+" "+this.iconClassPrefix+"Print",tabIndex:"-1",
onClick:d.hitch(this,"_print")})},setEditor:function(a){this.editor=a;this._initButton();this.editor.onLoadDeferred.then(d.hitch(this,function(){this.editor.iframe.contentWindow.print||this.button.set("disabled",!0)}))},updateState:function(){var a=this.get("disabled");this.editor.iframe.contentWindow.print||(a=!0);this.button.set("disabled",a)},_print:function(){var a=this.editor.iframe;if(a.contentWindow.print)if(e("opera")||e("chrome")){var b=this.editor.document,c=this.editor.get("value");c="\x3chtml\x3e\x3chead\x3e\x3cmeta http-equiv\x3d'Content-Type' content\x3d'text/html; charset\x3d'UTF-8'\x3e\x3c/head\x3e\x3cbody\x3e"+
c+"\x3c/body\x3e\x3c/html\x3e";a=window.open("javascript: ''","","status\x3d0,menubar\x3d0,location\x3d0,toolbar\x3d0,width\x3d1,height\x3d1,resizable\x3d0,scrollbars\x3d0");a.document.open();a.document.write(c);a.document.close();if(b=b.getElementsByTagName("style"))for(c=0;c<b.length;c++){var p=b[c].innerHTML,g=a.document.createElement("style");g.appendChild(a.document.createTextNode(p));a.document.getElementsByTagName("head")[0].appendChild(g)}a.print();a.close()}else m.focus(a),a.contentWindow.print()}});
f.registry.print=function(){return new h({command:"print"})};return h});