orbit-basic/app/assets/javascripts/sort_header.js

16 lines
430 B
JavaScript

$(document).on('click', '.list-remove', function(){
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(){
$('.checkbox_in_list').attr("checked", this.checked);
});