File manager - Edit - /usr/local/cpanel/whostmgr/docroot/templates/set_zone_ttls/index.min.js
Back
define(["angular","cjt/util/locale","cjt/core","cjt/modules","angular-ui-scroll"],(function(angular,LOCALE,CJT){"use strict";return function(){angular.module("whm.setZoneTtl",["cjt2.config.whm.configProvider","cjt2.whm","ui.scroll"]);var app=require(["cjt/bootstrap","cjt/directives/searchDirective","cjt/validator/datatype-validators"],(function(BOOTSTRAP){var app=angular.module("whm.setZoneTtl");app.value("PAGE",PAGE);app.controller("listZones",["$scope","$filter","PAGE",function($scope,$filter,PAGE){var zones=PAGE.domains;var filteredZones=zones;var selectedCount=0;var lastDescriptor=null;var zoneChoiceViewport=angular.element("#zoneChoiceViewport");$scope.ttl=14400;$scope.hasZones=zones.length>0;$scope.showSelectionValidationMsg=false;$scope.selectedItems={};$scope.zonesDatasource={get:function(descriptor,success){var result=filteredZones.slice(Math.max(descriptor.index,0),descriptor.index+descriptor.count);success(result);lastDescriptor=descriptor;lastDescriptor.position=zoneChoiceViewport.scrollTop()}};$scope.updateShowingText=function(){$scope.showingText=LOCALE.maketext("Showing [numf,_1] of [numf,_2] records.",filteredZones.length,zones.length)};$scope.searchFilterChanged=function(){fetch()};$scope.onSelectItem=function(zone){if($scope.selectedItems[zone]){selectedCount++}else{selectedCount--;delete $scope.selectedItems[zone]}$scope.showSelectionValidationMsg=selectedCount<=0};$scope.validateForm=function(event,form){if(selectedCount<=0){$scope.showSelectionValidationMsg=true}if(selectedCount<=0||!form.$valid){event.preventDefault();return false}return true};function checkForReload(){if(!lastDescriptor){return}var newFirstItem=-1;var maxLoaded=lastDescriptor.index+lastDescriptor.count;var position=zoneChoiceViewport.scrollTop();if(position===0){newFirstItem=0}else{var percScrolled=lastDescriptor.position/position;newFirstItem=maxLoaded*percScrolled}if(maxLoaded-newFirstItem>200){newFirstItem=Math.max(newFirstItem,0);$scope.uiScrollAdapter.reload(newFirstItem)}}function filterZones(zones){var filteredZones=zones;if($scope.filterValue){filteredZones=$filter("filter")(filteredZones,$scope.filterValue)}return filteredZones}function fetch(){var newZones=zones;newZones=filterZones(newZones);var zonesChanged=filteredZones.length!==zones.length||newZones.length!==filteredZones.length;if(zonesChanged){filteredZones=newZones;if($scope.uiScrollAdapter&&angular.isFunction($scope.uiScrollAdapter.reload)){$scope.uiScrollAdapter.reload(0)}}$scope.updateShowingText()}function init(){fetch();zoneChoiceViewport.bind("scroll",checkForReload)}init()}]);var appContent=angular.element("#pageContainer");if(appContent[0]!==null){BOOTSTRAP(appContent[0],"whm.setZoneTtl")}}));return app}}));
| ver. 1.4 |
Github
|
.
| PHP 8.1.34 | Generation time: 0.03 |
proxy
|
phpinfo
|
Settings