mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-07 05:45:59 +01:00
feature: ref https://github.com/usmannasir/cyberpanel/issues/189 create alias via enter
This commit is contained in:
@@ -2823,6 +2823,9 @@ app.controller('manageCronController', function ($scope, $http) {
|
||||
|
||||
app.controller('manageAliasController', function ($scope, $http, $timeout, $window) {
|
||||
|
||||
$('form').submit(function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
var masterDomain = "";
|
||||
|
||||
@@ -2835,6 +2838,14 @@ app.controller('manageAliasController', function ($scope, $http, $timeout, $wind
|
||||
$scope.manageAliasLoading = true;
|
||||
$scope.operationSuccess = true;
|
||||
|
||||
$scope.createAliasEnter = function ($event) {
|
||||
var keyCode = $event.which || $event.keyCode;
|
||||
if (keyCode === 13) {
|
||||
$scope.manageAliasLoading = false;
|
||||
$scope.addAliasFunc();
|
||||
}
|
||||
};
|
||||
|
||||
$scope.showAliasForm = function (domainName) {
|
||||
|
||||
$scope.domainAliasForm = false;
|
||||
|
||||
@@ -2823,6 +2823,9 @@ app.controller('manageCronController', function ($scope, $http) {
|
||||
|
||||
app.controller('manageAliasController', function ($scope, $http, $timeout, $window) {
|
||||
|
||||
$('form').submit(function (e) {
|
||||
e.preventDefault();
|
||||
});
|
||||
|
||||
var masterDomain = "";
|
||||
|
||||
@@ -2835,6 +2838,14 @@ app.controller('manageAliasController', function ($scope, $http, $timeout, $wind
|
||||
$scope.manageAliasLoading = true;
|
||||
$scope.operationSuccess = true;
|
||||
|
||||
$scope.createAliasEnter = function ($event) {
|
||||
var keyCode = $event.which || $event.keyCode;
|
||||
if (keyCode === 13) {
|
||||
$scope.manageAliasLoading = false;
|
||||
$scope.addAliasFunc();
|
||||
}
|
||||
};
|
||||
|
||||
$scope.showAliasForm = function (domainName) {
|
||||
|
||||
$scope.domainAliasForm = false;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label">{% trans "Alias Domain" %}</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="text" class="form-control ng-pristine ng-untouched ng-not-empty ng-valid ng-valid-required" ng-model="aliasDomain" required="">
|
||||
<input ng-keypress="createAliasEnter($event)" type="text" class="form-control ng-pristine ng-untouched ng-not-empty ng-valid ng-valid-required" ng-model="aliasDomain" required="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user