issues counter are now live updated on creation/deleteion/reopening …

buttons on forms are disabled on submit (re-enabled after the request is complete)
This commit is contained in:
Staicu Ionut 2012-07-10 07:33:04 +03:00
parent be1b40802d
commit ba7b85d0d9
7 changed files with 48 additions and 11 deletions

View file

@ -20,10 +20,26 @@
//= require_tree .
$(document).ready(function(){
$(".one_click_select").live("click", function(){
$(this).select();
});
$('body').on('ajax:complete, ajax:beforeSend, submit', 'form', function(e){
var buttons = $('[type="submit"]', this);
switch( e.type ){
case 'ajax:beforeSend':
case 'submit':
buttons.attr('disabled', 'disabled');
break;
case ' ajax:complete':
default:
buttons.removeAttr('disabled');
break;
}
})
$(".account-box").mouseenter(showMenu);
$(".account-box").mouseleave(resetMenu);