From ab9d58767012bfd6544d08e3c1072f066308e96a Mon Sep 17 00:00:00 2001 From: Derek Macias Date: Mon, 14 Mar 2016 14:26:21 -0600 Subject: [PATCH] clear config by clearing keys every apply enable apply button if update ready --- .../usr/local/emhttp/plugins/NerdPack/NerdPack.page | 1 + .../emhttp/plugins/NerdPack/include/ClearConfig.php | 3 +++ .../local/emhttp/plugins/NerdPack/js/jquery.NerdPack.js | 9 +++++++-- 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100755 source/NerdPack/usr/local/emhttp/plugins/NerdPack/include/ClearConfig.php diff --git a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/NerdPack.page b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/NerdPack.page index 96e75573..c47572b5 100644 --- a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/NerdPack.page +++ b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/NerdPack.page @@ -8,6 +8,7 @@ Title="Nerd Pack"
+ diff --git a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/include/ClearConfig.php b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/include/ClearConfig.php new file mode 100755 index 00000000..ab382601 --- /dev/null +++ b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/include/ClearConfig.php @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/js/jquery.NerdPack.js b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/js/jquery.NerdPack.js index ce87fe9c..a3c0a74c 100644 --- a/source/NerdPack/usr/local/emhttp/plugins/NerdPack/js/jquery.NerdPack.js +++ b/source/NerdPack/usr/local/emhttp/plugins/NerdPack/js/jquery.NerdPack.js @@ -81,13 +81,16 @@ function packageQuery(force) { $('#tblPackages tbody').html(""); $.getJSON('/plugins/NerdPack/include/PackageQuery.php', {force: force}, function(packages) { $('#tblPackages tbody').empty(); + var Ready; var len = packages.length, i = 0; for (i; i < len; i++) { var Update; - if (packages[i].downloadeq == packages[i].downloaded && packages[i].installeq == packages[i].installed) + if (packages[i].downloadeq == packages[i].downloaded && packages[i].installeq == packages[i].installed){ Update = " up-to-date "; - else + }else{ Update = " update ready "; + Ready = true; + } var Downloaded = packages[i].downloaded; if (packages[i].downloadeq != packages[i].downloaded) @@ -108,6 +111,8 @@ function packageQuery(force) { ""+ ""); } + if (Ready) + $('#btnApply').prop('disabled', false); // attach switch buttons to every package checkbox all at once $('.pkgcheckbox')

Please wait, retrieving plugin information ...