From 7acb4cb99d215c8c0fab7cfe27d7395dd73afee0 Mon Sep 17 00:00:00 2001 From: ninadsp Date: Wed, 4 Aug 2010 22:58:05 +0530 Subject: [PATCH] Finalised CSS rules for the Ajax notification division. It now centers correctly and handles not very large messages pretty well. --- js/functions.js | 5 +++- .../darkblue_orange/css/theme_right.css.php | 26 +++++++++++++++++++ themes/original/css/theme_right.css.php | 15 +++++++++-- 3 files changed, 43 insertions(+), 3 deletions(-) diff --git a/js/functions.js b/js/functions.js index 9c6383b28..27a9caaf3 100755 --- a/js/functions.js +++ b/js/functions.js @@ -1771,8 +1771,11 @@ function PMA_ajaxShowMessage(message, timeout) { if( !ajax_message_init) { $(function(){ + $('
') + .insertBefore("#serverinfo"); + $('') - .insertBefore("#serverinfo") + .appendTo("#loading_parent") .html(msg) .slideDown('medium') .delay(to) diff --git a/themes/darkblue_orange/css/theme_right.css.php b/themes/darkblue_orange/css/theme_right.css.php index 8a21e1574..66c3c6e18 100755 --- a/themes/darkblue_orange/css/theme_right.css.php +++ b/themes/darkblue_orange/css/theme_right.css.php @@ -1334,3 +1334,29 @@ table#serverconnection_trg_local { */ .invalid_value {background:#F00;} + +/** + * Ajax notification styling + */ + .ajax_notification { + top: 0px; + position: fixed; + margin-top: 0; + margin-right: auto; + margin-bottom: 0; + margin-left: auto; + padding: 3px 5px; + min-width: 70px; + max-width: 350px; + background-color: #FF9900; + z-index: 1100; + text-align: center; + display: block; + left: 0; + right: 0; + } + + #loading_parent { + position: relative; + width: 100%; + } \ No newline at end of file diff --git a/themes/original/css/theme_right.css.php b/themes/original/css/theme_right.css.php index 4df00e0c8..7f13c7d9d 100755 --- a/themes/original/css/theme_right.css.php +++ b/themes/original/css/theme_right.css.php @@ -1273,12 +1273,23 @@ table#serverconnection_trg_local { */ .ajax_notification { top: 0px; - left: 45%; position: fixed; - margin: 0 auto; + margin-top: 0; + margin-right: auto; + margin-bottom: 0; + margin-left: auto; padding: 3px 5px; min-width: 70px; + max-width: 350px; background-color: #FFD700; z-index: 1100; text-align: center; + display: block; + left: 0; + right: 0; + } + + #loading_parent { + position: relative; + width: 100%; } \ No newline at end of file