add better loading behaviour for file browser
This commit is contained in:
parent
abd7fd7100
commit
70680ca4bb
|
@ -14,9 +14,15 @@ $(function() {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
var formData = $(this).serializeArray();
|
var formData = $(this).serializeArray();
|
||||||
$('#submitFilter').val("Loading...").attr("disabled", "disabled");
|
$('#submitFilter').val("Loading...").attr("disabled", "disabled");
|
||||||
|
$('#pageData').hide();
|
||||||
|
$('#loadingPage').show();
|
||||||
|
$('#pageBtnsWrapper').hide();
|
||||||
$('#previewPane').empty();
|
$('#previewPane').empty();
|
||||||
$.post("/files/json_list", formData, function(data) {
|
$.post("/files/json_list", formData, function(data) {
|
||||||
$('#submitFilter').val(" Find ").removeAttr("disabled");
|
$('#submitFilter').val(" Find ").removeAttr("disabled");
|
||||||
|
$('#loadingPage').hide();
|
||||||
|
$('#pageData').show();
|
||||||
|
$('#pageBtnsWrapper').show();
|
||||||
// MAAKICHUT = response;
|
// MAAKICHUT = response;
|
||||||
var files = data.files;
|
var files = data.files;
|
||||||
// console.log(files);
|
// console.log(files);
|
||||||
|
|
|
@ -26,14 +26,17 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="pageDataWrapper">
|
<div id="pageDataWrapper">
|
||||||
|
<div id="loadingPage">Loading...</div>
|
||||||
<div id="pageData">
|
<div id="pageData">
|
||||||
Results: <span id="noOfResults"></span>. Page <span id="currentPageNo"></span> of <span id="noOfPages"></span>
|
Results: <span id="noOfResults"></span>. Page <span id="currentPageNo"></span> of <span id="noOfPages"></span>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="pageBtnsWrapper">
|
||||||
<div id="firstPage">First</div>
|
<div id="firstPage">First</div>
|
||||||
<div id="prevBtn"><<</div>
|
<div id="prevBtn"><<</div>
|
||||||
<div id="nextBtn">>></div>
|
<div id="nextBtn">>></div>
|
||||||
<div id="lastPage">Last</div>
|
<div id="lastPage">Last</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
<div id="withSelected">
|
<div id="withSelected">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user