This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/app/assets/javascripts/sort_header.js.erb

19 lines
507 B
Plaintext
Raw Normal View History

2012-08-15 17:09:45 +00:00
<%#= encoding: utf-8 %>
$(document).on('click', '.list-remove', function(){
if(confirm("<%= I18n.t('sure?') %>")){
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);
});