File manager - Edit - /usr/local/cpanel/whostmgr/docroot/templates/cpanel_customization/views/jupiter/linksController.min.js
Back
define(["lodash","angular","cjt/util/locale","cjt/directives/autoFocus","cjt/decorators/growlDecorator","app/services/customizeService","app/services/savedService"],(function(_,angular,LOCALE){"use strict";var module=angular.module("customize.views.linksController",["customize.services.customizeService","customize.services.savedService"]);var controller=module.controller("linksController",["$scope","customizeService","savedService","growl","growlMessages","PAGE",function($scope,customizeService,savedService,growl,growlMessages,PAGE){$scope.saving=false;$scope.urlRegex=/^(https?):\/\/(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\\d:]+])(?::\\d+)?(?:\/[^?#]*)?(?:\\?[^#]*)?(?:#.*)?$/i;$scope.model={help:PAGE.data.jupiter.help?angular.copy(PAGE.data.jupiter.help):{url:""},documentation:PAGE.data.jupiter.documentation?angular.copy(PAGE.data.jupiter.documentation):{url:""}};$scope.initialHelpLink=$scope.model.help["url"];$scope.initialDocumentationLink=$scope.model.documentation["url"];$scope.$watchGroup(["model.help.url","model.documentation.url"],(function(newValues){var helpLinkChanged=newValues[0]!==$scope.initialHelpLink;var documentationLinkChanged=newValues[1]!==$scope.initialDocumentationLink;if(!helpLinkChanged&&!documentationLinkChanged){growlMessages.destroyAllMessages();savedService.update("links",false);$scope.customization.$setPristine()}else{savedService.update("links",$scope.customization.$dirty)}}),false);$scope.save=function($formCtrl){growlMessages.destroyAllMessages();if(!$formCtrl.$valid){growl.error(LOCALE.maketext("The current customization is invalid."));return}if($scope.saving){growl.warning(LOCALE.maketext("The system is busy. Try again once the current operation is complete."));return}$scope.saving=true;customizeService.update({documentation:{url:$scope.model.documentation.url},help:{url:$scope.model.help.url}}).then((function(response){PAGE.data.jupiter.documentation.url=$scope.model.documentation.url;PAGE.data.jupiter.help.url=$scope.model.help.url;$formCtrl.$setPristine();savedService.update("links",false);growl.success(LOCALE.maketext("The system successfully updated your links."))})).catch((function(error){growl.error(LOCALE.maketext("The system failed to update your links."))})).finally((function(){$scope.saving=false}))}}]);return controller}));
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings