improved websites list

This commit is contained in:
usmannasir
2025-05-23 12:55:37 +05:00
parent 8786478d1e
commit d3fe4bbae5
2 changed files with 291 additions and 398 deletions

View File

@@ -2418,6 +2418,10 @@ app.controller('listWebsites', function ($scope, $http, $window) {
$scope.WebSitesList = JSON.parse(response.data.data);
$scope.pagination = response.data.pagination;
$("#listFail").hide();
// Expand the first site by default
if ($scope.WebSitesList.length > 0) {
$scope.expandedSites[$scope.WebSitesList[0].domain] = true;
}
} else {
$("#listFail").fadeIn();
$scope.errorMessage = response.data.error_message;
@@ -2944,6 +2948,16 @@ app.controller('listWebsites', function ($scope, $http, $window) {
};
$scope.goToManage = function($event, domain) {
$event.stopPropagation();
window.location = '/websites/' + domain;
};
$scope.goToFileManager = function($event, domain) {
$event.stopPropagation();
window.location = '/filemanager/' + domain;
};
});
/**
@@ -5589,6 +5603,10 @@ app.controller('listWebsites', function ($scope, $http, $window) {
$scope.WebSitesList = JSON.parse(response.data.data);
$scope.pagination = response.data.pagination;
$("#listFail").hide();
// Expand the first site by default
if ($scope.WebSitesList.length > 0) {
$scope.expandedSites[$scope.WebSitesList[0].domain] = true;
}
} else {
$("#listFail").fadeIn();
$scope.errorMessage = response.data.error_message;
@@ -9107,6 +9125,10 @@ app.controller('listWebsites', function ($scope, $http, $window) {
$scope.WebSitesList = JSON.parse(response.data.data);
$scope.pagination = response.data.pagination;
$("#listFail").hide();
// Expand the first site by default
if ($scope.WebSitesList.length > 0) {
$scope.expandedSites[$scope.WebSitesList[0].domain] = true;
}
} else {
$("#listFail").fadeIn();
$scope.errorMessage = response.data.error_message;
@@ -9556,6 +9578,16 @@ app.controller('listWebsites', function ($scope, $http, $window) {
});
};
$scope.goToManage = function($event, domain) {
$event.stopPropagation();
window.location = '/websites/' + domain;
};
$scope.goToFileManager = function($event, domain) {
$event.stopPropagation();
window.location = '/filemanager/' + domain;
};
});
app.controller('listChildDomainsMain', function ($scope, $http, $timeout) {
@@ -9589,6 +9621,10 @@ app.controller('listChildDomainsMain', function ($scope, $http, $timeout) {
$scope.pagination = response.data.pagination;
$scope.clients = JSON.parse(response.data.data);
$("#listFail").hide();
// Expand the first site by default
if ($scope.WebSitesList.length > 0) {
$scope.expandedSites[$scope.WebSitesList[0].domain] = true;
}
} else {
$("#listFail").fadeIn();
$scope.errorMessage = response.data.error_message;