Viewing File: /usr/local/cpanel/base/frontend/jupiter/indexmanager/index.min.js

define(["jquery","bootstrap"],(function(e){"use strict";var o=e("#ddlDomainSelect");function i(e){e&&(window.location.href=window.location.href.split("?")[0])}function n(e){e&&t(e[0].docroot)}function t(e){var o,i,n,t,d;e=encodeURIComponent(e);window.location.href=(o=window.location.href,i="dir",n=e,t=new RegExp("([?&])"+i+"=.*?(&|$)","i"),d=-1!==o.indexOf("?")?"&":"?",o.match(t)?o.replace(t,"$1"+i+"="+n+"$2"):o+d+i+"="+n)}e("#modalSettings").on("shown.bs.modal",(function(){setTimeout((function(){var o=e("input[name=dirselect]:checked");o.length?o.focus():e("#dirselect_home").focus()}),5)})),e("#btnSettingsSave").click((function(d){d.preventDefault();var c=e("input[name=dirselect]:checked").val(),a=o.val(),s=e("#settings_saved").is(":checked");s?SetNvData("optionselect_index",c+":"+a+":"+(s?"1":"0"),i):"home"===c?t(PAGE.homeFolder):"webroot"===c?t(PAGE.pubHtmlFolder):cpanel_jsonapi2(n,"DomainLookup","getdocroot","domain",a)}));var d=e("#dirselect_webroot");d.change((function(){d.is(":checked")?o.prop("disabled",!0):o.prop("disabled",!1)}));var c=e("#dirselect_home");c.change((function(){c.is(":checked")?o.prop("disabled",!0):o.prop("disabled",!1)}));var a=e("#optionselect_domainrootselect_radio");a.change((function(){a.is(":checked")?o.prop("disabled",!1):o.prop("disabled",!0)}));var s=e("#example-index-files");e("#toggle-example-index-files").click((function(){s.hasClass("hidden")?(s.removeClass("hidden"),this.innerText=PAGE.hideLabel):(s.addClass("hidden"),this.innerText=PAGE.showLabel)}))}));
Back to Directory File Manager