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,13 +26,16 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="pageDataWrapper">
|
<div id="pageDataWrapper">
|
||||||
<div id="pageData">
|
<div id="loadingPage">Loading...</div>
|
||||||
Results: <span id="noOfResults"></span>. Page <span id="currentPageNo"></span> of <span id="noOfPages"></span>
|
<div id="pageData">
|
||||||
</div>
|
Results: <span id="noOfResults"></span>. Page <span id="currentPageNo"></span> of <span id="noOfPages"></span>
|
||||||
<div id="firstPage">First</div>
|
</div>
|
||||||
<div id="prevBtn"><<</div>
|
<div id="pageBtnsWrapper">
|
||||||
<div id="nextBtn">>></div>
|
<div id="firstPage">First</div>
|
||||||
<div id="lastPage">Last</div>
|
<div id="prevBtn"><<</div>
|
||||||
|
<div id="nextBtn">>></div>
|
||||||
|
<div id="lastPage">Last</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if user.is_authenticated %}
|
{% if user.is_authenticated %}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user