Created
May 28, 2014 16:32
-
-
Save emamut/a74b7678aae385e0e339 to your computer and use it in GitHub Desktop.
Loading modal window
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var myApp; | |
myApp = myApp || (function () { | |
var pleaseWaitDiv = $('<div class="modal" id="pleaseWaitDialog" data-backdrop="static" data-keyboard="false"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <h4 class="modal-title">Procesando...</h4> </div> <div class="modal-body"> <div class="progress progress-striped active"> <div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemax="100" style="width: 100%;"></div> </div> </div> </div> </div> </div>'); | |
return { | |
showPleaseWait: function() { | |
pleaseWaitDiv.modal(); | |
}, | |
hidePleaseWait: function () { | |
pleaseWaitDiv.modal('hide'); | |
}, | |
}; | |
})(); | |
jQuery.ajaxSetup({ | |
beforeSend: function() { | |
myApp.showPleaseWait(); | |
}, | |
complete: function(){ | |
myApp.hidePleaseWait(); | |
}, | |
success: function() {} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment