js for preventing user do stupid things durning ajax

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-05-22 14:59:54 +08:00
1 parent 361722f252
commit 79f67208fa
7 files changed
+44 -22

No files matched your search

@@ -0,0 +1,14 @@
// $.ready(function(){
// $('body').bind("ajaxSend", function(){
// $('<div class="modal-backdrop fade in"></div>').appendTo('body');
// }).bind("ajaxComplete", function(){
// $('body > div.modal-backdrop').hide().remove();
// });
// });
jQuery(document).ajaxStart(function(){
$('<div class="modal-backdrop fade in" id="sys_modal"><img src="/assets/ajax-loader.gif" style="margin-top: 25%;margin-left: 50%;"></div>').appendTo('body');
});
jQuery(document).ajaxComplete(function(){
$("#sys_modal").hide().remove();
});