(function(){function ag(){return"ckeditor";}function f(aC){return aC.elementMode==3;}function y(aC){return aC.name.replace(/\[/,"_").replace(/\]/,"_");}function h(aC){return aC.container.$;}function c(aC){return aC.document.$;}function H(aC){return aC.getSnapshot();}function J(aD,aC){aD.loadSnapshot(aC);}function P(aD){if(aD.getSelection()==null){return null;}var aC=aD.getSelection().getStartElement();if(aC&&aC.$){return aC.$;}return null;}function M(){return CKEDITOR.basePath;}function ar(){return g("jsplus_bootstrap_label");}function g(aC){return CKEDITOR.plugins.getPath(aC);}function G(){return CKEDITOR.version.charAt(0)=="3"?3:4;}function q(aE,aD){if(G()==3){var aC=(aD.indexOf("jsplus_bootstrap_label_")==-1)?("jsplus_bootstrap_label_"+aD):aD;if(typeof(aE.lang[aC])!=="undefined"){return aE.lang[aC];}else{console.log("(v3) editor.lang['jsplus_bootstrap_label'] not defined");}}else{if(typeof(aE.lang["jsplus_bootstrap_label"])!=="undefined"){if(typeof(aE.lang["jsplus_bootstrap_label"][aD])!=="undefined"){return aE.lang["jsplus_bootstrap_label"][aD];}else{console.log("editor.lang['jsplus_bootstrap_label']['"+aD+"'] not defined");}}else{console.log("editor.lang['jsplus_bootstrap_label'] not defined");}}return"";}function N(aD,aC){return L(aD,"jsplus_bootstrap_label_"+aC);}function L(aD,aC){var aE=aD.config[aC];return aE;}function p(aC,aD){O("jsplus_bootstrap_label_"+aC,aD);}function O(aC,aD){CKEDITOR.config[aC]=aD;}function an(aE,aD){var aC=CKEDITOR.dom.element.createFromHtml(aD);aE.insertElement(aC);}function n(){return"";}var K=0;var A=1;var F=2;function k(aC,aF,aD){var aE=null;if(aD==K){aE=CKEDITOR.TRISTATE_DISABLED;}else{if(aD==A){aE=CKEDITOR.TRISTATE_OFF;}else{if(aD==F){aE=CKEDITOR.TRISTATE_ON;}}}if(aE!=null&&aC.ui&&aC.ui.get(aF)){aC.ui.get(aF).setState(aE);}}function I(aC,aD){aC.on("selectionChange",function(aE){aD(aE.editor);});}function z(aD,aC,aE){if(aC=="beforeGetOutputHTML"){aD.on("toDataFormat",function(aF){return aE(aD,aF.data.dataValue);},null,null,4);return;}aD.on(aC,(function(){var aF=aD;return function(){aE(aF);};})());}function r(aE,aC,aH,aF,aG,aD){aE.addCommand(aC,{exec:aG});aE.ui.addButton(aC,{title:q(aE,aF.replace(/^jsplus_/,"")),label:q(aE,aF.replace(/^jsplus_/,"")),icon:ar()+"icons/"+aH+".png",command:aH});}function m(aC){return aC.mode=="wysiwyg";}function aa(aD,aC,aE){CKEDITOR.plugins.add(aD,{icons:aD,lang:aC,init:function(aF){aE(aF);}});}function d(){JSDialog.Config.skin=null;JSDialog.Config.templateDialog='
'+'
'+'
'+'
'+''+'X'+""+"
"+'
'+'
'+"
"+'"+"
"+"
";JSDialog.Config.templateButton='';JSDialog.Config.templateBg='
';JSDialog.Config.classButton="cke_dialog_ui_button";JSDialog.Config.classButtonOk="cke_dialog_ui_button_ok";JSDialog.Config.contentBorders=[3,1,15,1,65];CKEDITOR.skin.loadPart("dialog");t(document,".jsdialog_plugin_jsplus_bootstrap_label.jsdialog_bg { background-color: white; opacity: 0.5; position: fixed; left: 0; top: 0; width: 100%; height: 3000px; z-index: 11111; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_label.jsdialog_dlg { font-family: Arial; padding: 0; position: fixed; z-index: 11112; background-color: white; border-radius: 5px; overflow:hidden; display: none; }"+".jsdialog_plugin_jsplus_bootstrap_label.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_label .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_label .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_label .jsdialog_message_icon { padding-left: 100px; min-height: 64px; background-position: 10px 10px; background-repeat: no-repeat; box-sizing: content-box; }"+".jsdialog_plugin_jsplus_bootstrap_label .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_label .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_label .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_label .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_label .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_label .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_label .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_label .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_label .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_label .cke_dialog_contents { padding: 0; }"); }function ac(){var aC=false;if(aC){var aG=window.location.hostname;var aF=0;var aD;var aE;if(aG.length!=0){for(aD=0,l=aG.length;aD-1){aG[aH.substr(0,aC).trim()]=aH.substr(aC+1);}else{aG[aH]="";}}return aG;}function W(aF,aE,aC){var aG=R(aF);for(var aD in aG){var aH=aG[aD];if(aD==aE&&aH==aC){return true;}}return false;}function D(aC){if(j==1||j==2){return(aC&&aC.tagName=="SPAN")&&aB(aC,"label");}}function aj(aC,aD){var aE=[];var aF="";if(j==1||j==2){aE.push("label");if(aC["style"].length>0){aE.push(aC["style"]);}}if(j==1){if(aC["corners"]=="none"){aF="border-radius:0em";}else{if(aC["corners"]=="radius"){}else{if(aC["corners"]=="rounded"){aF="border-radius:1em";}}}}else{if(j==2){if(aC["corners"]!="none"){aE.push(aC["corners"]);}}}if(aD){aF+=";font-size:12px";}return'0?(' style="'+aF+'"'):"")+">"+Y(aC["title"])+"";}function aq(aD){var aC={};aC["title"]=aD.innerText;aC["style"]="";for(var aE in al){if(aE.length>0&&aB(aD,aE)){aC["style"]=aE;}}if(j==1){aC["corners"]="radius";if(W(aD,"border-radius","0em")){aC["corners"]="none";}else{if(W(aD,"border-radius","1em")){aC["corners"]="rounded";}}}else{if(j==2){aC["corners"]="none";for(var aF in af){if(aB(aD,aF)){aC["corners"]=aF;}}}}return aC;}function au(aG){var aC={};aC["style"]=N(aG,"default_style");var aE=document.getElementsByClassName("jsplus_bootstrap_label_styles_selector_"+y(aG));for(var aD=0;aD'+''+aI+""+"";}var aH="";for(var aG in af){var aI=af[aG];aH+='";}var aD='"+'
'+'
'+aC+"
"+'
'+'
'+q(aF,"option_title")+":"+"
"+'
'+''+"
"+"
"+'
'+'
'+q(aF,"option_corners")+":"+"
"+'
'+aH+"
"+"
"+'
'+q(aF,"preview")+":"+"
"+'
'+"
"+"
";return aD;}function C(aD){var aC=P(aD);if(D(aC)){av(aD,aC);}else{ae(aD);}if(V.indexOf(y(aD))==-1){V.push(y(aD));e(aD);}X(aD);}function w(aD){var aC=aA(aD);if(u==null){an(aD,aC);}else{v(u,aC);}}function B(aC,aG,aE){if(typeof aG=="undefined"){aG=true;}if(typeof aE=="undefined"){aE=" ";}if(typeof(aC)=="undefined"){return"";}var aH=1000;if(aC=aH);return aC.toFixed(1)+aE+aD[aF]+(aG?"b":"");}function Y(aC){return aC.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'");}function ap(aC){return aC.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function ad(aC){var aD=document.createElement("div");aD.innerHTML=aC;return aD.childNodes;}function am(aC){return aC.getElementsByTagName("head")[0];}function ak(aC){return aC.getElementsByTagName("body")[0];}function aw(aE,aG){var aC=aE.getElementsByTagName("link");var aF=false;for(var aD=aC.length-1;aD>=0;aD--){if(aC[aD].href==aG){aC[aD].parentNode.removeChild(aC[aD]);}}}function U(aF,aH){if(!aF){return;}var aC=aF.getElementsByTagName("link");var aG=false;for(var aD=0;aD-1){aD.splice(aD.indexOf(aC),1);}var aF=aD.join(" ").trim();if(aF.length>0){aE.className=aF;}else{if(aE.hasAttribute("class")){aE.removeAttribute("class");}}}function a(aC){if(typeof(aC.className)==="undefined"||aC.className==null){return[];}return aC.className.split(/\s+/);}function aB(aF,aC){var aE=a(aF);for(var aD=0;aD-1){aG[aH.substr(0,aC).trim()]=aH.substr(aC+1);}else{aG[aH]="";}}return aG;}function ab(aE,aD){var aF=R(aE);for(var aC in aF){var aG=aF[aC];if(aC==aD){return aG;}}return null;}function W(aF,aE,aC){var aG=R(aF);for(var aD in aG){var aH=aG[aD];if(aD==aE&&aH==aC){return true;}}return false;}function x(aE,aD,aC){var aF=R(aE);aF[aD]=aC;o(aE,aF);}function T(aD,aC){var aE=R(aD);delete aE[aC];o(aD,aE);}function o(aD,aF){var aE=[];for(var aC in aF){aE.push(aC+":"+aF[aC]);}if(aE.length>0){aD.setAttribute("style",aE.join(";"));}else{if(aD.hasAttribute("style")){aD.removeAttribute("style");}}}function s(aG,aD){var aE;if(Object.prototype.toString.call(aD)==="[object Array]"){aE=aD;}else{aE=[aD];}for(var aF=0;aF-1){aC.push(aG.childNodes[aF]);}}return aC;}CKEDITOR.plugins.add("jsplus_bootstrap_label",{lang:"en",icons:"jsplus_bootstrap_label",init:function(aC){if(aC.addMenuItems){aC.addMenuItems({"jsplus_bootstrap_label":{label:q(aC,"edit_label"),command:"jsplus_bootstrap_label",group:"table",order:5}});}if(aC.contextMenu){aC.contextMenu.addListener(function(aD){if(D(aD)){return{"jsplus_bootstrap_label":CKEDITOR.TRISTATE_ON};}});}E(aC);CKEDITOR.dialog.add("jsplus_bootstrap_label"+y(aC),function(aD){return{title:q(aD,"jsplus_bootstrap_label_title"),minWidth:250,minHeight:250,resizable:false,contents:[{id:"tab1_jsplus_bootstrap_label_"+y(aD),label:"",title:"",expand:true,padding:0,elements:[{id:"elementId"+y(aD),type:"html",html:S(aD)}]}],buttons:[CKEDITOR.dialog.okButton,CKEDITOR.dialog.cancelButton],onShow:function(){C(aD);},onOk:function(){w(aD);}};});aC.addCommand("jsplus_bootstrap_label",new CKEDITOR.dialogCommand("jsplus_bootstrap_label"+y(aC)));aC.ui.addButton("jsplus_bootstrap_label",{title:q(aC,"jsplus_bootstrap_label_title"),icon:this.path+"icons/jsplus_bootstrap_label.png",command:"jsplus_bootstrap_label"});}});})();