From 2be1b8d20cb753c1a59b877029966483fc629f5e Mon Sep 17 00:00:00 2001 From: usmannasir Date: Mon, 7 Apr 2025 15:19:54 +0500 Subject: [PATCH] add wp loader --- .../static/websiteFunctions/websiteFunctions.js | 17 ++++++++++++----- .../templates/websiteFunctions/WPsiteHome.html | 2 +- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/websiteFunctions/static/websiteFunctions/websiteFunctions.js b/websiteFunctions/static/websiteFunctions/websiteFunctions.js index ec97c4d02..e5829e3f3 100755 --- a/websiteFunctions/static/websiteFunctions/websiteFunctions.js +++ b/websiteFunctions/static/websiteFunctions/websiteFunctions.js @@ -662,7 +662,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo $scope.wordpresshomeloading = false; $('#wordpresshomeloading').show(); - var url = "/websites/UpdateWPSettings"; if (setting === "PasswordProtection") { @@ -673,7 +672,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo PPUsername: $scope.PPUsername, PPPassword: $scope.PPPassword, } - } else { var data = { WPid: $('#WPid').html(), @@ -681,9 +679,13 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo PPUsername: '', PPPassword: '', } - } - + } else if (setting === 'search-indexing') { + var data = { + WPid: $('#WPid').html(), + setting: setting, + settingValue: $scope.searchIndexEnabled ? 1 : 0 + } } else { var settingValue = 0; if ($('#' + setting).is(":checked")) { @@ -696,7 +698,6 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo } } - var config = { headers: { 'X-CSRFToken': getCookie('csrftoken') @@ -4284,6 +4285,12 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo } + } else if (setting === 'search-indexing') { + var data = { + WPid: $('#WPid').html(), + setting: setting, + settingValue: $scope.searchIndexEnabled ? 1 : 0 + } } else { var settingValue = 0; if ($('#' + setting).is(":checked")) { diff --git a/websiteFunctions/templates/websiteFunctions/WPsiteHome.html b/websiteFunctions/templates/websiteFunctions/WPsiteHome.html index 81ca0fedc..34261b536 100644 --- a/websiteFunctions/templates/websiteFunctions/WPsiteHome.html +++ b/websiteFunctions/templates/websiteFunctions/WPsiteHome.html @@ -241,7 +241,7 @@
Search Engine Indexing
-