%PDF- %PDF-
Direktori : /usr/share/webmin/authentic-theme/extensions/csf/ |
Current File : //usr/share/webmin/authentic-theme/extensions/csf/csf.min.js |
/*! * Authentic Theme (https://github.com/authentic-theme/authentic-theme) * Copyright Ilia Rostovtsev <programming@rostovtsev.io> * Licensed under MIT (https://github.com/authentic-theme/authentic-theme/blob/master/LICENSE) */ var b=window,f=b,html=$("html"),r=$('link[href*="configserver"]'),empty=$("style:not([data-persist])"),v___theme_night_mode_enabled=$('html[data-bgs="nightRider"]').length&&$('link[href*="nightrider"]').length?1:0;function __c_____undel(t){CSFpause=1,b.CSFcreateRequestObject=function(){return!1},b.CSFsendRequest=function(){return!1},b.CSFhandleResponse=function(){return!1},b.CSFgrep=function(){return!1},b.CSFtimer=function(){return!1},b.CSFpausetimer=function(){return!1},b.CSFrefreshtimer=function(){return!1},b.windowSize=function(){return!1};var e="keydown.csf mousedown.csf click.csf click.csf2 click.csf3 click.csf4 click.csf5 click.csf6 click.csf7 click.csf8 click.csf9 ";$("html, body").off(e),$("html, body *").undelegate(e).unbind(e).off(e),Test.strContains(t,"/csf/")||"csf"!==v___module||"index.cgi"===t||$(".csf-container").removeClass("csf-container")}function csf_init(){function t(t,e){if(!i.find(".csf-container").find('textarea[name="formdata"]').length&&$("html[data-post]").attr("data-post"))if(i.find(".csf-container").find('pre:not(:contains("<---"))').length){t&&i.find(".csf-container").find("pre").css({position:"initial",left:"initial",opacity:"0"}),w(),i.find(".csf-container").find("pre").removeClass("text-center"),i.find(".csf-container").find("pre").each(function(n,a){var i=$(this),s=Convert.htmlStrip(i.html()),r=$.trim($("#CSFgrep:first").val());r&&r.length&&CodeMirror.defineMode("highlightSearch",function(t,e){var n={token:function(t,e){var n=t.string.match(new RegExp(r,"i"));if(n&&n[1]&&(r="",$.each(n,function(t,e){Test.numeric(t)&&t>0&&(r.length?r+="|"+e:r=e)})),r=new RegExp(r,"i"),t.match(r))return"highlightSearch";for(;null!=t.next()&&!t.match(r,!1););return null}};return CodeMirror.overlayMode(CodeMirror.getMode(t,e.backdrop),n)}),i.empty(),window["log_"+n]=window.CodeMirror(this,{value:s,lineNumbers:e,mode:r?"highlightSearch":null,theme:$.support.spa&&!f.v___theme_night_mode?f.settings_cm_editor_palette:"monokai",readOnly:!0,viewportMargin:1/0}),t&&window["log_"+n].setSize(null,content_page_calc_height("editor"))}).promise().done(function(){if(t&&(i.find(".csf-container").find("pre").css({position:"initial",left:"initial"}),i.find(".csf-container").find("pre").animate({opacity:1},175)),!t){var e=$("pre[style]").length;$.each($("pre[style]"),function(t,n){var a=content_page_calc_height("editor")/e,i=17*$(this).find(".CodeMirror-code").find("pre").length;i>a?window["log_"+t].setSize(null,a):window["log_"+t].setSize(null,i-10),$(n).height($(n).find(".CodeMirror").first().height()+4)})}"logtail"!=get_server_data("post")&&"loggrep"!=get_server_data("post")||$(".CodeMirror-scroll").scrollTop($(".CodeMirror-code").height())})}else{i.find(".csf-container").find("pre").css({position:"initial",left:"initial"}),"monokai"===f.settings_cm_editor_palette&&i.find(".csf-container").find("pre").addClass("no_data");var n=i.find(".csf-container").find("pre"),a='<i class="label text-center label-transparent-15">';n.addClass("text-center"),$is_lang?n.html(a+theme_language("global_empty").toUpperCase()+"</i>"):n.replaceText(/<---- /gi,"").replaceText(/ ---->/gi,"").wrapInner(a)}}"logtail"!=get_server_data("post")&&(CSFpause=1),"logtail"===get_server_data("post")&&($('button[onclick="CSFrefreshtimer()"], button[onclick="CSFpausetimer()"]').addClass("heighter-28"),setTimeout(function(){$('button[onclick="CSFrefreshtimer()"]').click()},1)),"function"==typeof CSFhandleResponse&&core.fnExtend("CSFhandleResponse",function(){4==CSFajaxHTTP.readyState&&200==CSFajaxHTTP.status&&(CSFajaxHTTP.responseText&&t(!1,!1))}),$is_lang=1;var e={order:[],aaSorting:[],bDestroy:!0,bPaginate:!1,bInfo:!1,destroy:!0,oLanguage:{sEmptyTable:f.theme_language("datatable_semptytable"),sInfo:f.theme_language("datatable_sinfo"),sInfoEmpty:f.theme_language("datatable_sinfoempty"),sLengthMenu:f.theme_language("datatable_slengthmenu"),sLoadingRecords:f.theme_language("datatable_sloadingrecords"),sProcessing:f.theme_language("datatable_sprocessing"),sSearch:" ",sZeroRecords:f.theme_language("datatable_szerorecords")},drawCallback:function(t){$('html[data-post="viewlogs"]').length&&$.each($(".table.table-striped.table-condensed tbody tr"),function(){var t=$(this);targ=t.find('td[style*="nowrap"] button[type="button"]').attr("onclick"),__id=targ?parseInt(targ.match(/\d+/)[0]):-1,$.grep($__submenus__,function(e){$(e).attr("id")=="s"+__id&&t.after($(e))})})}};function n(){setTimeout(function(){i.find(".csf-container").find(".panel-heading").prepend(' <div class="btn-group pull-right" style="position: absolute; right: 15px; top: 17px;"> <a class="btn btn-link text-lighter btn-filter-top-right text-decoration-none pull-left" > <label style="font-weight: 400"> <span class="fa fa-times-circle-o vertical-align-middle filter_mirror_clear text-lighter"></span> <input type="text" class="dataTable-mirror" placeholder="'+($is_lang?f.theme_language("filter_content"):"")+'"> </label> <i class="fa fa-filter"></i> </a> </div> '),i.find(".csf-container").find(".dataTables_filter").hide();var t=i.find(".csf-container").find(".btn-filter-top-right");t.unbind("click.csf"),t.on("click.csf",function(t){!$(t.target).is("input")&&$(this).find("label").slideToggle(300,function(){$(this).find("input").focus()})}),i.find(".csf-container").find(".dataTable-mirror").keyup(function(t){i.find(".csf-container").find(".dataTables_filter input").val($(this).val()).trigger("keyup"),$.trim($(this).val()).length>0?i.find(".csf-container").find(".btn-filter-top-right i").addClass("text-danger"):i.find(".csf-container").find(".btn-filter-top-right i").removeClass("text-danger")}),i.find(".csf-container").find(".btn-filter-top-right input").blur(function(t){$(this).parent("label").slideToggle(0)}),i.unbind("mousedown.csf"),$(".filter_mirror_clear").on("mousedown.csf",function(t){$(t.target).is(".filter_mirror_clear")&&page.render.content.filter.clear()}),i.unbind("keydown.csf"),i.on("keydown.csf",function(t){if(76==t.keyCode&&t.ctrlKey)return t.preventDefault(),t.stopPropagation(),void page.render.content.filter.clear();if(!f.$('aside input[name="search"]').is(":focus")){var e=t.keyCode?t.keyCode:t.which;if(!(i.find(".csf-container").find("input").is(":focus")||i.find(".csf-container").find("select").is(":focus")||i.find(".csf-container").find("textarea").is(":focus")||i.find(".csf-container").find(".modal.in").length)){var n=String.fromCharCode(e).toLowerCase();!n||!/[a-zA-Z0-9]/.test(n)||t.ctrlKey||t.altKey||t.metaKey||106===e||107===e||109===e||112===e||113===e||114===e||115===e||116===e||117===e||118===e||119===e||120===e||121===e||122===e||123===e||i.find(".csf-container").find(".dataTables_filter label input").length&&(i.find(".csf-container").find(".btn-filter-top-right").trigger("click"),i.find(".csf-container").find(".btn-filter-top-right .dataTable-mirror").focus().trigger("keyup"))}}})},0)}if((r=$('link[href*="configserver"], style:not([data-persist]), .csf a#toplink, .csf a#botlink, .csf div#loader, .csf a#webmintr2')).remove(),$.support.spa){var a=$('body:not(".mobile-menu-toggler")');a.unbind("click.csf9"),a.on("click.csf9",function(t){$(t.target).is('a[data-toggle="tab"]')||plugins.navigation.collapse()}),f.$("#open_webmin").length>0&&"open_webmin"!=f.$(".switch-toggle input:checked").attr("id")&&"1"==f.$("body").data("dashboard")&&plugins.navigation.switch.set("webmin"),f.$('a[href="csf/"]').parent("li").addClass("sub_active").append('<span class="current"></span>').parent("ul.sub").show().prev("li").addClass("active")}var i=$("html"),s=$("body"),o=$('body .container-fluid:not([data-dcontainer="1"])'),l=$("html").attr("data-post"),c=(c=$('.well.well-sm:contains("csf:")').text().match(/((?:(\d+)\.)?(?:(\d+)\.)?(\*|\d+))$/))&&c[0]?c[0]:"10.xx";o.removeClass().addClass("container-fluid-original"),o.wrapInner('<div class="panel panel-default panel-injected-custom">'),s.find(".panel-injected-custom").unwrap(),i.find(".container-fluid").addClass("csf-container"),i.find(".csf-container").find(".panel-default").wrapInner('<div class="panel-body">'),i.find(".csf-container").find(".panel-default:first").css("border-top-width","4px").prepend('<div class="panel-heading" style="text-align:center"><button class="fa fa-fw fa-inverse fa-2x fa-star-o text-lighter favorites xcustom-favorites'+($.support.spa?"":" hidden")+'"></button> <font size="+2">'+theme_language("global_firewall")+'</font><span style="font-size:14px;display:block">'+theme_language("csf")+" "+theme_language("global_version")+" "+c+"</span></div>"),i.find(".csf-container").find(".panel-heading + .panel-body > .panel:first").remove(),plugins.favorites.detect(),i.find(".csf-container").find(".nav.nav-tabs").addClass("hidden"),i.find(".csf-container").find('a[data-toggle="tab"][href="#other"]').parent("li").remove(),i.find(".csf-container").find(".nav.nav-tabs:hidden + .tab-content").attr("style","margin-top: -10px !important"),0===i.find(".csf-container").find('button[value="upgrade"]').length&&$("#upgradetable").remove(),i.find(".csf-container").find('a[href$="/csf/changelog.txt"]').addClass("btn btn-xxs btn-default _btn-changelog").html('<i class="fa fa-info-circle"></i>Changelog'),i.find("body table.table.table-bordered.table-striped").each(function(){$(this).addClass("table-condensed").removeClass("table-bordered").removeAttr("style")}),i.find(".csf-container").find("a#MobileView").parent(".panel-body").parent(".panel-body").parent(".panel").remove();var d=0;i.find(".csf-container").find(".mobilecontainer").length&&(d=1),i.find(".csf-container").find(".mobilecontainer").remove(),"undefined"==typeof settings_allowed_hostname&&(settings_allowed_hostname=!0);var p=d?i.find(".csf-container").find('.panel-heading:contains("Development Contribution")').parent().parent():i.find(".csf-container").find('.panel-heading:contains("Development Contribution")').parent(),g=get_server_data("hostname")==settings_allowed_hostname?1:0,h=i.find(".csf-container").find('.well.well-sm:contains("csf:")'),m=i.find(".csf-container").find('p:contains("©2006")');if(h.remove(),l){m.remove();var u=h.next("p");h.prev("br").remove(),u.addClass("text-right footer-string")}else g?d?p.remove():(p.parent().find('br, br + pre:contains("csf:")').remove(),p.parent().find("p").remove(),p.remove()):d?(p.find('br, br + pre:contains("csf:")').remove(),p.find(".panel-info").removeClass("panel-info").addClass("panel-default text-center margined-top-10 _devcon"),p.find("p").addClass("text-right footer-string")):(p.parent().find('br, br + pre:contains("csf:")').remove(),p.parent().find(".panel-info").removeClass("panel-info").addClass("panel-default text-center margined-top-10 _devcon"),p.parent().find("p").addClass("text-right footer-string"));get_server_data("post")&&$(".csf .footer-string").remove(),i.find(".csf-container").find('select:not([name="backup"], [name="profile1"], [name="profile2"], [name="do"], [name="dur"]), .csf input:not([name="comment"], [name="ip"], [name="ports"], [name="timeout"], [aria-controls*="DataTables_Table_"])').addClass("heighter-34");var b=i.find(".csf-container").find("select.heighter-34");b.nextAll("a.btn").add(b.prevAll("a.btn")).removeClass("heighter-28 btn btn-default").addClass("heighter-34 btn btn-default");var _=i.find(".csf-container").find('h4:contains("iptables logs*")');if(_.length){$(".panel-body .pull-right").addClass("hidden");var v=_.next().next(".table.table-striped.table-condensed");_.addClass("col_header_custom big_big"),_.find("b").css("margin-left","4px"),v.attr("style","margin-top: -8px !important"),v.find("tbody tr:nth-child(2) td:first-child").css("min-width","200px"),$__submenus__=$(".submenu").detach(),setTimeout(function(){i.find(".csf-container").find(".panel-heading").prepend(' <div class="btn-group pull-right" style="position: absolute; right: 15px; top: 17px;"> <a class="btn btn-link text-lighter btn-toggle-top-right text-decoration-none pull-left" data-toggle="tooltip" data-container="body"> <i class="fa fa-toggle-switch-off fa-1_25x"></i> </a> </div> ');var t=".btn-toggle-top-right";i.undelegate(t,"click.csf2"),i.find("body").on("click.csf2",t,function(t){t.preventDefault(),$(this).find(".fa-toggle-switch-off").length?(i.find(".csf-container").find('button[onclick*=".show()"]')[0].click(),i.find(".csf-container").find(".btn.btn-xxs.fa-1_25x").removeClass("fa-toggle-switch-off").addClass("fa-toggle-switch"),$(this).find(".fa-toggle-switch-off").removeClass("fa-toggle-switch-off").addClass("fa-toggle-switch")):(i.find(".csf-container").find('button[onclick*=".hide()"]')[0].click(),i.find(".csf-container").find(".btn.btn-xxs.fa-1_25x").removeClass("fa-toggle-switch").addClass("fa-toggle-switch-off"),$(this).find(".fa-toggle-switch").addClass("fa-toggle-switch-off").removeClass("fa-toggle-switch"))})},0),$('html[data-post="viewlogs"] button.glyphicon.glyphicon-resize-vertical').addClass("btn-xxs").removeClass("glyphicon glyphicon-resize-vertical").addClass("fa fa-toggle-switch-off fa-1_25x").removeAttr("data-tooltip").removeAttr("data-title").removeAttr("data-original-title");var C=".table.table-striped.table-condensed tbody tr";$("body").undelegate(C,"click.csf3"),$("body").on("click.csf3",C,function(t){$(this).find("button").trigger("click")});C=".btn.btn-xxs.fa-1_25x";$("body").undelegate(C,"click.csf4"),$("body").on("click.csf4",C,function(t){t.preventDefault(),t.stopImmediatePropagation(),$(this).hasClass("fa-toggle-switch-off")?$(this).removeClass("fa-toggle-switch-off").addClass("fa-toggle-switch"):$(this).removeClass("fa-toggle-switch").addClass("fa-toggle-switch-off")}),$(".table.table-striped.table-condensed").dataTable(e),n(),setTimeout(function(){$(".btn-filter-top-right").parent().css("right","58px")},100)}if(i.find(".csf-container").find('select[name="dur"]')[0]){var y=i.find(".csf-container").find('select[name="dur"]')[0].nextSibling;"."==y.nodeValue&&$(y).remove()}$('html[data-post="conf"] .csf form .comment > br:first-child').map(function(){this.previousSibling.nodeValue&&$(this.previousSibling).wrap('<span class="fst-ln-c">')});i.find(".csf-container").find("#paginatediv2.paginationstyle > select").each(function(){$(this).attr("style","vertical-align: top !important")}),i.find(".csf-container").find("#paginatediv2 > a").each(function(){$(this).attr("style","vertical-align: baseline !important")}),i.find(".csf-container").find("p > select").each(function(){$(this).attr("style","vertical-align: baseline !important")});var x=f.v___theme_night_mode_enabled||f.v___theme_night_mode?1:0;function w(){$(".container-fluid").removeClass("col-lg-10 col-lg-offset-1").addClass("margined-top-15")}if(i.find(".csf-container").find('img[src*="csfimages/loader.gif"]').each(function(){$(this).attr("src",($.support.spa?f.v___location_prefix:"")+"/images/loader-horizontal"+(x?"_dark":"")+".gif").css("margin-left","10px")}),i.find(".csf-container").find(".paginationstyle a").each(function(){$(this).addClass("btn btn-default")}),i.find(".csf-container").find('img[src^="lfd_"], img[src^="/csf/lfd_"]').each(function(){$(this).parents("table").removeClass("table-striped")}),i.find(".csf-container").find('img[src^="csfimages/delete.png"]').each(function(){$(this).replaceWith('<i class="fa fa-unlock text-success" style="font-size: 1.1em; vertical-align: middle;"></i>')}),i.find(".csf-container").find('img[src^="csfimages/perm.png"]').each(function(){$(this).replaceWith('<i class="fa fa-lock text-danger" style="font-size: 1.1em; vertical-align: middle;"></i>')}),i.find(".csf-container").find('img[src^="csfimages/plus.png"]').each(function(){$(this).addClass("hidden"),$(this).after('<i class="fa fa-plus-circle text-success margined-right-2" style="font-size: 1.1em;"></i>')}),i.find(".csf-container").find('img[src^="csfimages/minus.png"]').each(function(){$(this).addClass("hidden"),$(this).after('<i class="fa fa-minus-circle text-danger margined-right-2" style="font-size: 1.1em;"></i>')}),i.find(".csf-container").find("fieldset legend b").each(function(){$(this).text().indexOf("Edit ConfigServer Firewall")>=0&&($submit_changes=i.find(".csf-container").find('input[value="Change"]'),$submit_changes.addClass("csf-submit_changes"),$submit_changes.unbind("click.csf5"),$submit_changes.on("click.csf5",function(){i.find(".csf-container").find('input[value="saveconf"]').parent("form").submit()}))}),"undefined"!=typeof __csf__listen_log_grep&&clearInterval(__csf__listen_log_grep),i.find(".csf-container").find("#CSFgrep_D").length&&i.find(".csf-container").find("#CSFgrep_E").length&&i.find(".csf-container").find("#CSFgrep_i").length&&(i.find(".csf-container").find('select, input[type="text"], button[onclick="CSFgrep()"]').removeClass("heighter-34").addClass("heighter-28"),i.find(".csf-container").find("#CSFgrep_i, #CSFgrep_E, #CSFgrep_D").attr("style","vertical-align: middle; margin-right: 4px;"),i.find(".csf-container").find("#CSFajax").css("margin-bottom","4px")),i.find(".csf-container").find("#CSFajax.csf-box").addClass("csf_force_log_size"),"function"==typeof CodeMirror&&t(!1,!1),"function"==typeof window.CodeMirror&&function(){if($("html[data-post]").attr("data-post")){var t=i.find(".csf-container").find('textarea[name="formdata"]');t.length&&w(),t.each(function(t,e){var n=$(this);$parent_width=n.parent("td").width();var a=window.CodeMirror.fromTextArea(e,{mode:{name:"rpm-spec"},matchBrackets:!0,lineNumbers:!0,keyMap:"sublime",highlightSelectionMatches:{annotateScrollbar:!0},indentUnit:0,autofocus:!0,foldGutter:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter"],extraKeys:{"Ctrl-Space":"autocomplete","Shift-Meta-F":"replace","Shift-Ctrl-F":"replace"},styleActiveLine:!0,lineWrapping:!0,theme:$.support.spa&&!f.v___theme_night_mode?f.settings_cm_editor_palette:"monokai"});$window_height=content_page_calc_height("editor"),a.setSize($parent_width,$window_height),$(window).resize(function(){$parent_width=n.parent("td").width(),$window_height=content_page_calc_height("editor"),a.setSize($parent_width,$window_height)})})}}(),"fix"===get_server_data("post")){var k=$("button.confirmButton");k.off("click"),k.removeAttr("data-toggle data-target data-query type data-original-title title"),$.each(k,function(){$(this).attr("href",$(this).attr("data-href")),$(this).removeAttr("data-href"),$(this).removeClass("confirmButton").replaceTagName("a")})}if("viewports"===get_server_data("post")&&(i.find(".csf-container").find(".panel .panel-body table.table-striped").each(function(){i.find(".csf-container").find("h4").addClass("col_header_custom").attr("style","margin-bottom: -5px !important; margin-top: 2px !important"),i.find(".csf-container").find("h4").text("Ports listening for external connections"),$(this).dataTable(e)}),n()),"temp"===get_server_data("post")&&(i.find(".csf-container").find('table:not(:contains("©2006-"))').each(function(){$('html[data-post="temp"] tr td .btn').attr("data-placement","right"),$('html[data-post="temp"] tr td .btn').addClass("btn-xxs").find("span.glyphicon.glyphicon-ban-circle").removeClass("glyphicon glyphicon-ban-circle").addClass("fa fa-ban"),$('html[data-post="temp"] tr td .btn').find("span.glyphicon.glyphicon-ok-circle").removeClass("glyphicon glyphicon-ok-circle").addClass("fa fa-unlock"),$.each($('html[data-post="temp"] tr td a.btn'),function(t,e){$(this).attr("data-placement","right"),$(this).addClass("btn-xxs"),$(this).hasClass("btn-danger")&&$(this).addClass("margined-right-8")}),$(this).dataTable(e),setTimeout(function(){i.find(".csf-container").find(".dataTable thead tr th:eq(0)").addClass("no-controls")},10)}),n(),$('.dataTables_wrapper + div:contains("There are no temporary IP entries")').remove(),$('html[data-post="temp"] .dataTables_wrapper + div').find("a").addClass("btn-xxs btn-inverse").removeClass("btn-success").prepend('<i class="fa fa-fw fa-unlock"> </i>')),!get_server_data("post")){i.find(".csf-container").find('button[value="conf"]').prepend('<i class="fa fa-cog margined-right-5"></i>'),i.find(".csf-container").find('button[value="enable"]').addClass("page_footer_submit btn-success").removeClass("btn-default").prepend('<i class="fa fa-toggle-switch fa-1_25x margined-right-5"></i>'),i.find(".csf-container").find('button[value="disable"]').addClass("page_footer_submit btn-danger").removeClass("btn-default").prepend('<i class="fa fa-toggle-switch-off fa-1_25x margined-right-5"></i>'),i.find(".csf-container").find('button[value="restart"]').addClass("page_footer_submit btn-info").removeClass("btn-default").prepend('<i class="fa fa-circle-o-notch margined-right-5"></i>'),i.find(".csf-container").find('button[value="denyf"]').addClass("page_footer_submit btn-warning").removeClass("btn-default").prepend('<i class="fa fa-unlock margined-right-5"></i>');var S=i.find(".csf-container").find('[name="template"], [name="ignorefile"]');S.next().addClass("heighter-34").attr("style","min-height: 32px !important"),S.attr("style","margin-right: -2px !important"),S[1]&&S[1].length&&$(S[1]).attr("style","margin-right: -4px !important")}var T=$('p:contains("..."):contains("Done")');if(T.length||$('html[data-post="logtail"], html[data-post="allow"], html[data-post="deny"], html[data-post="redirect"], html[data-post="ignorefiles"], html[data-post="dirwatch"], html[data-post="dyndns"], html[data-post="templates"], html[data-post="logfiles"], html[data-post="blocklists"], html[data-post="syslogusers"]').length?($("#csfreturn").parent("form").parent("div").prev("hr").replaceTagName("br"),T.remove()):$('html[data-post="servercheck"], html[data-post="readme"], html[data-post="viewlogs"], html[data-post="chart"], html[data-post="loggrep"], html[data-post="viewports"], html[data-post="profiles"], html[data-post="status"], html[data-post="sips"], html[data-post="temp"]').length&&($('html[data-post="temp"]')&&$('a[href="index.cgi?action=temprm&ip=all"]').length||$("#csfreturn").parent("form").parent("div").prev("hr").replaceTagName("br")),"profiles"===get_server_data("post")){var F=$(".table.table-striped.table-condensed:first thead");F.find("th:last-child").remove(),F.find("th").attr("colspan","2")}var M=$("#csfreturn").length;$('#csfreturn, html[data-post="rblcheckedit"] input[value="rblcheck"] + input, html[data-post="serverchecksave"] input[value="servercheck"] + input, html[data-post="temprm"] input[value="temp"] + input, html[data-post="temptoperm"] input[value="temp"] + input ').replaceWith('<button type="submit" class="btn btn-'+(M?"primary":"primary margined-top-10")+' page_footer_submit"><i class="fa fa-fw fa-arrow-left"> </i> <span>'+(M?$is_lang?f.theme_language("global_return_to_module_index"):"Return to module index":$is_lang?f.theme_language("global_return"):"Return")+"</span></button>");var z=$('html input[value="lfdrestart"] + input, html input[value="restart"] + input, html input[value="restartboth"] + input'),D="Save",A="fa-circle-check";z.length&&(D=z.val(),A="fa-circle-o-notch");var R=$('input[value="Change"], html:not([data-post=""]) input[value="restartboth"] + input, html:not([data-post=""]) input[value="lfdrestart"] + input, html:not([data-post=""]) input[value="restart"] + input ');R.parents("form").nextAll("br").remove(),R.replaceWith('<button type="submit" class="btn btn-default page_footer_submit'+(z.length?" __restart":"")+'"><i class="fa fa-fw '+A+'"> </i> '+D+"</button>");var E=".panel-heading font",I=E+" + .circles",P=$(".bs-callout:visible");if(P.length&&!$(I).length&&$(E).after('<span class="circles"></span>'),$.each(P,function(){var t=$.trim($(this).attr("class").replace("bs-callout","").replace("bs-callout-","").replace("text-center","").replace("collapse","")),e=$(this).text(),n=$('html[data-post="viewlogs"]').length&&!i.find(".csf-container table").length;e&&!n?($(I).prepend('<span data-toggle="tooltip" data-container="body" data-html="true" data-placement="bottom" data-title="'+e+'" class="circle '+t+'"><i class="fa fa-'+("warning"==t||"danger"==t?"exclamation-circle":"info"==t?"info-circle":"check-circle")+'"></i></span>'),$(this).remove()):n&&$(this).removeClass()}),""!==$("html").attr("data-post")){if(i.find(".csf-container").find(".btn-primary.page_footer_submit").length){i.find(".csf-container").find(".panel-heading font").before('<a data-toggle="tooltip" data-container="body" data-html="true" data-placement="auto top" title="'+$.trim($(".page_footer_submit.btn-primary:first").text())+'" href="'+v___location_prefix+'/csf/index.cgi" class="btn btn-link footer_module_index_top btn-squiare-headln2 text-lighter-slight"><i class="fa fa-return"></i></a>');$("body").undelegate(".footer_module_index_top","click.csf6"),$("body").on("click.csf6",".footer_module_index_top",function(t){t.preventDefault(),$("body").find(".btn.btn-primary.page_footer_submit").after('<input type="submit" class="submit_tmp_index hidden">'),$(".submit_tmp_index").trigger("click")})}}else{var j=i.find(".csf-container").find('button[value="conf"]'),L=(j.text(),j.parent("form").parent("td").parent("tr").addClass("hidden").detach()),q=$('#home form[action="index.cgi"] table').length,K=i.find(".csf-container").find('button[value="readme"]');K.text(),K.parent("td").parent("tr").addClass("hidden").detach();$("#csf > table > tbody").append(L),i.find(".csf-container").find(".panel-heading font").before('<div class="btn-group btn-group-csf-home"><a href="/" data-toggle="tooltip" data-container="body" data-html="true" data-placement="auto top" title="'+($is_lang?f.theme_language("global_module_config"):"Module config")+'" class="btn btn-link text-lighter ported_module_csf_conf"><i class="fa fa-cog"></i></a><a href="/" data-toggle="tooltip" data-container="body" data-html="true" data-placement="auto top" title="'+($is_lang?f.theme_language("global_help"):"Module help")+'" class="btn btn-link text-lighter ported_module_csf_help"><i class="fa fa-question-circle"></i></a></div>');C="a.ported_module_csf_conf";$("body").undelegate(C,"click.csf7"),$("body").on("click.csf7",C,function(t){t.preventDefault(),j.after('<input name="action" value="conf" type="hidden">').trigger("click")});C="a.ported_module_csf_help";$("body").undelegate(C,"click.csf8"),$("body").on("click.csf8",C,function(t){t.preventDefault(),j.after('<input name="action" value="readme" type="hidden">').trigger("click")}),q||i.find(".csf-container").find("#home").remove()}if("conf"==$("html").attr("data-post")){var N=$(".csf-container").find('[name="STYLE_CUSTOM_"], [name="STYLE_MOBILE_"]').parents(".value-default"),O=N.prev(".comment");N.add(O).addClass("hidden")}"fixnuclear"==$("html").attr("data-post")&&$.post(v___location_prefix+"/index.cgi/?xhr-csf-unload=1");var W=$(".page_footer_submit.btn-primary").parent("form").parent("div");W.prev("hr").remove();var B=W.addClass("margined-bottom-20").detach();i.find(".csf-container").append(B),theme_title_generate()}f.v___initial_load=0,empty.remove(),r.remove();