From 7400f8e3d150ba56595ab5ba9bc0915d222ca9e0 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 21 Nov 2009 03:14:49 +0000 Subject: [PATCH] ENHANCEMENT Using concrete for CMS loading screen javascript ENHANCEMENT Better styling for non-javascript message in CMS loading screen git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@92701 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/LeftAndMain.php | 2 -- css/layout.css | 11 +++++++++++ javascript/LeftAndMain.js | 9 ++++----- templates/LeftAndMain.ss | 2 +- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/code/LeftAndMain.php b/code/LeftAndMain.php index 5d493686..459801ab 100644 --- a/code/LeftAndMain.php +++ b/code/LeftAndMain.php @@ -248,8 +248,6 @@ class LeftAndMain extends Controller { Requirements::css($file[0], $file[1]); } - Requirements::customScript('Behaviour.addLoader(hideLoading);'); - // Javascript combined files Requirements::combine_files( 'assets/base.js', diff --git a/css/layout.css b/css/layout.css index 5aa2a676..11f28ebe 100644 --- a/css/layout.css +++ b/css/layout.css @@ -5,10 +5,21 @@ font-family: Arial, Helvetica, sans-serif; } +html { + overflow: hidden; +} + body { background: #ccdef3; } +.ss-loading-screen p { + width: 100%; + text-align: center; + position: fixed; + bottom: 0px; +} + /* * Default Layout Theme * diff --git a/javascript/LeftAndMain.js b/javascript/LeftAndMain.js index 5ea87535..29080445 100644 --- a/javascript/LeftAndMain.js +++ b/javascript/LeftAndMain.js @@ -20,6 +20,10 @@ onmatch: function() { var self = this; + + // Remove loading screen + $('ss-loading-screen').hide(); + $(document).removeClass('stillLoading'); this._setupPinging(); this._setupButtons(); @@ -290,11 +294,6 @@ function ajaxErrorHandler(response) { errorMessage('Server Error', response); } -function hideLoading() { - if($('Loading')) $('Loading').style.display = 'none'; - Element.removeClassName(document.body, 'stillLoading'); -} - returnFalse = function() { return false; } diff --git a/templates/LeftAndMain.ss b/templates/LeftAndMain.ss index 12075e97..c6fff999 100644 --- a/templates/LeftAndMain.ss +++ b/templates/LeftAndMain.ss @@ -9,7 +9,7 @@ -
<% _t('LOADING','Loading...',PR_HIGH) %>
+
<% _t('LOADING','Loading...',PR_HIGH) %>
$CMSTopMenu