PATH:
home
/
letacommog
/
letaweb
/
scripts
/
editor
/
settings
define([], function() { return function($scope, communication, popup_form) { if(window.max_domain_count==0) return; $scope.domains = []; $scope.domain_count=0; $scope.max_domain_count = window.max_domain_count; $scope.unlimited = window.max_domain_count<0; communication.api('getDomain',{},'settings.domain').then(function(json) { $scope.domains = json; $scope.domain_count = json.length; }); $scope.add = function() { if($scope.max_domain_count>= 0 && $scope.max_domain_count < $scope.domain_count) { alert(window.t("LBL_MAX_DOMAIN_LIMITED")); return; } popup_form.open({ name:'domain', execute_path:'settings.domain', form_name:'DomainForm', controller:function($scope) { } }).result.then(function(data) { alert(window.t("LBL_CREATE_DOMAIN_SUCCESS")); $scope.domains.push(data.name); $scope.domain_count = $scope.domains.length; }); } $scope.deleteDomain = function(index) { if(confirm(window.t('LBL_DELETE_DOMAIN_CONFIRM_MESSAGE'))) communication.api('deleteDomain',{domain:$scope.domains[index]},'settings.domain').then(function(json) { $scope.domains.splice(index,1); $scope.domain_count = $scope.domains.length; }); } } });
[+]
..
[-] domain.js
[edit]
[-] contributor.js
[edit]
[-] code_injection.js
[edit]
[-] billing.js
[edit]
[-] general.js
[edit]