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

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

@@ -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();
});
+1
View File
@@ -9,6 +9,7 @@
<![endif]-->
<%= stylesheet_link_tag "new_admin" %>
<%= javascript_include_tag "new_admin" %>
<%= javascript_include_tag "inc/ajax_setting" %>
<%= yield :page_specific_css %>
<%= yield :page_specific_javascript %>
<%= csrf_meta_tag %>