From 7fc92101d57bbebb4e35eb4e57bea84828723db6 Mon Sep 17 00:00:00 2001 From: Johannes Zellner Date: Wed, 9 Feb 2022 16:22:44 +0100 Subject: [PATCH] Avoid using unnecessary checkbox for solr config --- src/views/emails.html | 16 ++++++---------- src/views/emails.js | 8 ++++---- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/views/emails.html b/src/views/emails.html index 7b0fb37e6..4a8f75fcf 100644 --- a/src/views/emails.html +++ b/src/views/emails.html @@ -109,20 +109,13 @@ @@ -330,6 +323,9 @@
{{ 'emails.settings.solrFts' | tr }}
+
+ +
{{ 'emails.settings.solrEnabled' | tr }} diff --git a/src/views/emails.js b/src/views/emails.js index ee6ba630f..b05c74720 100644 --- a/src/views/emails.js +++ b/src/views/emails.js @@ -226,17 +226,17 @@ angular.module('Application').controller('EmailsController', ['$scope', '$locati $('#solrConfigModal').modal('show'); }, - submit: function () { + submit: function (newState) { $scope.solrConfig.busy = true; - Client.setSolrConfig($scope.solrConfig.enabled, function (error) { + Client.setSolrConfig(newState, function (error) { if (error) return console.error(error); $timeout(function () { $scope.solrConfig.busy = false; // FIXME: these values are fake. but cannot get current status from mail server since it might be restarting - $scope.solrConfig.currentConfig.enabled = $scope.solrConfig.enabled; - $scope.solrConfig.running = $scope.solrConfig.enabled; + $scope.solrConfig.currentConfig.enabled = newState; + $scope.solrConfig.running = newState; $timeout(function () { $scope.solrConfig.refresh(); }, 20000); // get real values after 20 seconds