(function() {
function ak() {
return "ckeditor";
}
function f(aE) {
return aE.elementMode == 3;
}
function C(aE) {
return aE.name.replace(/\[/, "_").replace(/\]/, "_");
}
function h(aE) {
return aE.container.$;
}
function b(aE) {
return aE.document.$;
}
function N(aE) {
return aE.getSnapshot();
}
function Q(aF, aE) {
aF.loadSnapshot(aE);
}
function Y(aF) {
if (aF.getSelection() == null) {
return null;
}
var aE = aF.getSelection().getStartElement();
if (aE && aE.$) {
return aE.$;
}
return null;
}
function U() {
return CKEDITOR.basePath;
}
function ax() {
return g("jsplus_bootstrap_templates");
}
function g(aE) {
return CKEDITOR.plugins.getPath(aE);
}
function M() {
return CKEDITOR.version.charAt(0) == "3" ? 3 : 4;
}
function u(aG, aF) {
if (M() == 3) {
var aE = (aF.indexOf("jsplus_bootstrap_templates_") == -1) ? ("jsplus_bootstrap_templates_" + aF) : aF;
if (typeof(aG.lang[aE]) !== "undefined") {
return aG.lang[aE];
} else {
console.log("(v3) editor.lang['jsplus_bootstrap_templates'] not defined");
}
} else {
if (typeof(aG.lang["jsplus_bootstrap_templates"]) !== "undefined") {
if (typeof(aG.lang["jsplus_bootstrap_templates"][aF]) !== "undefined") {
return aG.lang["jsplus_bootstrap_templates"][aF];
} else {
console.log("editor.lang['jsplus_bootstrap_templates']['" + aF + "'] not defined");
}
} else {
console.log("editor.lang['jsplus_bootstrap_templates'] not defined");
}
}
return "";
}
function V(aF, aE) {
return S(aF, "jsplus_bootstrap_templates_" + aE);
}
function S(aF, aE) {
var aG = aF.config[aE];
return aG;
}
function t(aE, aF) {
X("jsplus_bootstrap_templates_" + aE, aF);
}
function X(aE, aF) {
CKEDITOR.config[aE] = aF;
}
function ar(aG, aF) {
var aE = CKEDITOR.dom.element.createFromHtml(aF);
aG.insertElement(aE);
}
function q() {
return "";
}
var R = 0;
var G = 1;
var L = 2;
function n(aE, aH, aF) {
var aG = null;
if (aF == R) {
aG = CKEDITOR.TRISTATE_DISABLED;
} else {
if (aF == G) {
aG = CKEDITOR.TRISTATE_OFF;
} else {
if (aF == L) {
aG = CKEDITOR.TRISTATE_ON;
}
}
}
if (aG != null && aE.ui && aE.ui.get(aH)) {
aE.ui.get(aH).setState(aG);
}
}
function O(aE, aF) {
aE.on("selectionChange", function(aG) {
aF(aG.editor);
});
}
function E(aF, aE, aG) {
if (aE == "beforeGetOutputHTML") {
aF.on("toDataFormat", function(aH) {
return aG(aF, aH.data.dataValue);
}, null, null, 4);
return;
}
aF.on(aE, (function() {
var aH = aF;
return function() {
aG(aH);
};
})());
}
function v(aG, aE, aJ, aH, aI, aF) {
aG.addCommand(aE, {
exec: aI
});
aG.ui.addButton(aE, {
title: u(aG, aH.replace(/^jsplus_/, "")),
label: u(aG, aH.replace(/^jsplus_/, "")),
icon: ax() + "icons/" + aJ + ".png",
command: aJ
});
}
function p(aE) {
return aE.mode == "wysiwyg";
}
function af(aF, aE, aG) {
CKEDITOR.plugins.add(aF, {
icons: aF,
lang: aE,
init: function(aH) {
aG(aH);
}
});
}
function c() {
JSDialog.Config.skin = null;
JSDialog.Config.templateDialog = '
";
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");
x(document, ".jsdialog_plugin_jsplus_bootstrap_templates.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_templates.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_templates.jsdialog_show { display: block; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_contents { font-size: 16px; padding: 10px 0 10px 7px; display: table; overflow: hidden; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_contents_inner { display: table-cell; vertical-align: middle; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .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_templates .jsdialog_message_icon_info { background-image: url(img/info.png); }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_icon_warning { background-image: url(img/warning.png); }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_icon_error { background-image: url(img/error.png); }" + ".jsdialog_plugin_jsplus_bootstrap_templates .jsdialog_message_icon_confirm { background-image: url(img/confirm.png); }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_contents { margin-top: 0; border-top: none; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_footer div { outline: none; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_footer_buttons > .cke_dialog_ui_button { margin-right: 5px; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_footer_buttons > .cke_dialog_ui_button:last-child { margin-right: 0; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_title { cursor: default; }" + ".jsdialog_plugin_jsplus_bootstrap_templates .cke_dialog_contents { padding: 0; }");
}
var m = 1;
var k = null;
var j = null;
var i = [];
var av;
var aw;
var ap;
var D = "";
var y = "";
var B = "";
var aj = {};
if (m == 20 || m == 21 || m == 22) {
t("use_dialog", false);
t("show_options", true);
t("show_advanced_options", true);
if (m == 20) {
t("default_width_100", false);
}
t("default_add_header", false);
t("default_class", "");
t("default_style", "");
if (m == 21) {
t("default_striped", true);
t("default_bordered", false);
t("default_condensed", false);
}
i = [];
var T = "border:1px solid rgb(171, 207, 255);background-color:rgb(195, 217, 255)";
if (m == 21) {
T = "border:1px solid #6f5499;background-color:#9174C0";
} else {
if (m == 22) {
T = "border:1px solid #007095;background-color:#008cba";
}
}
for (var al = 0; al < 6; al++) {
for (var F = 0; F < 6; F++) {
i.push(['', F + "," + al, "table"]);
}
}
D = '";
if (m == 20) {
aj["width_100"] = true;
}
aj["add_header"] = false;
aj["class"] = "";
aj["style"] = "";
if (m == 21) {
aj["striped"] = true;
aj["bordered"] = false;
aj["condensed"] = false;
}
} else {
if (m == 3) {
t("use_dialog", false);
X("jsplus_bootstrap_templates", []);
t("popup_width", 400);
t("dialog_width", 400);
t("dialog_height", 400);
} else {
if (m == 0) {
t("use_dialog", false);
av = 360;
aw = 384;
ap = 335;
i = [
['
', '', "html"],
['
', '', "html"],
['
', '', "html"],
['
', '', "html"],
['
', '', "html"],
['
', '', "html"],
['
', '
Text text text
', "html"],
['
', '', "html"],
['
', 'Text text text
', "html"]
];
} else {
if (m == 1) {
t("use_dialog", false);
t("default_col_type", "xs");
av = 660;
aw = 675;
ap = 215;
aj["col-type"] = "xs";
D = '";
i = [
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
];
} else {
if (m == 2) {
t("use_dialog", false);
t("default_col_type", "small");
av = 660;
aw = 675;
ap = 215;
aj["col-type"] = "small";
D = '";
i = [
['', 'col-1
', "html"],
['', 'col-2
', "html"],
['', 'col-3
', "html"],
['', 'col-4
', "html"],
['', 'col-5
', "html"],
['', 'col-6
', "html"],
['', 'col-7
', "html"],
['', 'col-8
', "html"],
['', 'col-9
', "html"],
['', 'col-10
', "html"],
['', 'col-11
', "html"],
['', 'col-12
', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
['', '', "html"],
];
} else {
if (m == 10) {
t("use_dialog", false);
av = 345;
aw = 370;
ap = 360;
i = [
['' + '
' + 'Success! Your request was finished successfully.' + "
" + "
", '' + "Success! Your request was finished successfully." + "
", "html"],
['' + '
' + 'Info. Here are details for your query.' + "
" + "
", '' + "Info. Here are details for your query." + "
", "html"],
['' + '
' + 'Warning! Are you sure you want to proceed?' + "
" + "
", '' + "Warning! Are you sure you want to proceed?" + "
", "html"],
['' + '
' + 'Danger! System state is critical, check the configuration!' + "
" + "
", '' + "Danger! System state is critical, check the configuration!" + "
", "html"],
['' + '
' + 'Message. Lorem ipsum dolor sit amet, consectetur.' + "
" + "
", '' + "Message. Lorem ipsum dolor sit amet, consectetur." + "
", "html"]
];
} else {
if (m == 11) {
t("use_dialog", false);
av = 400;
aw = 420;
ap = 300;
i = [
['Success! Your request was finished successfully
', 'Success!Your request was finished successfully
', "html"],
['Info. Here are details for your query.
', 'Info. Here are details for your query.
', "html"],
['Warning! Are you sure you want to proceed?
', 'Warning! Are you sure you want to proceed?
', "html"],
['Danger! System state is critical, check the configuration!
', 'Danger! System state is critical, check the configuration!
', "html"]
];
} else {
if (m == 12) {
av = 345;
aw = 370;
ap = 300;
i = [
['Success! Your request was finished successfully
', 'Success!Your request was finished successfully
', "html"],
['Info. Here are details for your query.
', 'Info. Here are details for your query.
', "html"],
['Warning! Are you sure you want to proceed?
', 'Warning! Are you sure you want to proceed?
', "html"],
['Danger! System state is critical, check the configuration!
', 'Danger! System state is critical, check the configuration!
', "html"],
['Message. Lorem ipsum dolor sit amet, consectetur.
', 'Message. This is the simple message
', "html"]
];
}
}
}
}
}
}
}
}
function d(aG) {
var aF = "-" + C(aG);
var aE = document.getElementById("jsplus_bootstrap_templates-dialog-root" + aF);
if (aE != null && aE.children.length == 0) {
aE.innerHTML = "";
}
aE = j.getElementById("jsplus_bootstrap_templates-popup-root" + aF);
aE.innerHTML = y.replace(/%id%/g, C(aG)).replace(/\{\{([^}]*)\}\}/g, function(aI, aH) {
return u(aG, aH);
});
e(aG, aE.ownerDocument);
}
function z(aH) {
var aF = document.getElementsByClassName("jsplus_bootstrap_templates-selected");
var aG = null;
for (var aE = 0; aE < aF.length && aG == null; aE++) {
if (aD(aF[aE], "jsplus_bootstrap_templates-template-" + C(aH))) {
aG = aF[aE];
}
}
if (aG == null) {
alert(u(aH, "select_element_first"));
window["jsplus_bootstrap_templates_callback"] = null;
return false;
} else {
K(aH, aG.getAttribute("data-jsplus_bootstrap_templates_template_id"));
window["jsplus_bootstrap_templates_callback"] = null;
}
}
function J(aF) {
var aE;
if (j != null) {
aE = j.getElementById("jsplus_bootstrap_templates-popup-root-" + C(aF));
if (aE != null && aE.children.length == 0) {
aE.innerHTMLAddition = null;
}
}
aE = document.getElementById("jsplus_bootstrap_templates-dialog-root-" + C(aF));
if (aE.children.length == 0) {
aE.innerHTML = aE.innerHTML = y.replace(/%id%/g, C(aF)).replace(/\{\{([^}]*)\}\}/g, function(aH, aG) {
return u(aF, aG);
});
}
e(aF, aE.ownerDocument);
W(aF, -1);
}
function az(aE) {
window["jsplus_bootstrap_templates_callback"] = null;
}
function H(aE) {
return window["jsplus_bootstrap_templates_callback"] != null || V(aE, "use_dialog");
}
function e(aI, aK) {
if (m == 1) {
var aH = function() {
aj["col-type"] = this.getAttribute("data-col");
};
aK.getElementById("jsplus_bootstrap_templatescolTypeXS_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH;
aK.getElementById("jsplus_bootstrap_templatescolTypeSM_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH;
aK.getElementById("jsplus_bootstrap_templatescolTypeMD_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH;
aK.getElementById("jsplus_bootstrap_templatescolTypeLG_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH;
aK.getElementById("jsplus_bootstrap_templatescolTypeXL_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH;
if (window.jsplus_bootstrap_version && window.jsplus_bootstrap_version == 3) {
A(aK.getElementById("jsplus_bootstrap_templates_div_xl_" + C(aI), "display", "none"));
}
} else {
if (m == 2) {
var aH = function() {
aj["col-type"] = this.getAttribute("data-col");
};
aK.getElementById("jsplus_bootstrap_templatescolTypesmall_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH;
aK.getElementById("jsplus_bootstrap_templatescolTypemedium_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH;
aK.getElementById("jsplus_bootstrap_templatescolTypelarge_label_" + C(aI)).getElementsByTagName("input")[0].onchange = aH;
} else {
if (m == 20 || m == 21 || m == 22) {
aK.getElementById("jsplus_bootstrap_templates_add_header_" + C(aI)).checked = V(aI, "default_add_header");
aK.getElementById("jsplus_bootstrap_templates_add_header_" + C(aI)).onchange = function() {
aj["add_header"] = this.checked;
};
if (m == 20) {
aK.getElementById("jsplus_bootstrap_templates_width_100_" + C(aI)).checked = V(aI, "default_width_100");
aK.getElementById("jsplus_bootstrap_templates_width_100_" + C(aI)).onchange = function() {
aj["width_100"] = this.checked;
};
}
if (m == 21) {
aK.getElementById("jsplus_bootstrap_templates_striped_" + C(aI)).checked = V(aI, "default_striped");
aK.getElementById("jsplus_bootstrap_templates_striped_" + C(aI)).onchange = function() {
aj["striped"] = this.checked;
};
aK.getElementById("jsplus_bootstrap_templates_bordered_" + C(aI)).checked = V(aI, "default_bordered");
aK.getElementById("jsplus_bootstrap_templates_bordered_" + C(aI)).onchange = function() {
aj["bordered"] = this.checked;
};
aK.getElementById("jsplus_bootstrap_templates_condensed_" + C(aI)).checked = V(aI, "default_condensed");
aK.getElementById("jsplus_bootstrap_templates_condensed_" + C(aI)).onchange = function() {
aj["condensed"] = this.checked;
};
}
aK.getElementById("jsplus_bootstrap_templates_class_" + C(aI)).value = V(aI, "default_class");
aK.getElementById("jsplus_bootstrap_templates_style_" + C(aI)).value = V(aI, "default_style");
aK.getElementById("jsplus_bootstrap_templates_options_" + C(aI)).style.display = V(aI, "show_options") ? "block" : "none";
aK.getElementById("jsplus_bootstrap_templates_advanced_options_" + C(aI)).style.display = V(aI, "show_advanced_options") ? "block" : "none";
var aJ = aK.getElementById("jsplus_bootstrap_templates_class_" + C(aI));
aJ.onchange = function() {
aj["class"] = this.value;
};
aJ.oninput = aJ.onchange;
aJ.onpase = aJ.onchange;
aJ.onkeyup = aJ.onchange;
var aG = aK.getElementById("jsplus_bootstrap_templates_style_" + C(aI));
aG.onchange = function() {
aj["style"] = this.value;
};
aG.oninput = aG.onchange;
aG.onpase = aG.onchange;
aG.onkeyup = aG.onchange;
}
}
}
var aE = aK.getElementsByClassName("jsplus_bootstrap_templates-template-" + C(aI));
var aL = function() {
var aM = this.getAttribute("data-jsplus_bootstrap_templates_template_id");
H(aI) ? W(aI, aM) : s(aI, aM);
};
for (var aF = 0; aF < aE.length; aF++) {
aE[aF].onclick = aL;
if (m == 20 || m == 21 || m == 22) {
aE[aF].onmouseover = (function() {
var aM = aK;
return function() {
var aQ = this.getAttribute("data-jsplus_bootstrap_templates_template_id");
var aN = aQ % 6;
var aR = Math.floor(aQ / 6);
for (var aS = 0; aS < 6; aS++) {
for (var aO = 0; aO < 6; aO++) {
var aP = aM.getElementById("jsplus_bootstrap_templates_cell_" + aS + "_" + aO + "_" + C(aI));
aP.style.opacity = (aS <= aN && aO <= aR) ? "1" : "0.45";
}
}
};
})();
}
}
}
function P(aF) {
if (m == 20 || m == 21 || m == 22) {
if (m == 20) {
aj["width_100"] = V(aF, "default_width_100");
}
aj["add_header"] = V(aF, "default_add_header");
if (m == 21) {
aj["striped"] = V(aF, "default_striped");
aj["bordered"] = V(aF, "default_bordered");
aj["condensed"] = V(aF, "default_condensed");
}
tableWidth = 154;
optionsWidth = 0;
if (V(aF, "show_options") === true) {
optionsWidth += 100;
tableWidth += 15;
if (V(aF, "show_advanced_options") === true) {
optionsWidth += 100;
}
tableWidth += optionsWidth;
}
av = tableWidth + 20;
aw = tableWidth + 40;
ap = 250;
}
if (m == 3) {
i = S(aF, "jsplus_bootstrap_templates");
av = V(aF, "popup_width");
aw = V(aF, "dialog_width");
ap = V(aF, "dialog_height");
} else {
if (m == 0) {} else {
if (m == 1) {
if (["xs", "sm", "md", "lg", "xl"].indexOf(V(aF, "default_col_type").toLowerCase()) != -1) {
aj["col-type"] = V(aF, "default_col_type").toLowerCase();
}
B = B.replace('jsplus_bootstrap_templates_radio_%id%"/> ' + aj["col-type"].toUpperCase(), 'jsplus_bootstrap_templates_radio_%id%" checked/> ' + aj["col-type"].toUpperCase());
} else {
if (m == 2) {
if (["small", "medium", "large"].indexOf(V(aF, "default_col_type").toLowerCase()) != -1) {
aj["col-type"] = V(aF, "default_col_type").toLowerCase();
}
} else {
if (m == 10) {} else {
if (m == 11) {} else {
if (m == 12) {}
}
}
}
}
}
}
y = "";
for (var aE = 0; aE < i.length; aE++) {
y += '' + i[aE][0].replace(/\{path\}/g, ax(aF)) + "
";
}
if (m == 20 || m == 21 || m == 22) {
D = D.replace(/%table_width%/g, tableWidth);
B = B.replace(/%options_width%/g, optionsWidth);
}
y = '" + '' + y + "
";
}
function s(aE, aF) {
K(aE, aF);
ag(aE);
}
function W(aG, aH) {
var aF = document.getElementsByClassName("jsplus_bootstrap_templates-template-" + C(aG));
for (var aE = 0; aE < aF.length; aE++) {
aF[aE].className = aF[aE].className.replace(/\s*jsplus_bootstrap_templates-selected/, "");
if (parseInt(aF[aE].getAttribute("data-jsplus_bootstrap_templates_template_id")) == aH) {
aF[aE].className += " jsplus_bootstrap_templates-selected";
}
}
}
function K(aL, aG) {
var aO = null;
var aI = false;
if (typeof(window["jsplus_bootstrap_templates_callback"]) != "undefined" && window["jsplus_bootstrap_templates_callback"] != null) {
aO = window["jsplus_bootstrap_templates_callback"]["func"];
aI = window["jsplus_bootstrap_templates_callback"]["reverseOrder"];
window["jsplus_bootstrap_templates_callback"] = null;
}
var aN = "html";
var aJ = i[aG][0].slice(0);
if (i[aG].length > 1) {
aJ = i[aG][1].slice(0);
if (i[aG].length > 2) {
aN = i[aG][2];
}
}
if (Object.prototype.toString.call(aJ) === "[object Array]") {
for (var aH = 0; aH < aJ.length; aH++) {
aJ[aH] = aJ[aH].replace(/\{path\}/g, ax());
}
} else {
aJ = aJ.replace(/\{path\}/g, ax());
}
if (aN == "table" && (m == 20 || m == 21 || m == 22)) {
var aK = aJ.split(",");
var aF = aK[0];
var aR = aK[1];
var aQ = [];
if (m == 21) {
aQ.push("table");
if (aj["striped"]) {
aQ.push("table-striped");
}
if (aj["bordered"]) {
aQ.push("table-bordered");
}
if (aj["condensed"]) {
aQ.push("table-condensed");
}
}
if (aj["class"].trim().length > 0) {
aQ.push(aj["class"].trim());
}
if (ak() == "ckeditor") {
aQ.push("cke_show_border");
}
var aP = aj["style"].trim();
if (m == 20 && aj["width_100"]) {
if (aP.length > 0 && aP.substr(aP.length - 1, 1) != ";") {
aP += "; ";
}
aP += "width: 100%";
}
aJ = " 0 ? (" class='" + aQ.join(" ") + "'") : "") + (aP.length > 0 ? (" style='" + aP + "'") : "") + ">\n";
if (aj["add_header"]) {
aJ += "\t\n\t\t\n";
for (var aH = 0; aH <= aF; aH++) {
aJ += "\t\t\t| | \n";
}
aJ += "\t\t
\n\t\n";
}
aJ += "\t\n";
for (var aE = 0; aE <= aR; aE++) {
aJ += "\t\t\n";
for (var aM = 0; aM <= aF; aM++) {
aJ += "\t\t\t| | \n";
}
aJ += "\t\t
\n";
}
aJ += "\t\n";
aJ += "
\n";
ar(aL, aJ);
} else {
if (aN == "text") {
ar(aL, "" + aJ + "");
} else {
if (aN == "html") {
if (m == 1) {
if (aj["col-type"] == "sm") {
aJ = aJ.replace(/col-/g, "col-sm-");
}
else
{
if (aj["col-type"] == "md") {
aJ = aJ.replace(/col-/g, "col-md-");
}
else
{
if (aj["col-type"] == "lg") {
aJ = aJ.replace(/col-/g, "col-lg-");
}
else
{
if (aj["col-type"] == "xl") {
aJ = aJ.replace(/col-/g, "col-xl-");
}
}
}
}
} else {
if (m == 2) {
if (aj["col-type"] != "small") {
aJ = aJ.replace(/small/g, aj["col-type"]);
}
}
}
ao(aL, aJ, aO);
}
}
}
}
function ao(aF, aE, aG) {
if (typeof(aG) == "undefined" || aG == null) {
ar(aF, aE);
} else {
o(aF, aG, aE);
}
}
function I(aE, aI, aG) {
if (typeof aI == "undefined") {
aI = true;
}
if (typeof aG == "undefined") {
aG = " ";
}
if (typeof(aE) == "undefined") {
return "";
}
var aJ = 1000;
if (aE < aJ) {
return aE + aG + (aI ? "b" : "");
}
var aF = ["K", "M", "G", "T", "P", "E", "Z", "Y"];
var aH = -1;
do {
aE /= aJ;
++aH;
} while (aE >= aJ);
return aE.toFixed(1) + aG + aF[aH] + (aI ? "b" : "");
}
function ad(aE) {
return aE.replace(/&/g, "&").replace(//g, ">").replace(/"/g, """).replace(/'/g, "'");
}
function au(aE) {
return aE.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
}
function ai(aE) {
var aF = document.createElement("div");
aF.innerHTML = aE;
return aF.childNodes;
}
function aq(aE) {
return aE.getElementsByTagName("head")[0];
}
function an(aE) {
return aE.getElementsByTagName("body")[0];
}
function aA(aG, aI) {
var aE = aG.getElementsByTagName("link");
var aH = false;
for (var aF = aE.length - 1; aF >= 0; aF--) {
if (aE[aF].href == aI) {
aE[aF].parentNode.removeChild(aE[aF]);
}
}
}
function ab(aH, aJ) {
if (!aH) {
return;
}
var aE = aH.getElementsByTagName("link");
var aI = false;
for (var aF = 0; aF < aE.length; aF++) {
if (aE[aF].href.indexOf(aJ) != -1) {
aI = true;
}
}
if (!aI) {
var aG = aH.createElement("link");
aG.href = aJ;
aG.type = "text/css";
aG.rel = "stylesheet";
aq(aH).appendChild(aG);
}
}
function l(aH, aJ) {
if (!aH) {
return;
}
var aE = aH.getElementsByTagName("script");
var aI = false;
for (var aG = 0; aG < aE.length; aG++) {
if (aE[aG].src.indexOf(aJ) != -1) {
aI = true;
}
}
if (!aI) {
var aF = aH.createElement("script");
aF.src = aJ;
aF.type = "text/javascript";
aq(aH).appendChild(aF);
}
}
function aB(aE, aG, aF) {
ab(b(aE), aG);
if (document != b(aE) && aF) {
ab(document, aG);
}
}
function ae(aE, aG, aF) {
l(b(aE), aG);
if (document != b(aE) && aF) {
l(document, aG);
}
}
function am(aF, aE) {
var aG = b(aF);
x(aG, aE);
}
function x(aG, aE) {
var aF = aG.createElement("style");
aq(aG).appendChild(aF);
aF.innerHTML = aE;
}
function at(aF, aE) {
if (aD(aF, aE)) {
return;
}
aF.className = aF.className.length == 0 ? aE : aF.className + " " + aE;
}
function ay(aG, aE) {
var aF = a(aG);
while (aF.indexOf(aE) > -1) {
aF.splice(aF.indexOf(aE), 1);
}
var aH = aF.join(" ").trim();
if (aH.length > 0) {
aG.className = aH;
} else {
if (aG.hasAttribute("class")) {
aG.removeAttribute("class");
}
}
}
function a(aE) {
if (typeof(aE.className) === "undefined" || aE.className == null) {
return [];
}
return aE.className.split(/\s+/);
}
function aD(aH, aE) {
var aG = a(aH);
for (var aF = 0; aF < aG.length; aF++) {
if (aG[aF].toLowerCase() == aE.toLowerCase()) {
return true;
}
}
return false;
}
function aC(aG, aH) {
var aF = a(aG);
for (var aE = 0; aE < aF.length; aE++) {
if (aF[aE].indexOf(aH) === 0) {
return true;
}
}
return false;
}
function Z(aG) {
if (typeof(aG.getAttribute("style")) === "undefined" || aG.getAttribute("style") == null || aG.getAttribute("style").trim().length == 0) {
return {};
}
var aI = {};
var aH = aG.getAttribute("style").split(/;/);
for (var aF = 0; aF < aH.length; aF++) {
var aJ = aH[aF].trim();
var aE = aJ.indexOf(":");
if (aE > -1) {
aI[aJ.substr(0, aE).trim()] = aJ.substr(aE + 1);
} else {
aI[aJ] = "";
}
}
return aI;
}
function ah(aG, aF) {
var aH = Z(aG);
for (var aE in aH) {
var aI = aH[aE];
if (aE == aF) {
return aI;
}
}
return null;
}
function ac(aH, aG, aE) {
var aI = Z(aH);
for (var aF in aI) {
var aJ = aI[aF];
if (aF == aG && aJ == aE) {
return true;
}
}
return false;
}
function A(aG, aF, aE) {
var aH = Z(aG);
aH[aF] = aE;
r(aG, aH);
}
function aa(aF, aE) {
var aG = Z(aF);
delete aG[aE];
r(aF, aG);
}
function r(aF, aH) {
var aG = [];
for (var aE in aH) {
aG.push(aE + ":" + aH[aE]);
}
if (aG.length > 0) {
aF.setAttribute("style", aG.join(";"));
} else {
if (aF.hasAttribute("style")) {
aF.removeAttribute("style");
}
}
}
function w(aI, aF) {
var aG;
if (Object.prototype.toString.call(aF) === "[object Array]") {
aG = aF;
} else {
aG = [aF];
}
for (var aH = 0; aH < aG.length; aH++) {
aG[aH] = aG[aH].toLowerCase();
}
var aE = [];
for (var aH = 0; aH < aI.childNodes.length; aH++) {
if (aI.childNodes[aH].nodeType == 1 && aG.indexOf(aI.childNodes[aH].tagName.toLowerCase()) > -1) {
aE.push(aI.childNodes[aH]);
}
}
return aE;
}
function ag() {}
function o(aF, aG, aE) {
CKEDITOR.tools.callFunction(aG, aE);
}
CKEDITOR.plugins.add("jsplus_bootstrap_templates", {
requires: "panelbutton,floatpanel",
lang: "en",
afterInit: function(aF) {
P(aF);
y = (D + y + B);
CKEDITOR.dialog.add("jsplus_bootstrap_templates-" + C(aF), function(aG) {
return {
resizable: 0,
width: aw,
minWidth: aw,
height: ap,
maxHeight: ap,
title: u(aG, "jsplus_bootstrap_templates_title"),
onShow: function() {
J(aG);
},
onOk: function() {
z(aG);
},
onCancel: function() {
az(aG);
},
contents: [{
id: "jsplus_bootstrap_templates-tab-" + C(aG),
expand: true,
focus: true,
elements: [{
type: "vbox",
padding: 10,
children: [{
type: "html",
html: ''
}]
}]
}]
};
});
if (H(aF)) {
var aE = aF.addCommand("jsplus_bootstrap_templates-" + C(aF), new CKEDITOR.dialogCommand("jsplus_bootstrap_templates-" + C(aF)));
aF.ui.addButton("jsplus_bootstrap_templates", {
label: u(aF, "jsplus_bootstrap_templates_title"),
title: u(aF, "jsplus_bootstrap_templates_title"),
icon: this.path + "/icons/jsplus_bootstrap_templates.png",
command: "jsplus_bootstrap_templates-" + C(aF)
});
} else {
aF.ui.add("jsplus_bootstrap_templates", CKEDITOR.UI_PANELBUTTON, {
icon: this.path + "icons/jsplus_bootstrap_templates.png",
label: u(aF, "jsplus_bootstrap_templates_title"),
command: "jsplus_bootstrap_templates",
modes: {
wysiwyg: 1
},
editorFocus: 0,
caption: null,
table: null,
panel: {
css: CKEDITOR.skin.getPath("editor"),
attributes: {
role: "listbox",
"aria-label": ""
}
},
onBlock: function(aG, aI) {
aI.autoSize = true;
aI.element.addClass("cke_colorblock");
k = aG;
j = aI.element.getDocument().$;
var aH = new CKEDITOR.dom.element("div");
aH.$.setAttribute("id", "jsplus_bootstrap_templates-popup-root-" + C(aF));
aH.$.setAttribute("style", ((typeof(av) == "undefined" && av != null) ? "" : "width:" + av + "px;") + "padding:10px");
aI.element.append(aH);
CKEDITOR.ui.fire("ready", this);
},
onOpen: function() {
d(aF);
}
});
}
}
});
})();