rename to reset filters
This commit is contained in:
parent
58e5d0470e
commit
ce94394699
@ -27,7 +27,7 @@ Title="Nerd Pack"
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<input onclick="packageQuery(1)" value="Check for Updates" type="button"><input class="reset" value="Reset" type="button" title="reset filters">
|
||||
<input onclick="packageQuery(1)" value="Check for Updates" type="button"><button class="reset" type="button" title="reset filters">Reset Filters</button>
|
||||
: <input id="btnApply" type="button" value="Apply"><input type="button" value="Done" onClick="done()">
|
||||
<input type="hidden" name="#file" value="NerdPack/NerdPack.cfg">
|
||||
</form>
|
||||
|
@ -1,22 +1,4 @@
|
||||
$(function(){
|
||||
// tablesorter options
|
||||
$("#tblPackages").tablesorter({
|
||||
sortList: [[0,1]],
|
||||
widgets: ["saveSort", "filter", "stickyHeaders"],
|
||||
widgetOptions: {
|
||||
stickyHeaders_filteredToTop: true,
|
||||
filter_hideEmpty: true,
|
||||
filter_liveSearch: true,
|
||||
filter_saveFilters: true,
|
||||
filter_reset: "button.reset",
|
||||
filter_functions: {
|
||||
".filter-version": true,
|
||||
".filter-downloaded": true,
|
||||
".filter-installed": true
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// "uninstall package" switch and cookie
|
||||
$("#uninstallpkg")
|
||||
.switchButton({
|
||||
@ -41,25 +23,6 @@ $(function(){
|
||||
$.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 });
|
||||
$(".pkgcheckbox").each(function() { // loop through each checkbox
|
||||
$(this).switchButton({checked: myval});
|
||||
});
|
||||
$(".pkgvalue").each(function() { // loop through each value
|
||||
$(this).val(myval ? "yes": "no");
|
||||
});
|
||||
});
|
||||
|
||||
// set cookie on apply button press
|
||||
$("#btnApply").click(function() {
|
||||
checkDepends();
|
||||
@ -126,6 +89,43 @@ function packageQuery(force) {
|
||||
});
|
||||
}
|
||||
$("#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
|
||||
$("#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 });
|
||||
$(".pkgcheckbox").each(function() { // loop through each checkbox
|
||||
$(this).switchButton({checked: myval});
|
||||
});
|
||||
$(".pkgvalue").each(function() { // loop through each value
|
||||
$(this).val(myval ? "yes": "no");
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user