Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="menuButton" onclick="${remoteFunction(action: 'index', controller: 'file', update: [success: 'ajax', failure: 'ajax'])}">
- <label class="menu">File upload</label>
- </div>
- <script type="text/javascript">
- function showSpinner() {
- // TODO show spinner
- }
- function hideSpinner() {
- // TODO hide spinner
- }
- Ajax.Responders.register({
- onLoading: function() {
- showSpinner();
- },
- onComplete: function() {
- if(!Ajax.activeRequestCount) hideSpinner();
- }
- });
- </script>
- <script type="text/javascript">
- function showSpinner() {
- $('spinner').show();
- }
- function hideSpinner() {
- $('spinner').hide();
- }
- Ajax.Responders.register({
- onLoading: function() {
- showSpinner();
- },
- onComplete: function() {
- if(!Ajax.activeRequestCount) hideSpinner();
- }
- });
- </script>
- <div id="spinner" style="display: none;">
- <img src="${createLinkTo(dir:'images',file:'spinner.gif')}" alt="Loading..." width="16" height="16" />
- </div>
Add Comment
Please, Sign In to add comment