1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-03 21:27:25 +02:00

close #29: Admin-ui ajax result filtering on keyup with jQuery;

admin jQuery JS improvements, server side filtering issues solved
This commit is contained in:
SecretR
2013-01-08 11:21:29 +02:00
parent 8c4432b4b2
commit ca9a6321ea
3 changed files with 92 additions and 17 deletions

View File

@@ -1,8 +1,5 @@
$(document).ready(function()
{
// run tips on title attribute.
$(".e-tip").each(function() {
@@ -181,23 +178,28 @@ $(document).ready(function()
// Check ALl Button
$("#e-check-all").click(function(){
$("input[type=\"checkbox\"]").attr("checked", "checked");
$('input[type="checkbox"]').attr("checked", "checked");
});
// Uncheck all button.
$("#e-uncheck-all").click(function(){
$("input[type=\"checkbox\"]").removeAttr("checked");
$('input[type="checkbox"]').removeAttr("checked");
});
// Check-All checkbox toggle
$("input.toggle-all").click(function(evt){
$("input.toggle-all").click(function(evt) {
var selector = 'input[type="checkbox"].checkbox';
if($(this).val().startsWith('jstarget:')) {
selector = 'input[type="checkbox"][name^="' + $(this).val().split(/jstarget\:/)[1] + '"]';
}
if($(this).is(":checked")){
$("input[type=\"checkbox\"].checkbox").attr("checked", "checked");
$(selector).attr("checked", "checked");
}
else{
$("input[type=\"checkbox\"].checkbox").removeAttr("checked");
$(selector).removeAttr("checked");
}
});