From d3fe4bbae51d514aa358b45eaf53684ce0513b29 Mon Sep 17 00:00:00 2001 From: usmannasir Date: Fri, 23 May 2025 12:55:37 +0500 Subject: [PATCH] improved websites list --- .../websiteFunctions/websiteFunctions.js | 36 + .../websiteFunctions/listWebsites.html | 653 +++++++----------- 2 files changed, 291 insertions(+), 398 deletions(-) diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index f84242c13..1c9ccbeb7 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -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; diff --git a/websiteFunctions/templates/websiteFunctions/listWebsites.html b/websiteFunctions/templates/websiteFunctions/listWebsites.html index bce128bf9..b209fb151 100755 --- a/websiteFunctions/templates/websiteFunctions/listWebsites.html +++ b/websiteFunctions/templates/websiteFunctions/listWebsites.html @@ -65,15 +65,12 @@

{% trans "On this page you can launch, list, modify and delete websites from your server." %}

-
- +
+
+
-
-
- @@ -82,239 +79,75 @@
-
-
-
- -
-
-
-

- - - {$ web.domain $} - - - - -

-
- +
+
+
+ + {$ web.domain $} + +
+
+ +
- - -
+
+
+
+ {$ web.domain $} +
+ {% trans 'Visit Site' %} + {% trans 'Issue SSL' %} + +
+
+
+
+
{$ web.state $}
+
{$ web.ipAddress $}
+
{$ web.phpVersion $}
+
+
+
{$ web.diskUsed $}
+
{$ web.package $}
+
{$ web.admin $}
+
+
+
+ +
+
{% trans 'WordPress Sites' %} {$ web.wp_sites.length $}
+
- -
- {$ web.domain $} -
- - Visit Site - - - {% trans "Issue SSL" %} - + - - -
+
-
-
- - {$ web.state $} -
-
-
-
- - {$ web.ipAddress $} -
-
-
-
- - {$ web.phpVersion $} -
-
-
-
- - {$ web.diskUsed $} -
-
+
{$ wp.version || 'Loading...' $}
+
{$ wp.phpVersion || 'Loading...' $}
+
{$ wp.theme || 'Loading...' $}
+
{$ wp.activePlugins || '0' $} active
-
-
-
- - {$ web.package $} -
-
-
-
- - {$ web.admin $} -
+
+
+
+
-
- -
- {$ (web.wp_sites && web.wp_sites.length) || 0 $} sites - -
-
+
+
- - -
-
- WordPress Sites ({$ web.wp_sites.length $}) -
-
-
-
-
-
-
-

- - {$ wp.title $} - - - -

-
-
- - -
-
-
-
-
- -
-
-
-
- - {$ wp.version || 'Loading...' $} - -
-
-
-
- - {$ wp.phpVersion || 'Loading...' $} - -
-
-
-
- - {$ wp.theme || 'Loading...' $} - -
-
-
-
- - {$ wp.activePlugins || '0' $} active - -
-
-
-
-
-
- -
-
- -
-
-
-
- -
-
- -
-
-
-
-
-
-
-
-
+
+ +
@@ -332,234 +165,258 @@
-
-
+
- +
+
+
+
+
-
-
-
-
-
-