Move delete checkboxes to js

This commit is contained in:
Christophe Vilayphiou committed 2012-08-14 00:59:01 +08:00
1 parent 18e18a4add
commit c32b0dd4b4
22 files changed
+82 -78

No files matched your search

+10 -1
View File
@@ -1,5 +1,14 @@
$(document).on('click', '.list-remove', function(){
$('#delete_all').submit();
var a = [];
$('.checkbox_in_list').each(function(){
if (this.checked) a.push("ids[]=" + this.value);
});
var url = $(this).attr('rel');
if (url.indexOf('?') > -1){
$.getScript(url + '&' + a.join('&'));
}else{
$.getScript(url + '?' + a.join('&'));
}
});
$(document).on('click', '#check_all', function(){