File manager - Edit - /usr/local/cpanel/whostmgr/docroot/templates/configure_cpanel_analytics/views/mainController.min.js
Back
define(["angular","cjt/util/locale","ngSanitize","uiBootstrap","cjt/directives/toggleSwitchDirective","cjt/services/alertService","app/services/analyticsService"],(function(angular,LOCALE){"use strict";angular.module("whm.configureAnalytics.mainController",["ngSanitize","ui.bootstrap.collapse","whm.configureAnalytics.analyticsService","cjt2.directives.toggleSwitch","cjt2.services.alert"]).controller("mainController",["PAGE","analyticsService","alertService","$q",MainController]);function MainController(PAGE,analyticsService,alertService,$q){this.analyticsService=analyticsService;this.alertService=alertService;this.$q=$q;this.isUserChoiceEnabled=PAGE.isUserChoiceEnabled;this.isEnabledForCurrentUser=PAGE.isEnabledForUser;this.defaultToOn=PAGE.defaultToOn;this.isRootUser=PAGE.isRootUser;this.isCollapsed=true}angular.extend(MainController.prototype,{toggleInterfaceAnalytics:function(){var self=this;this.isUserChoiceEnabled=!this.isUserChoiceEnabled;return this.analyticsService.setInterfaceAnalytics(this.isUserChoiceEnabled).catch((function failure(error){if(self.isUserChoiceEnabled){self.alertService.add({message:LOCALE.maketext("The system failed to enable Interface Analytics participation: [_1]",error),type:"danger",closeable:true,id:"interface-analytics-enable-failed"})}else{self.alertService.add({message:LOCALE.maketext("The system failed to disable Interface Analytics participation: [_1]",error),type:"danger",closeable:true,id:"interface-analytics-disable-failed"})}self.isUserChoiceEnabled=!self.isUserChoiceEnabled;return self.$q.reject(error)}))},toggleIsCollapsed:function(){this.isCollapsed=!this.isCollapsed}});return MainController}));
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings