orbit-basic/app/assets/javascripts/bulletin_form.js.erb

28 lines
900 B
Plaintext

$('.bulletin_links_block a.delete').live('click', function(){
$(this).parents('.list_item').remove();
});
$('.bulletin_files_block a.delete').live('click', function(){
$(this).parents('.list_item').remove();
});
$('.action a.remove_existing_record').live('click', function(){
$(this).next('.should_destroy').attr('value', 1);
//$("#bulletin_" + $(this).prev().attr('value')).hide();
$("tr#bulletin_" + $(this).prev().attr('value')).hide();
});
$('.quick_edit_cancel').live('click', function(){
tr = $(this).attr('rel');
$('#' + tr).hide();
$("tr#bulletin_file_" + $(this).prev().attr('value')).hide();
$("tr#bulletin_link_" + $(this).prev().attr('value')).hide();
});
$(document).on('click', '.list-remove', function(){
$('#delete_bulletins').submit();
});
$(document).on('click', '#check_all_bulletins', function(){
$('.checkbox_in_list').attr("checked", this.checked);
});