Skip to content

Commit

Permalink
Merge pull request #618 from joomla/docu-ajax-loader
Browse files Browse the repository at this point in the history
Add AJAX loader animation to the documentation section
  • Loading branch information
Michael Babker committed Feb 7, 2015
2 parents 5cc13a5 + 25aa571 commit 22a730c
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion templates/support/documentation.index.twig
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,27 @@
<!-- CSS for coloured code -->
<link href="{{ uri.base.path }}jtracker/core/css/code.css" rel="stylesheet" media="screen">

<style>
.spinner {
position: fixed;
top: 50%;
left: 50%;
margin-left: -33px;
margin-top: -33px;
text-align:center;
z-index:1234;
overflow: auto;
width: 66px;
height: 68px;
}
</style>

{% endblock %}

{% block content %}
<div id="spinner" class="spinner" style="display:none;">
<img id="img-spinner" src="/images/tracker/ajax-loader.gif" alt="Loading"/>
</div>

<div class="row-fluid">
<div class="span3">
Expand Down Expand Up @@ -68,6 +86,9 @@
function loadDocuPage(fullPath) {
jQuery.ajax({
url : '{{ uri.base.path }}documentation/show/?' + fullPath,
beforeSend: function() {
$('#spinner').show();
},
success: function(response) {
if(response.error)
{
Expand All @@ -81,7 +102,10 @@
},
error: (function() {
alert('error..');
})
}),
complete: function(){
$('#spinner').hide();
}
});
}
Expand Down
Binary file added www/images/tracker/ajax-loader.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 22a730c

Please sign in to comment.