Viewing File: /usr/local/cpanel/base/frontend/jupiter/domains/views/listDomains.min.js
define(["angular","cjt/util/locale","app/services/domains","cjt/services/cpanel/componentSettingSaverService"],(function(e,s){"use strict";var t=e.module("cpanel.domains"),a="listDomainsView";return t.controller("listDomains",["$scope","$location","$filter","componentSettingSaverService","currentDomains","ITEM_LISTER_CONSTANTS","PAGE",function(t,o,i,n,d,l,r){var c=[],m="hideAssociatedSubdomains",u="showAssociatedSubdomains",b=d.some((function(e){return!!e.associatedAddonDomain}));function S(e){return!!t.showAssociatedSubdomains||!e.associatedAddonDomain}var h=!0;function f(){var e=i("filter")(d,S);h=t.showAssociatedSubdomains,t.filteredDomains=e}function A(){t.showAssociatedSubdomains=!t.showAssociatedSubdomains,n.set(a,{showAssociatedSubdomains:t.showAssociatedSubdomains}),f(),T()}function T(){c.splice(0),b&&(t.showAssociatedSubdomains?c.push({label:s.maketext("Hide Associated Subdomains"),event:m}):c.push({label:s.maketext("Show Associated Subdomains"),event:u}))}t.$on(l.TABLE_ITEM_BUTTON_EVENT,(function(e,s){if("manage"===s.actionType)t=s.item.domain,o.path("manage").search("domain",t);var t})),t.$on(l.ITEM_LISTER_UPDATED_EVENT,(function(e,s){t.itemListerMeta=s.meta,t.currentSearchFilterValue=t.itemListerMeta.filterValue})),t.$on(u,A),t.$on(m,A),t.domains=d,t.filteredDomains=d,t.showAssociatedSubdomains=!1,t.tableHeaderItems=[],t.tableHeaderItems.push({field:"batchSelect",sortable:!1,label:null}),t.tableHeaderItems.push({field:"domain",sortable:!0,label:s.maketext("Domain")}),r.hasWebServerRole&&(t.tableHeaderItems.push({field:"documentRoot",sortable:!0,label:s.maketext("Document Root"),hiddenInSmall:!0}),t.tableHeaderItems.push({field:"redirectsTo",sortable:!0,label:s.maketext("Redirects To"),hiddenInSmall:!0}),t.tableHeaderItems.push({field:"HTTPSRedirect",sortable:!0,label:s.maketext("Force HTTPS Redirect"),hiddenInSmall:!0})),t.tableHeaderItems.push({field:"actions",label:s.maketext("Actions"),hiddenInSmall:!0}),T(),e.extend(t,{getFilteredDomains:function(){return h!==t.showAssociatedSubdomains&&f(),t.filteredDomains},showAssociatedSubdomains:!1,toggleShowAssociatedSubdomains:A,tableConfigurationOptions:c});var p=n.register(a);p&&p.then((function(e){e&&t.showAssociatedSubdomains!==e.showAssociatedSubdomains&&(t.showAssociatedSubdomains=e.showAssociatedSubdomains,f(),T())})),t.$on("$destroy",(function(){n.unregister(a)}))}])}));
Back to Directory
File Manager