From 0a1d2d6ff4b31d2a05f75dafebd011dc8c7749ef Mon Sep 17 00:00:00 2001 From: Philippe Barbosa Date: Wed, 23 Mar 2016 19:59:18 +0100 Subject: [PATCH] Better naming for message : Now it's a notification --- app/festival/static/css/index.css | 43 +------------------ app/festival/static/js/index.js | 8 ++-- .../static/scss/components/_messages.scss | 39 +---------------- app/templates/base.html | 4 +- 4 files changed, 10 insertions(+), 84 deletions(-) diff --git a/app/festival/static/css/index.css b/app/festival/static/css/index.css index 4f676513..dedaf402 100755 --- a/app/festival/static/css/index.css +++ b/app/festival/static/css/index.css @@ -2013,7 +2013,7 @@ th { * Core */ /* line 9, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_messages.scss */ -.message { +.notification { display: inline-block; *display: inline; *zoom: 1; @@ -2038,7 +2038,7 @@ th { } /* line 30, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_messages.scss */ -.message__remove { +.notification__remove { -webkit-animation-name: slideOutRight; animation-name: slideOutRight; -webkit-animation-duration: 0.8s; @@ -2151,45 +2151,6 @@ th { animation-name: slideOutRight; } -/** - * Colors - */ -/* line 90, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_messages.scss */ -.message-success { - background: #d1f5e0; - border: 1px solid #2ecc71; - color: #1b7943; -} - -/* line 96, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_messages.scss */ -.message-error { - background: #fdf3f2; - border: 1px solid #e74c3c; - color: #a82315; -} - -/* line 102, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_messages.scss */ -.message-warning { - background: #fdedd4; - border: 1px solid #f39c12; - color: #976008; -} - -/* line 108, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_messages.scss */ -.message-info { - background: #e1f0fa; - border: 1px solid #3498db; - color: #196090; -} - -/** - * Fit message width to parent - */ -/* line 118, /Users/philippebarbosa/Sites/ircam-manifeste/app/festival/static/scss/components/_messages.scss */ -.message-block { - width: 100%; -} - /** * Core */ diff --git a/app/festival/static/js/index.js b/app/festival/static/js/index.js index 183d5af3..c4c9a8f0 100644 --- a/app/festival/static/js/index.js +++ b/app/festival/static/js/index.js @@ -123,13 +123,13 @@ $(function() { * Close message */ - var zeMessage = $('#js-messageContainer'); + var notification = $('#js-notificationContainer'); - $('.js-messageClose').on('click', function(event) { - zeMessage.addClass('message__remove'); + $('.js-notificationClose').on('click', function(event) { + notification.addClass('notification__remove'); setTimeout(function () { - zeMessage.remove(); + notification.remove(); }, 4000); }); }); \ No newline at end of file diff --git a/app/festival/static/scss/components/_messages.scss b/app/festival/static/scss/components/_messages.scss index 3d48bd93..0bbd0fbf 100755 --- a/app/festival/static/scss/components/_messages.scss +++ b/app/festival/static/scss/components/_messages.scss @@ -6,7 +6,7 @@ /** * Core */ -.message { +.notification { display: inline-block; *display: inline; *zoom: 1; @@ -27,7 +27,7 @@ color: $base_link_color; } -.message__remove { +.notification__remove { animation-name: slideOutRight; animation-duration: 0.8s; animation-fill-mode: both; @@ -82,39 +82,4 @@ .slideOutRight { animation-name: slideOutRight; -} - -/** - * Colors - */ -.message-success { - background: lighten($success, 40); - border: 1px solid $success; - color: darken($success, 20); -} - -.message-error { - background: lighten($error, 40); - border: 1px solid $error; - color: darken($error, 20); -} - -.message-warning { - background: lighten($warning, 40); - border: 1px solid $warning; - color: darken($warning, 20); -} - -.message-info { - background: lighten($info, 40); - border: 1px solid $info; - color: darken($info, 20); -} - - -/** - * Fit message width to parent - */ -.message-block { - width: 100%; } \ No newline at end of file diff --git a/app/templates/base.html b/app/templates/base.html index 4b9d10bc..a9791cba 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -111,8 +111,8 @@ {% nevercache %} {% if messages %} {% for message in messages %} -
- +
+ {{ message }}
{% endfor %} -- 2.39.5