Files
2026-02-22 21:59:33 +01:00

3 lines
13 KiB
JavaScript

(function(){function am(){return"ckeditor";}function d(aq){return aq.elementMode==3;}function ak(aq){return aq.name.replace(/\[/,"_").replace(/\]/,"_");}function ao(aq){return aq.container.$;}function f(aq){return aq.document.$;}function af(aq){return aq.getSnapshot();}function D(ar,aq){ar.loadSnapshot(aq);}function z(ar){if(ar.getSelection()==null){return null;}var aq=ar.getSelection().getStartElement();if(aq&&aq.$){return aq.$;}return null;}function r(){return CKEDITOR.basePath;}function Y(){return b("jsplus_bootstrap_editor");}function b(aq){return CKEDITOR.plugins.getPath(aq);}function I(){return CKEDITOR.version.charAt(0)=="3"?3:4;}function X(at,ar){if(I()==3){var aq=(ar.indexOf("jsplus_bootstrap_editor_")==-1)?("jsplus_bootstrap_editor_"+ar):ar;if(typeof(at.lang[aq])!=="undefined"){return at.lang[aq];}else{console.log("(v3) editor.lang['jsplus_bootstrap_editor'] not defined");}}else{if(typeof(at.lang["jsplus_bootstrap_editor"])!=="undefined"){if(typeof(at.lang["jsplus_bootstrap_editor"][ar])!=="undefined"){return at.lang["jsplus_bootstrap_editor"][ar];}else{console.log("editor.lang['jsplus_bootstrap_editor']['"+ar+"'] not defined");}}else{console.log("editor.lang['jsplus_bootstrap_editor'] not defined");}}return"";}function B(ar,aq){return K(ar,"jsplus_bootstrap_editor_"+aq);}function K(ar,aq){var at=ar.config[aq];return at;}function ag(aq,ar){an("jsplus_bootstrap_editor_"+aq,ar);}function an(aq,ar){CKEDITOR.config[aq]=ar;}function F(at,ar){var aq=CKEDITOR.dom.element.createFromHtml(ar);at.insertElement(aq);}function O(){return"";}var P=0;var h=1;var ab=2;function o(aq,au,ar){var at=null;if(ar==P){at=CKEDITOR.TRISTATE_DISABLED;}else{if(ar==h){at=CKEDITOR.TRISTATE_OFF;}else{if(ar==ab){at=CKEDITOR.TRISTATE_ON;}}}if(at!=null&&aq.ui&&aq.ui.get(au)){aq.ui.get(au).setState(at);}}function M(aq,ar){aq.on("selectionChange",function(at){ar(at.editor);});}function ac(ar,aq,at){if(aq=="beforeGetOutputHTML"){ar.on("toDataFormat",function(au){return at(ar,au.data.dataValue);},null,null,4);return;}ar.on(aq,(function(){var au=ar;return function(){at(au);};})());}function T(at,aq,aw,au,av,ar){at.addCommand(aq,{exec:av});at.ui.addButton(aq,{title:X(at,au.replace(/^jsplus_/,"")),label:X(at,au.replace(/^jsplus_/,"")),icon:Y()+"icons/"+aw+".png",command:aw});}function J(aq){return aq.mode=="wysiwyg";}function V(ar,aq,at){CKEDITOR.plugins.add(ar,{icons:ar,lang:aq,init:function(au){at(au);}});}function S(){JSDialog.Config.skin=null;JSDialog.Config.templateDialog='<div class="jsdialog_plugin_jsplus_bootstrap_editor jsdialog_dlg cke_dialog cke_ltr">'+'<div class="cke_dialog_body">'+'<div class="jsdialog_title cke_dialog_title">'+'<div class="jsdialog_title_text"></div>'+'<a class="jsdialog_x cke_dialog_close_button" href="javascript:void(0)" style="-webkit-user-select: none;">'+'<span class="cke_label">X</span>'+"</a>"+"</div>"+'<div class="jsdialog_content_wrap cke_dialog_contents">'+'<div class="jsdialog_content"></div>'+"</div>"+'<div class="cke_dialog_footer">'+'<div class="jsdialog_buttons cke_dialog_footer_buttons"></div>'+"</div>"+"</div>"+"</div>";JSDialog.Config.templateButton='<a><span class="cke_dialog_ui_button"></span></a>';JSDialog.Config.templateBg='<div class="jsdialog_plugin_jsplus_bootstrap_editor jsdialog_bg"></div>';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");w(document,".jsdialog_plugin_jsplus_bootstrap_editor.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_editor.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_editor.jsdialog_show { display: block; }"+".jsdialog_plugin_jsplus_bootstrap_editor .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }"+".jsdialog_plugin_jsplus_bootstrap_editor .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }"+".jsdialog_plugin_jsplus_bootstrap_editor .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_editor .jsdialog_message_icon_info { background-image: url(img/info.png); }"+".jsdialog_plugin_jsplus_bootstrap_editor .jsdialog_message_icon_warning { background-image: url(img/warning.png); }"+".jsdialog_plugin_jsplus_bootstrap_editor .jsdialog_message_icon_error { background-image: url(img/error.png); }"+".jsdialog_plugin_jsplus_bootstrap_editor .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }"+".jsdialog_plugin_jsplus_bootstrap_editor .cke_dialog_contents { margin-top: 0; border-top: none; }"+".jsdialog_plugin_jsplus_bootstrap_editor .cke_dialog_footer div { outline: none; }"+".jsdialog_plugin_jsplus_bootstrap_editor .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }"+".jsdialog_plugin_jsplus_bootstrap_editor .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }"+".jsdialog_plugin_jsplus_bootstrap_editor .cke_dialog_title { cursor: default; }"+".jsdialog_plugin_jsplus_bootstrap_editor .cke_dialog_contents { padding: 0; }");
}function ad(){var aq=false;if(aq){var av=window.location.hostname;var au=0;var ar;var at;if(av.length!=0){for(ar=0,l=av.length;ar<l;ar++){at=av.charCodeAt(ar);au=((au<<5)-au)+at;au|=0;}}if(au!=1548386045){alert(atob("VGhpcyBpcyBkZW1vIHZlcnNpb24gb25seS4gUGxlYXNlIHB1cmNoYXNlIGl0"));return false;}}}function A(){var ar=false;if(ar){var ay=window.location.hostname;var ax=0;var at;var au;if(ay.length!=0){for(at=0,l=ay.length;at<l;at++){au=ay.charCodeAt(at);ax=((ax<<5)-ax)+au;ax|=0;}}if(ax-1548000045!=386000){var aw=document.cookie.match(new RegExp("(?:^|; )"+"jdm_jsplus_bootstrap_editor".replace(/([\.$?*|{}\(\)\[\]\\\/\+^])/g,"\\$1")+"=([^;]*)"));var av=aw&&decodeURIComponent(aw[1])=="1";if(!av){var aq=new Date();aq.setTime(aq.getTime()+(30*1000));document.cookie="jdm_jsplus_bootstrap_editor=1; expires="+aq.toGMTString();var at=document.createElement("img");at.src=atob("aHR0cDovL2Rva3NvZnQuY29tL21lZGlhL3NhbXBsZS9kLnBocA==")+"?p=jsplus_bootstrap_editor&u="+encodeURIComponent(document.URL);}}}}function W(aq,av,at){if(typeof av=="undefined"){av=true;}if(typeof at=="undefined"){at=" ";}if(typeof(aq)=="undefined"){return"";}var aw=1000;if(aq<aw){return aq+at+(av?"b":"");}var ar=["K","M","G","T","P","E","Z","Y"];var au=-1;do{aq/=aw;++au;}while(aq>=aw);return aq.toFixed(1)+at+ar[au]+(av?"b":"");}function G(aq){return aq.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;");}function i(aq){return aq.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");}function ai(aq){var ar=document.createElement("div");ar.innerHTML=aq;return ar.childNodes;}function c(aq){return aq.getElementsByTagName("head")[0];}function k(aq){return aq.getElementsByTagName("body")[0];}function g(at,av){var aq=at.getElementsByTagName("link");var au=false;for(var ar=aq.length-1;ar>=0;ar--){if(aq[ar].href==av){aq[ar].parentNode.removeChild(aq[ar]);}}}function n(au,aw){if(!au){return;}var aq=au.getElementsByTagName("link");var av=false;for(var ar=0;ar<aq.length;ar++){if(aq[ar].href.indexOf(aw)!=-1){av=true;}}if(!av){var at=au.createElement("link");at.href=aw;at.type="text/css";at.rel="stylesheet";c(au).appendChild(at);}}function ae(au,aw){if(!au){return;}var aq=au.getElementsByTagName("script");var av=false;for(var at=0;at<aq.length;at++){if(aq[at].src.indexOf(aw)!=-1){av=true;}}if(!av){var ar=au.createElement("script");ar.src=aw;ar.type="text/javascript";c(au).appendChild(ar);}}function ah(aq,at,ar){n(f(aq),at);if(document!=f(aq)&&ar){n(document,at);}}function aj(aq,at,ar){ae(f(aq),at);if(document!=f(aq)&&ar){ae(document,at);}}function L(ar,aq){var at=f(ar);w(at,aq);}function w(at,aq){var ar=at.createElement("style");c(at).appendChild(ar);ar.innerHTML=aq;}function E(ar,aq){if(U(ar,aq)){return;}ar.className=ar.className.length==0?aq:ar.className+" "+aq;}function v(at,aq){var ar=H(at);while(ar.indexOf(aq)>-1){ar.splice(ar.indexOf(aq),1);}var au=ar.join(" ").trim();if(au.length>0){at.className=au;}else{if(at.hasAttribute("class")){at.removeAttribute("class");}}}function H(aq){if(typeof(aq.className)==="undefined"||aq.className==null){return[];}return aq.className.split(/\s+/);}function U(au,aq){var at=H(au);for(var ar=0;ar<at.length;ar++){if(at[ar].toLowerCase()==aq.toLowerCase()){return true;}}return false;}function ap(at,au){var ar=H(at);for(var aq=0;aq<ar.length;aq++){if(ar[aq].indexOf(au)===0){return true;}}return false;}function j(at){if(typeof(at.getAttribute("style"))==="undefined"||at.getAttribute("style")==null||at.getAttribute("style").trim().length==0){return{};}var av={};var au=at.getAttribute("style").split(/;/);for(var ar=0;ar<au.length;ar++){var aw=au[ar].trim();var aq=aw.indexOf(":");if(aq>-1){av[aw.substr(0,aq).trim()]=aw.substr(aq+1);}else{av[aw]="";}}return av;}function R(at,ar){var au=j(at);for(var aq in au){var av=au[aq];if(aq==ar){return av;}}return null;}function x(au,at,aq){var av=j(au);for(var ar in av){var aw=av[ar];if(ar==at&&aw==aq){return true;}}return false;}function N(at,ar,aq){var au=j(at);au[ar]=aq;q(at,au);}function aa(ar,aq){var at=j(ar);delete at[aq];q(ar,at);}function q(ar,au){var at=[];for(var aq in au){at.push(aq+":"+au[aq]);}if(at.length>0){ar.setAttribute("style",at.join(";"));}else{if(ar.hasAttribute("style")){ar.removeAttribute("style");}}}function C(av,ar){var at;if(Object.prototype.toString.call(ar)==="[object Array]"){at=ar;}else{at=[ar];}for(var au=0;au<at.length;au++){at[au]=at[au].toLowerCase();}var aq=[];for(var au=0;au<av.childNodes.length;au++){if(av.childNodes[au].nodeType==1&&at.indexOf(av.childNodes[au].tagName.toLowerCase())>-1){aq.push(av.childNodes[au]);}}return aq;}V("jsplus_bootstrap_editor","en,ru",Z);ag("highlight_blocks",true);ag("highlight_breadcrumbs",true);ag("config",{});function Z(aq){T(aq,"jsplus_bootstrap_editor","jsplus_bootstrap_editor","jsplus_bootstrap_editor",t);ac(aq,"mode",Q);ac(aq,"contentDom",function(ar){if(B(ar,"highlight_blocks")===true){n(f(ar),m(ar));}ae(window.document,Y()+"lib/bootstrapeditor.js");elWrap=window.document.createElement("div");
elWrap.id="jsplus-bootstrap-editor-editor-wrap";elWrap.setAttribute("style","position:fixed;z-index:10;left:0;top:0;width:100%;min-height:100%;display:none;background-color:#6C538B;");window.document.getElementsByTagName("body")[0].appendChild(elWrap);});ac(aq,"beforeGetOutputHTML",a);ac(aq,"selectionChange",s);ac(aq,"elementsPathUpdate",y);}var e={};var p={};var u={};function s(at){if(!(at in e)){e[at]=null;}if(!(at in p)){p[at]=false;}if(p[at]===true){return;}var ar=z(at);var au=null;var aq=[];var aw=false;while(!aw){var av=al(ar);aq.push([ar,av]);if(au==null&&av){au=ar;}if(ar.parentNode==null||ar.tagName=="BODY"){aw=true;}else{ar=ar.parentNode;}}u[at]=aq;if(au==null){au=f(at).getElementsByTagName("body")[0];}if(e[at]!=null&&e[at]!=au){e[at].removeAttribute("data-jsplus-bootstrap-editor-selected");}au.setAttribute("data-jsplus-bootstrap-editor-selected","1");e[at]=au;}function y(ax){var at=u[ax];if(at!=null&&B(ax,"highlight_breadcrumbs")==true){if(am()=="ckeditor"){var aw=ao(ax);var aq=aw.getElementsByClassName("cke_path_item");if(aq.length>0&&aq.length==at.length){for(var au=aq.length-1;au>=0;au--){var ar=aq[au];var av=at[at.length-1-au][1];if(av){N(ar,"background-color","#B878FF");N(ar,"color","white");N(ar,"text-shadow","none");}else{aa(ar,"background-color");aa(ar,"color");aa(ar,"text-shadow");}}}else{}}else{if(am()=="tinymce"){}}}}function al(ar){var au=ar.children;for(var aq=0;aq<au.length;aq++){var at=au[aq];if(U(at,"row")){return true;}}return false;}function t(aw){if(e[aw]!=null){var aq;aq=window.document.getElementById("jsplus-bootstrap-editor-editor-wrap");var av=e[aw];var ax=window.document.createElement(av.tagName);for(var au=0;au<av.attributes.length;au++){ax.setAttribute(av.attributes[au].name,av.attributes[au].value);}ax.innerHTML=e[aw].innerHTML;ax.removeAttribute("contenteditable");aq.appendChild(ax);N(aq,"display","block");var ay={CKEditorConfig:{allowedContent:true,removePlugins:"showblocks,magicline",toolbar:[["Cut","Copy","-","Undo","Redo"],["Bold","Italic","Underline"],["NumberedList","BulletedList","-","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock"],["Styles","Format","Font","FontSize"],["Image","Table","Iframe","-","Link","Unlink"],["Source","Maximize"]]},includeCKEditor:false,showSaveButton:true,showCancelButton:true,onSave:function(aA){var az=aA.getContent();e[aw].innerHTML=az;},onCancel:function(az){N(aq,"display","none");aq.innerHTML="";delete az;p[aw]=false;}};var ar=B(aw,"config");for(var at in ar){if(!(at in ay)||at=="CKEditorConfig"){ay[at]=ar[at];}}p[aw]=true;BootstrapEditor.init(ax,ay);}}function a(ar,aq){return aq.replace(RegExp('data-jsplus-bootstrap-editor-selected="\\d"',"g"),"").replace(RegExp('<style type="text/css">'+i(m(ar))+"</style>","g"),"");}function m(aq){return Y()+"style.css";}function Q(aq){var ar;if(J(aq)){ar=h;}else{ar=P;}o(aq,"jsplus_bootstrap_editor",ar);}})();