From 2e2cb3e768c86c6f8984f331d467fa60be8536f0 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 27 Dec 2012 21:37:48 +0100 Subject: button for progress popover --- module/web/static/css/default/style.less | 15 +++++++++------ module/web/static/js/views/headerView.js | 11 +++++++++++ 2 files changed, 20 insertions(+), 6 deletions(-) (limited to 'module/web/static') diff --git a/module/web/static/css/default/style.less b/module/web/static/css/default/style.less index 9dec0bce4..a1f80710c 100644 --- a/module/web/static/css/default/style.less +++ b/module/web/static/css/default/style.less @@ -58,7 +58,7 @@ background-image: linear-gradient(@origin, @start, @stop); } -.transition(@prop: all, @time: 1s, @ease: linear) { +.transition(@prop: all, @time: 0.25s, @ease: linear) { -webkit-transition: @prop @time @ease; -moz-transition: @prop @time @ease; -o-transition: @prop @time @ease; @@ -298,27 +298,31 @@ header .logo { #progress-area { position: relative; + text-align: center; float: right; width: 26%; margin-right: 15px; - text-align: left; + line-height: 16px; .popover { // display: block; width: 120%; left: -60%; // Half of width margin-left: 50%; - top: 100% + top: 100%; } .popover-title, .popover-content { color: @greyDark; } + i.icon-tasks { + cursor: pointer; + } + .close { line-height: 14px; } - } .progress-list { @@ -343,14 +347,13 @@ header .logo { } } } - } #globalprogress { background-color: @greyDark; background-image: none; height: 15px; - margin: 8px 0 0; + margin: 5px 0 0; line-height: 15px; border-radius: 15px; border: 3px solid @grey; diff --git a/module/web/static/js/views/headerView.js b/module/web/static/js/views/headerView.js index 9f7dda044..dd1030220 100644 --- a/module/web/static/js/views/headerView.js +++ b/module/web/static/js/views/headerView.js @@ -5,6 +5,8 @@ define(['jquery', 'backbone', 'flot'], function($, Backbone) { el: 'header', events: { + 'click i.icon-tasks': 'show_taskList', + 'click .popover .close': 'hide_taskList', 'click .btn-grabber': 'open_grabber' }, @@ -74,6 +76,15 @@ define(['jquery', 'backbone', 'flot'], function($, Backbone) { render: function() { }, + show_taskList: function() { + // TODO: fix animation + this.$('.popover').transit({'opacity': 'show'}); + }, + + hide_taskList: function() { + this.$('.popover').transit({'opacity': 'hide'}); + }, + open_grabber: function() { var self = this; _.requireOnce(['views/linkGrabberModal'], function(modalView) { -- cgit v1.2.3