From af335c48fc3f4a741e7b5650db46aac48183c244 Mon Sep 17 00:00:00 2001 From: ewinslow Date: Mon, 1 Nov 2010 22:49:31 +0000 Subject: Fixes #2318: Adjusted system message markup + styles to work with ajax actions git-svn-id: http://code.elgg.org/elgg/trunk@7185 36083f99-b078-4883-b0ff-0f9b5a30f544 --- engine/js/lib/elgglib.js | 9 +-------- views/default/css.php | 19 +++++++++++-------- views/default/messages/errors/list.php | 14 ++++++-------- views/default/messages/list.php | 13 +++++++++---- views/default/messages/messages/list.php | 15 ++++++--------- 5 files changed, 33 insertions(+), 37 deletions(-) diff --git a/engine/js/lib/elgglib.js b/engine/js/lib/elgglib.js index 208c02716..5c32deaaf 100644 --- a/engine/js/lib/elgglib.js +++ b/engine/js/lib/elgglib.js @@ -144,14 +144,7 @@ elgg.system_messages = function(msgs, delay, type) { var messages_html = []; for (var i in msgs) { - messages_html.push('
' - + '' - + '' - + elgg.echo('systemmessages:dismiss') - + '' - + '' - + '

' + msgs[i] + '

' - + '
'); + messages_html.push('

' + msgs[i] + '

'); } $(messages_html.join('')).appendTo('#elgg_system_messages').animate({opacity:'1.0'},delay).fadeOut('slow'); diff --git a/views/default/css.php b/views/default/css.php index b4d88e7d9..076bfdb62 100644 --- a/views/default/css.php +++ b/views/default/css.php @@ -621,27 +621,30 @@ li.navigation_more ul li { /* *************************************** SYSTEM MESSAGES *************************************** */ -#elgg_system_message { +#elgg_system_messages { + position:fixed; + right:20px; + max-width: 500px; + z-index: 9600; +} + +.elgg_system_message { background-color:black; color:white; font-weight: bold; display:block; padding:3px 10px; - z-index: 9600; - position:fixed; - right:20px; margin-top:10px; - width:auto; - max-width: 500px; cursor: pointer; opacity:0.9; -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45); -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45); + z-index: 9600; } -#elgg_system_message.error { +.elgg_system_message.error { background-color:red; } -#elgg_system_message p { +.elgg_system_message p { margin:0; } diff --git a/views/default/messages/errors/list.php b/views/default/messages/errors/list.php index 922f23787..5f675715d 100644 --- a/views/default/messages/errors/list.php +++ b/views/default/messages/errors/list.php @@ -10,15 +10,13 @@ */ if (!empty($vars['object']) && is_array($vars['object'])) { - -?> - + + + -if (!empty($vars['object']) && is_array($vars['object']) && sizeof($vars['object']) > 0) { - foreach($vars['object'] as $register => $list ) { - echo elgg_view("messages/{$register}/list", array('object' => $list)); +
+ 0) { + foreach($vars['object'] as $register => $list ) { + echo elgg_view("messages/{$register}/list", array('object' => $list)); + } } -} +?> +
\ No newline at end of file diff --git a/views/default/messages/messages/list.php b/views/default/messages/messages/list.php index 07fae11e7..1d69c0289 100644 --- a/views/default/messages/messages/list.php +++ b/views/default/messages/messages/list.php @@ -10,16 +10,13 @@ */ if (!empty($vars['object']) && is_array($vars['object'])) { - -?> - - + $message)); ?> + + +