fetch search index change settings

This commit is contained in:
usmannasir
2025-04-07 15:24:12 +05:00
parent 171947c6c4
commit 5aac3594b0
2 changed files with 9 additions and 19 deletions

View File

@@ -680,15 +680,11 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
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")) {
if (setting === 'searchIndex') {
settingValue = $scope.searchIndexEnabled ? 1 : 0;
} else if ($('#' + setting).is(":checked")) {
settingValue = 1;
}
var data = {
@@ -704,10 +700,8 @@ app.controller('WPsiteHome', function ($scope, $http, $timeout, $compile, $windo
}
};
$http.post(url, data, config).then(ListInitialDatas, cantLoadInitialDatas);
function ListInitialDatas(response) {
$scope.wordpresshomeloading = true;
$('#wordpresshomeloading').hide();
@@ -4285,15 +4279,11 @@ 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")) {
if (setting === 'searchIndex') {
settingValue = $scope.searchIndexEnabled ? 1 : 0;
} else if ($('#' + setting).is(":checked")) {
settingValue = 1;
}
var data = {