Merge branch 'master' of github.com:dmacias72/unRAID-plugins
This commit is contained in:
commit
8bfaca7966
|
@ -3,7 +3,7 @@
|
||||||
<!DOCTYPE PLUGIN [
|
<!DOCTYPE PLUGIN [
|
||||||
<!ENTITY name "NerdPack">
|
<!ENTITY name "NerdPack">
|
||||||
<!ENTITY author "dmacias72">
|
<!ENTITY author "dmacias72">
|
||||||
<!ENTITY version "2016.01.24">
|
<!ENTITY version "2016.01.25">
|
||||||
<!ENTITY launch "Settings/&name;">
|
<!ENTITY launch "Settings/&name;">
|
||||||
<!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master">
|
<!ENTITY gitURL "https://raw.githubusercontent.com/&author;/unRAID-plugins/master">
|
||||||
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
|
<!ENTITY pluginURL "&gitURL;/plugins/&name;.plg">
|
||||||
|
@ -16,6 +16,10 @@
|
||||||
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;">
|
<PLUGIN name="&name;" author="&author;" version="&version;" launch="&launch;" pluginURL="&pluginURL;">
|
||||||
|
|
||||||
<CHANGES>
|
<CHANGES>
|
||||||
|
###2016.01.25
|
||||||
|
- Merge eschultz pull request
|
||||||
|
- tweaks to tablesorter to restore saved filters
|
||||||
|
- minor optimizations
|
||||||
###2016.01.24
|
###2016.01.24
|
||||||
- Merged eschultz's package repo and following fixes
|
- Merged eschultz's package repo and following fixes
|
||||||
- Fixed first time running warnings about missing packages.json / desc files
|
- Fixed first time running warnings about missing packages.json / desc files
|
||||||
|
|
|
@ -11,8 +11,12 @@ This plugin allows installation of extra packages, mostly CLI, for advanced user
|
||||||
</Description>
|
</Description>
|
||||||
<Support>http://lime-technology.com/forum/index.php?topic=37541.0</Support>
|
<Support>http://lime-technology.com/forum/index.php?topic=37541.0</Support>
|
||||||
<Icon>https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/NerdPack.png</Icon>
|
<Icon>https://raw.githubusercontent.com/dmacias72/unRAID-plugins/master/plugins/NerdPack.png</Icon>
|
||||||
<Date>2016-01-24</Date>
|
<Date>2016-01-25</Date>
|
||||||
<Changes>
|
<Changes>
|
||||||
|
###2016.01.25
|
||||||
|
- Merge eschultz pull request
|
||||||
|
- tweaks to tablesorter to restore saved filters
|
||||||
|
- minor optimizations
|
||||||
###2016.01.24
|
###2016.01.24
|
||||||
- Merged eschultz's package repo and following fixes
|
- Merged eschultz's package repo and following fixes
|
||||||
- Fixed first time running warnings about missing packages.json / desc files
|
- Fixed first time running warnings about missing packages.json / desc files
|
||||||
|
|
|
@ -27,7 +27,7 @@ Title="Nerd Pack"
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<input onclick="packageQuery(1)" value="Check for Updates" type="button"><button class="reset" type="button" title="reset filters">Reset Filters</button>
|
<input onclick="packageQuery(1)" value="Check for Updates" type="button"><input class="reset" type="button" title="reset filters" value="Reset Filters">
|
||||||
: <input id="btnApply" type="button" value="Apply"><input type="button" value="Done" onClick="done()">
|
: <input id="btnApply" type="button" value="Apply"><input type="button" value="Done" onClick="done()">
|
||||||
<input type="hidden" name="#file" value="NerdPack/NerdPack.cfg">
|
<input type="hidden" name="#file" value="NerdPack/NerdPack.cfg">
|
||||||
</form>
|
</form>
|
||||||
|
@ -35,4 +35,4 @@ Title="Nerd Pack"
|
||||||
<script type="text/javascript" src="/plugins/tablesorter/js/jquery.tablesorter.combined.min.js"></script>
|
<script type="text/javascript" src="/plugins/tablesorter/js/jquery.tablesorter.combined.min.js"></script>
|
||||||
<script type="text/javascript" src="/plugins/tablesorter/js/parsers/parser-metric.min.js"></script>
|
<script type="text/javascript" src="/plugins/tablesorter/js/parsers/parser-metric.min.js"></script>
|
||||||
<script type="text/javascript" src="/webGui/javascript/jquery.switchbutton.js"></script>
|
<script type="text/javascript" src="/webGui/javascript/jquery.switchbutton.js"></script>
|
||||||
<script type="text/javascript" src="/plugins/NerdPack/js/jquery.NerdPack.js"></script>
|
<script type="text/javascript" src="/plugins/NerdPack/js/jquery.NerdPack.js"></script>
|
||||||
|
|
|
@ -1,4 +1,22 @@
|
||||||
$(function(){
|
$(function(){
|
||||||
|
// tablesorter options
|
||||||
|
$("#tblPackages").tablesorter({
|
||||||
|
sortList: [[0,0]],
|
||||||
|
widgets: ["saveSort", "filter", "stickyHeaders"],
|
||||||
|
widgetOptions: {
|
||||||
|
stickyHeaders_filteredToTop: true,
|
||||||
|
filter_hideEmpty: true,
|
||||||
|
filter_liveSearch: true,
|
||||||
|
filter_saveFilters: true,
|
||||||
|
filter_reset: ".reset",
|
||||||
|
filter_functions: {
|
||||||
|
".filter-version": true,
|
||||||
|
".filter-downloaded": true,
|
||||||
|
".filter-installed": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// "uninstall package" switch and cookie
|
// "uninstall package" switch and cookie
|
||||||
$("#uninstallpkg")
|
$("#uninstallpkg")
|
||||||
.switchButton({
|
.switchButton({
|
||||||
|
@ -23,6 +41,20 @@ $(function(){
|
||||||
$.cookie("nerdpack_packages_delete", $(this).prop("checked") ? "--delete" : "", { expires: 3650 });
|
$.cookie("nerdpack_packages_delete", $(this).prop("checked") ? "--delete" : "", { expires: 3650 });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// select all packages switch
|
||||||
|
$("#checkall")
|
||||||
|
.switchButton({
|
||||||
|
labels_placement: "right",
|
||||||
|
on_label: "Select All",
|
||||||
|
off_label: "Select All",
|
||||||
|
checked: $.cookie("nerdpack_checkall") == "yes"
|
||||||
|
})
|
||||||
|
.change(function () {
|
||||||
|
var myval = $(this).prop("checked");
|
||||||
|
$.cookie("nerdpack_checkall", myval ? "yes" : "no", { expires: 3650 });
|
||||||
|
$("#tblPackages tbody td:visible .pkgcheckbox").switchButton({checked: myval});
|
||||||
|
});
|
||||||
|
|
||||||
// set cookie on apply button press
|
// set cookie on apply button press
|
||||||
$("#btnApply").click(function() {
|
$("#btnApply").click(function() {
|
||||||
checkDepends();
|
checkDepends();
|
||||||
|
@ -70,62 +102,29 @@ function packageQuery(force) {
|
||||||
"<td>"+data[i].size+"</td>"+ // package size
|
"<td>"+data[i].size+"</td>"+ // package size
|
||||||
"<td>"+Downloaded+"</td>"+ // package installed
|
"<td>"+Downloaded+"</td>"+ // package installed
|
||||||
"<td>"+Installed+"</td>"+ // package installed
|
"<td>"+Installed+"</td>"+ // package installed
|
||||||
"<td><input class='pkgcheckbox' id='"+data[i].pkgname+"' type='checkbox'>"+
|
"<td><input class='pkgcheckbox' id='"+data[i].pkgname+"' type='checkbox' "+(data[i].config=="yes"?"checked":"")+">"+
|
||||||
"<input class='pkgvalue' type='hidden' id='"+data[i].pkgname+"_value' name='"+data[i].pkgnver+"' value='"+data[i].config+"'></td>"+
|
"<input class='pkgvalue' type='hidden' id='"+data[i].pkgname+"_value' name='"+data[i].pkgnver+"' value='"+data[i].config+"'></td>"+
|
||||||
"</tr>");
|
"</tr>");
|
||||||
|
|
||||||
$("#"+data[i].pkgname)
|
|
||||||
.switchButton({
|
|
||||||
labels_placement: "right",
|
|
||||||
on_label: "On",
|
|
||||||
off_label: "Off",
|
|
||||||
checked: data[i].config == "yes"
|
|
||||||
})
|
|
||||||
.change(function() {
|
|
||||||
$(this).parent().parent().find(".pkgvalue").val(this.checked ? "yes": "no");
|
|
||||||
if (this.checked)
|
|
||||||
checkDepends();
|
|
||||||
$("#btnApply").prop("disabled", false);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
$("#tblPackages").trigger("update");
|
|
||||||
|
|
||||||
// tablesorter options
|
|
||||||
$("#tblPackages").tablesorter({
|
|
||||||
sortList: [[0,0]],
|
|
||||||
widgets: ["saveSort", "filter", "stickyHeaders"],
|
|
||||||
widgetOptions: {
|
|
||||||
stickyHeaders_filteredToTop: true,
|
|
||||||
filter_hideEmpty: true,
|
|
||||||
filter_liveSearch: true,
|
|
||||||
filter_saveFilters: true,
|
|
||||||
filter_reset: ".reset",
|
|
||||||
filter_functions: {
|
|
||||||
".filter-version": true,
|
|
||||||
".filter-downloaded": true,
|
|
||||||
".filter-installed": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// select all packages switch
|
// attach switch buttons to every package checkbox all at once
|
||||||
$("#checkall")
|
$(".pkgcheckbox")
|
||||||
.switchButton({
|
.switchButton({
|
||||||
labels_placement: "right",
|
labels_placement: "right",
|
||||||
on_label: "Select All",
|
on_label: "On",
|
||||||
off_label: "Select All",
|
off_label: "Off"
|
||||||
checked: $.cookie("nerdpack_checkall") == "yes"
|
|
||||||
})
|
})
|
||||||
.change(function () {
|
.change(function() {
|
||||||
var myval = $(this).prop("checked");
|
$(this).parent().parent().find(".pkgvalue").val(this.checked ? "yes": "no");
|
||||||
$.cookie("nerdpack_checkall", myval ? "yes" : "no", { expires: 3650 });
|
if (this.checked)
|
||||||
$(".pkgcheckbox").each(function() { // loop through each checkbox
|
checkDepends();
|
||||||
$(this).switchButton({checked: myval});
|
$("#btnApply").prop("disabled", false);
|
||||||
});
|
|
||||||
$(".pkgvalue").each(function() { // loop through each value
|
|
||||||
$(this).val(myval ? "yes": "no");
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// restore filters
|
||||||
|
var lastSearch = $("#tblPackages")[0].config.lastSearch;
|
||||||
|
$("#tblPackages").trigger("update");
|
||||||
|
$("#tblPackages").trigger("search", [lastSearch]);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,4 +137,4 @@ function checkDepends() {
|
||||||
$("#python").switchButton({checked: true});
|
$("#python").switchButton({checked: true});
|
||||||
$("#python", ".pkgvalue").val("yes");
|
$("#python", ".pkgvalue").val("yes");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user