add better loading behaviour for file browser

This commit is contained in:
Sanj 2011-07-06 03:59:43 +05:30
parent abd7fd7100
commit 70680ca4bb
2 changed files with 16 additions and 7 deletions

View File

@ -14,9 +14,15 @@ $(function() {
e.preventDefault();
var formData = $(this).serializeArray();
$('#submitFilter').val("Loading...").attr("disabled", "disabled");
$('#pageData').hide();
$('#loadingPage').show();
$('#pageBtnsWrapper').hide();
$('#previewPane').empty();
$.post("/files/json_list", formData, function(data) {
$('#submitFilter').val(" Find ").removeAttr("disabled");
$('#loadingPage').hide();
$('#pageData').show();
$('#pageBtnsWrapper').show();
// MAAKICHUT = response;
var files = data.files;
// console.log(files);

View File

@ -26,14 +26,17 @@
</div>
<div id="pageDataWrapper">
<div id="loadingPage">Loading...</div>
<div id="pageData">
Results: <span id="noOfResults"></span>. Page <span id="currentPageNo"></span> of <span id="noOfPages"></span>
</div>
<div id="pageBtnsWrapper">
<div id="firstPage">First</div>
<div id="prevBtn">&lt;&lt;</div>
<div id="nextBtn">&gt;&gt;</div>
<div id="lastPage">Last</div>
</div>
</div>
{% if user.is_authenticated %}
<div id="withSelected">