From b4c0f38ae8e7f8c2a07d775cd0bb53516a268b16 Mon Sep 17 00:00:00 2001 From: Karl Cordes Date: Fri, 15 Jul 2011 12:56:08 +1000 Subject: [PATCH] Improved global AJAX loadign div --- views/layouts/default.ctp | 10 ++++++++-- webroot/css/quotenik.css | 9 ++++++--- webroot/js/view_user.js | 11 +++-------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/views/layouts/default.ctp b/views/layouts/default.ctp index 3872a990..7ac4976b 100755 --- a/views/layouts/default.ctp +++ b/views/layouts/default.ctp @@ -156,7 +156,10 @@ if ($session->check('Message.flash')): $session->flash(); endif; ?> -
image('ajax-loader.gif'); ?>
+
+

Loading, please wait

+image('ajax-loader.gif'); ?> +
@@ -192,7 +195,10 @@ endif; -
image('ajax-loader.gif'); ?>
+
+

Loading, please wait..

+ image('ajax-loader.gif'); ?> +
diff --git a/webroot/css/quotenik.css b/webroot/css/quotenik.css index 055d6787..4655acb3 100755 --- a/webroot/css/quotenik.css +++ b/webroot/css/quotenik.css @@ -1506,9 +1506,12 @@ div.address span { #globalAjaxLoading { position: absolute; - left: 50%; - top: 50%; - + left: 40%; + top: 15%; + background: #E0F2F7; + borders: 3px solid; + border-radius: 5px; + padding: 1em; } .pages { diff --git a/webroot/js/view_user.js b/webroot/js/view_user.js index c4343e67..5f38d0f2 100644 --- a/webroot/js/view_user.js +++ b/webroot/js/view_user.js @@ -1,8 +1,7 @@ $(function() { $('#show').hide(); - $('#enquiryTable').hide(); - + $("#ajaxLoadEnquiry").hide(); @@ -33,19 +32,15 @@ $(function() { $('#show').click(function() { $(this).hide(); $('#hide').show(); - $("#ajaxLoadEnquiry").show(); - $('#enquiryTable').slideDown('fast', function() { - $("#ajaxLoadEnquiry").hide(); - }); + $('#enquiryTable').slideDown('fast'); }); function getPage(url) { + $.get(url, function(data) { $('#enquiryTable').html(data); - $('#enquiryTable').slideDown('fast'); - }); }