From 773bad1490504bcda346193ad4c93bf1d9610ab6 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 7 Mar 2021 12:26:33 +0300 Subject: prevent list of enabled plugins resetting if saved while in search results --- js/PrefHelpers.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'js') diff --git a/js/PrefHelpers.js b/js/PrefHelpers.js index d9b17a698..04ee10a41 100644 --- a/js/PrefHelpers.js +++ b/js/PrefHelpers.js @@ -356,6 +356,7 @@ const Helpers = { ++results_rendered; + // only user-enabled actually counts in the checkbox when saving because system plugin checkboxes are disabled (see below) container.innerHTML += `
  • `; + } else { + // if plugin is outside of search scope, keep current value in case of saving (only user-enabled is needed) + container.innerHTML += App.FormFields.checkbox_tag("plugins[]", plugin.user_enabled, plugin.name, {style: 'display : none'}); } }); if (results_rendered == 0) { - container.innerHTML = `
  • ${__("Could not find any plugins for this search query.")}
  • `; + container.innerHTML += `
  • ${__("Could not find any plugins for this search query.")}
  • `; } dojo.parser.parse(container); -- cgit v1.2.3