From 6de1d1850a2932a955f5834add690228676411aa Mon Sep 17 00:00:00 2001 From: Eike Foken Date: Thu, 11 Aug 2011 17:46:10 +0200 Subject: [PATCH] Add a small cross to close notifications --- application/views/global/notifications.php | 49 ++++++----------- assets/css/style.css | 62 ++++++++++++---------- 2 files changed, 51 insertions(+), 60 deletions(-) diff --git a/application/views/global/notifications.php b/application/views/global/notifications.php index a77456f..22a43b3 100644 --- a/application/views/global/notifications.php +++ b/application/views/global/notifications.php @@ -1,33 +1,16 @@ - - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -if (is_array($messages)): - foreach ($messages as $type => $msgs): - if (count($msgs > 0)): - foreach ($msgs as $message): - echo ('
' . $message . '
'); - endforeach; - endif; - endforeach; -endif; + $msgs): + if (count($msgs > 0)): + foreach ($msgs as $message): +?> +
+ + X +
+ diff --git a/assets/css/style.css b/assets/css/style.css index 78e5df6..041e3c1 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -21,39 +21,47 @@ p { margin: 0px 0px 20px 0px; line-height: 18px;} ul { margin: 5px 0px 15px 0px; padding: 0px;} li { margin-left: 20px;} -div.notice { - margin: 0 0 15px; - padding: 0 10px; - background: #fffbcc; - border: 1px solid #e6db55; - line-height: 25px; - color: #222; -} - -div.success { - margin: 0 0 15px; - padding: 0 10px; - background: #d1ecb8; - border: 1px solid #81c445; - line-height: 25px; - color: #222; -} - -div.error { - margin: 0 0 15px; - padding: 0 10px; - background: #ffebe8; - border: 1px solid #f0baa2; - line-height: 25px; - color: #222; -} - .editable { background: #fffbcc; } .clear { clear:both;} +/* Notifications */ + +#notifications div { + margin: 0 0 15px; + padding: 0 10px; + line-height: 25px; + color: #222; +} + +#notifications div a.cross { + float: right; + background: url(../images/icons/cross-small.png) right center no-repeat; + width: 16px; + height: 25px; +} + +#notifications div a.cross span { + display: none; +} + +div.notice { + background: #fffbcc; + border: 1px solid #e6db55; +} + +div.success { + background: #d1ecb8; + border: 1px solid #81c445; +} + +div.error { + background: #ffebe8; + border: 1px solid #f0baa2; +} + /* Header */ #header {