clear config by clearing keys every apply
enable apply button if update ready
This commit is contained in:
parent
f64f61427b
commit
ab9d587670
|
@ -8,6 +8,7 @@ Title="Nerd Pack"
|
|||
<link type="text/css" rel="stylesheet" href="/plugins/NerdPack/css/NerdPack.css">
|
||||
|
||||
<form markdown="1" id="package_form" name="package_settings" method="POST" action="/update.php" target="progressFrame">
|
||||
<input type="hidden" id="include" name="#include" value="/plugins/NerdPack/include/ClearConfig.php"/>
|
||||
|
||||
<table class="tablesorter hover-highlight" id="tblPackages">
|
||||
<thead>
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
<?php
|
||||
$keys = [];
|
||||
?>
|
|
@ -81,13 +81,16 @@ function packageQuery(force) {
|
|||
$('#tblPackages tbody').html("<tr><td colspan='6'><br><i class='fa fa-spinner fa-spin icon'></i><em>Please wait, retrieving plugin information ...</em></td><tr>");
|
||||
$.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 = "<span><i class='uptodate fa fa-check'></i> up-to-date </span>";
|
||||
else
|
||||
}else{
|
||||
Update = "<span ><a><i class='updateready fa fa-cloud-download'></i> update ready </a></span>";
|
||||
Ready = true;
|
||||
}
|
||||
|
||||
var Downloaded = packages[i].downloaded;
|
||||
if (packages[i].downloadeq != packages[i].downloaded)
|
||||
|
@ -108,6 +111,8 @@ function packageQuery(force) {
|
|||
"<input class='pkgvalue' type='hidden' id='"+packages[i].pkgname+"_value' name='"+packages[i].pkgnver+"' value='"+packages[i].config+"'></td>"+
|
||||
"</tr>");
|
||||
}
|
||||
if (Ready)
|
||||
$('#btnApply').prop('disabled', false);
|
||||
|
||||
// attach switch buttons to every package checkbox all at once
|
||||
$('.pkgcheckbox')
|
||||
|
|
Loading…
Reference in New Issue
Block a user