approve and delete all done with registration approval notification for admin

This commit is contained in:
harrybomrah authored and saurabhbhatia committed 2013-12-05 17:30:33 +08:00
1 parent 0eb8e1a305
commit 9db4c787c9
7 files changed
+111 -11

No files matched your search

@@ -0,0 +1,55 @@
jQuery(document).ready(function($) {
var selectAll = $( "#select_all_registration" ),
checkboxes = $( "input.select-this" ),
selectedBtns = $( "a.selected-actions" );
selectAll.bind(clickEvent,function(){
if( $( this ).is( ":checked" ) ){
checkboxes.prop( "checked", true );
selectedBtns.removeClass('hide');
}else{
checkboxes.prop( "checked", false );
selectedBtns.addClass('hide');
}
});
checkboxes.bind(clickEvent,function(){
var checkedCheckboxes = $( "input.select-this:checked" );
if( checkboxes.length == checkedCheckboxes.length ){
selectAll.prop( "checked", true );
}else{
selectAll.prop( "checked", false );
}
(checkedCheckboxes.length > 0 ? selectedBtns.removeClass('hide') : selectedBtns.addClass('hide'));
});
selectedBtns.bind(clickEvent,function(){
if( confirm("Are you sure?") ){
var userids = [],
_this = $( this ),
checkedCheckboxes = $( "input.select-this:checked" );
checkedCheckboxes.each(function(){
userids.push( $( this ).val() );
})
$.ajax({
url : _this.attr("href"),
type : "post",
dataType : "json",
data : {"userids" : userids},
success : function(data){
if( data.success == true){
window.location.href = data.url;
}
}
})
}
return false;
})
});