From c96a0cc57dff9d94fb9e28d6bef0e3482a4f8133 Mon Sep 17 00:00:00 2001 From: Felix Niklas Date: Tue, 16 Sep 2014 00:09:42 +0200 Subject: [PATCH] refactor close nav task --- .../app/controllers/taskbar_widget.js.coffee | 2 +- .../app/views/task_widget_tasks.jst.eco | 6 ++- app/assets/stylesheets/zzz.css.erb | 43 +++++++++++-------- 3 files changed, 30 insertions(+), 21 deletions(-) diff --git a/app/assets/javascripts/app/controllers/taskbar_widget.js.coffee b/app/assets/javascripts/app/controllers/taskbar_widget.js.coffee index b97041a91..301889ac4 100644 --- a/app/assets/javascripts/app/controllers/taskbar_widget.js.coffee +++ b/app/assets/javascripts/app/controllers/taskbar_widget.js.coffee @@ -1,6 +1,6 @@ class App.TaskbarWidget extends App.Controller events: - 'click [data-type="close"]': 'remove' + 'click .js-close': 'remove' constructor: -> super diff --git a/app/assets/javascripts/app/views/task_widget_tasks.jst.eco b/app/assets/javascripts/app/views/task_widget_tasks.jst.eco index 42f12db8d..4eb28dadf 100644 --- a/app/assets/javascripts/app/views/task_widget_tasks.jst.eco +++ b/app/assets/javascripts/app/views/task_widget_tasks.jst.eco @@ -4,8 +4,10 @@
<%= item.data.head %>
-
-
+
+
+
+
<% end %> \ No newline at end of file diff --git a/app/assets/stylesheets/zzz.css.erb b/app/assets/stylesheets/zzz.css.erb index b77dd5c0d..d0cc59df3 100644 --- a/app/assets/stylesheets/zzz.css.erb +++ b/app/assets/stylesheets/zzz.css.erb @@ -865,11 +865,6 @@ ol.tabs li { @-ms-keyframes fade { from { opacity: 0 } to { opacity: 1 } } @keyframes fade { from { opacity: 0 } to { opacity: 1 } } - .close-task.icon { - background: #2c2d36; - border-radius: 100%; - } - .organisation.icon { height: 13px; width: 14px; @@ -1591,30 +1586,42 @@ footer { .level-3 .modified.priority.icon:after { background-color: #faab00; border-color: #faab00; - } + } - .task .close-task.button { + .task .closeTask { position: absolute; right: 0; top: 0; - width: 40px; + width: 50px; padding-left: 12px; height: 100%; visibility: hidden; } - .task:hover .close-task.button { - visibility: visible; - } + .task:hover .closeTask { + visibility: visible; + } - .close-task.button:hover .icon { - background: #972e29; - } + .closeTask-inner { + width: 21px; + height: 21px; + background-color: #2c2d36; + border-radius: 100%; + } - .close-task.button:hover .icon:after, - .close-task.button:hover .icon:before { - background: white; - } + .closeTask:hover .closeTask-inner { + background-color: #972e29; + } + + .closeTask .icon { + opacity: 0.3; + -webkit-transform: scale(0.7); + transform: scale(0.7); + } + + .closeTask:hover .icon { + opacity: 1; + } .search { padding: 14px 15px 10px 10px;