From 92fc54287222aed74cd0d2e0c13798e665a861ba Mon Sep 17 00:00:00 2001 From: Leo Franchi Date: Fri, 12 Jul 2013 11:00:32 -0400 Subject: [PATCH] Show a on-hover cog for going directly to stream settings page (imported from commit 9ba04d88daacd475d9b85ce7c8bd925840290535) --- templates/zephyr/left-sidebar.html | 8 +++++-- zephyr/static/js/ui.js | 9 ++++++++ zephyr/static/styles/zephyr.css | 36 +++++++++++++++++++++++++----- 3 files changed, 46 insertions(+), 7 deletions(-) diff --git a/templates/zephyr/left-sidebar.html b/templates/zephyr/left-sidebar.html index d06e396a59..c8ebecc77d 100644 --- a/templates/zephyr/left-sidebar.html +++ b/templates/zephyr/left-sidebar.html @@ -20,8 +20,12 @@
  • Starred messages
  • @-mentions()
  • -
    STREAMS
    - +
    +

    STREAMS

    + +
    + +
    diff --git a/zephyr/static/js/ui.js b/zephyr/static/js/ui.js index 8a303cab08..c002448ca4 100644 --- a/zephyr/static/js/ui.js +++ b/zephyr/static/js/ui.js @@ -1170,6 +1170,15 @@ $(function () { popovers.hide_all(); }); + $('#streams_inline_cog').tooltip({ placement: 'left', + animation: false }); + + $('#streams_header a').click(function (e) { + exports.change_tab_to('#subscriptions'); + + e.preventDefault(); + }); + $('#stream_filters li').on('click', 'a.subscription_name', function (e) { if (exports.home_tab_obscured()) { ui.change_tab_to('#home'); diff --git a/zephyr/static/styles/zephyr.css b/zephyr/static/styles/zephyr.css index 84679eeae6..389219ecab 100644 --- a/zephyr/static/styles/zephyr.css +++ b/zephyr/static/styles/zephyr.css @@ -241,20 +241,46 @@ a:hover code { margin-top: 1em; } -#streams_title { - font-size: 0.9em; - font-weight: 275; - +#streams_list { border-top: 1px solid #eee; margin-top: 5px; margin-left: 10px; } +.streams_title { + font-size: 0.9em; + font-weight: normal; + + display: inline; +} + +#streams_list:hover #streams_inline_cog { + visibility: visible; + opacity: 0.5; +} + +#streams_list #streams_inline_cog:hover { + opacity: 1.0; +} + +#streams_inline_cog { + float: right; + color: #000; + text-decoration: none; + visibility: hidden; + + margin-top: 3px; +} + +.tooltip { + max-width: 10em; +} + #stream_filters { border-bottom: 1px solid #eee; overflow-y: hidden; - margin: 2px 0px 10px 10px; + margin: 2px 0px 10px 0px; padding: 2px 15px 10px 0; }