+ $('button#deleteprojects').click(function() {
+ var flag = false;
+ $('input:checkbox.project').each(function (index) {
+ if(this.checked){
+ var record_id = this.id;
+ console.log(record_id);
+ $.post("/delete/myslice:authority/",{'filters':{'authority_hrn':this.id}}, function(data) {
+ if(data.success){
+ localStorage.clear();
+ $('tr[id="'+record_id+'"]').fadeOut("slow");
+ $('tr[id="'+record_id+'"]').remove();
+ mysliceAlert('Success: project deleted','success', true);
+ }else{
+ mysliceAlert('Rest Error for: '+data.error,'warning', true);
+ //alert("Rest Error for "+record_id+": "+data.error);
+ }
+ });
+ }
+ });
+ });