Skip to content

Commit

Permalink
show a loader while pjax scripts run.
Browse files Browse the repository at this point in the history
  • Loading branch information
staabm committed Mar 9, 2012
1 parent fdd12e6 commit a829a45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions redaxo/src/core/assets/standard.js
Original file line number Diff line number Diff line change
Expand Up @@ -533,4 +533,8 @@ jQuery(document).ready(function($) {
$('#rex-page-main').live('pjax:error', function(e, xhr, err) {
$('#rex-message-container').text('Something went wrong: ' + err);
});

$(document)
.on('pjax:start', function() { $('#rex-ajax-loader').show() })
.on('pjax:end', function() { $('#rex-ajax-loader').hide() });
});
1 change: 1 addition & 0 deletions redaxo/src/core/fragments/backend_top.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@
</head>
<body<?php echo $this->bodyAttr; ?>>

<div id="rex-ajax-loader">Loading...</div>
<div id="rex-page">

0 comments on commit a829a45

Please sign in to comment.