Skip to content

Commit

Permalink
Merge pull request #1 from bmooreitul/ramanItul-dev-patch-1
Browse files Browse the repository at this point in the history
Update itulFramework.js
  • Loading branch information
bmooreitul authored Oct 17, 2024
2 parents a2cc12d + ecae8d0 commit 3bd1507
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion itulFramework.js
Original file line number Diff line number Diff line change
Expand Up @@ -706,12 +706,16 @@ function init_fill_height(trigger = true){
e.preventDefault();
e.stopPropagation();

//DISABLE THE BUTTON TO PREVENT MULTIPLE CLICKS
var ele = $(this);
ele.prop('disabled', true); // Disable the button

//SHOW THE SPINNER
spinner();

//PARSE THE ATTRIBUTES
var callback_name = $(this).attr('callback');
var ele = $(this);

var target = $(this).attr('data-element') !== undefined ? $($(this).attr('data-element')) : false;
var url = $(this).attr('data-url') !== undefined ? $(this).attr('data-url') : $(this).attr('href');
var callback_type = $(this).attr('data-callback_type') !== undefined ? $(this).attr('data-callback_type') : 'html';
Expand Down Expand Up @@ -762,7 +766,13 @@ function init_fill_height(trigger = true){
else{
spinner('hide');
}


}
}).done(function(){
spinner('hide');
//RE-ENABLE THE BUTTON AFTER SUCCESS
ele.prop('disabled', false);
});
}
else{
Expand Down

0 comments on commit 3bd1507

Please sign in to comment.