From 70680ca4bb84a7b7a9d2a89d8b1bb3fd783a7173 Mon Sep 17 00:00:00 2001 From: Sanj Date: Wed, 6 Jul 2011 03:59:43 +0530 Subject: [PATCH] add better loading behaviour for file browser --- edgware/static/js/files/browse.js | 6 ++++++ edgware/templates/files/browser.html | 17 ++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/edgware/static/js/files/browse.js b/edgware/static/js/files/browse.js index 8b9e77b..f02cf6c 100644 --- a/edgware/static/js/files/browse.js +++ b/edgware/static/js/files/browse.js @@ -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); diff --git a/edgware/templates/files/browser.html b/edgware/templates/files/browser.html index ddc9f6f..8a2bb6c 100644 --- a/edgware/templates/files/browser.html +++ b/edgware/templates/files/browser.html @@ -26,13 +26,16 @@
-
- Results: . Page of -
-
First
-
<<
-
>>
-
Last
+
Loading...
+
+ Results: . Page of +
+
+
First
+
<<
+
>>
+
Last
+
{% if user.is_authenticated %}