From f51d0ce001fb0d7e2802e55556ad634e904e4f77 Mon Sep 17 00:00:00 2001 From: Jessica McKellar Date: Wed, 29 May 2013 13:46:24 -0400 Subject: [PATCH] onboarding: only show the app popover on mouseover once. (imported from commit 45d9c7de583e3243e0e65f09392fb15ad5ea2043) --- zephyr/static/js/onboarding.js | 20 ++++++++++++++++++-- zephyr/static/styles/fonts.css | 1 + zephyr/static/styles/zephyr.css | 7 +++++++ 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/zephyr/static/js/onboarding.js b/zephyr/static/js/onboarding.js index 26e78609d2..0a0f3f24a9 100644 --- a/zephyr/static/js/onboarding.js +++ b/zephyr/static/js/onboarding.js @@ -88,10 +88,26 @@ function set_app_sticky_popover() { if (!$(this).data('popover').tip().hasClass('in')) { item.popover('show'); - // Clicking the Done button inside the popover closes it. + // Clicking the Done button inside the popover closes it, removes + // the mousenter event handler so it doesn't keep popping up if you + // mouse around in that area, and instead reveals a ? to the right + // of the checklist item you can click to revisit the content if you + // want to. $("#sticky_done").on("click", function (e) { item.popover('hide'); - exports.mark_checklist_step("made_app_sticky"); + if (item.find("#pin_info_question").length === 0) { + item.unbind("mouseenter"); + var info_span = $('' + + ''); + info_span.click(function () { + item.popover("show"); + $("#sticky_done").on("click", function (e) { + item.popover('hide'); + }); + }); + item.append(info_span); + exports.mark_checklist_step("made_app_sticky"); + } }); } }); diff --git a/zephyr/static/styles/fonts.css b/zephyr/static/styles/fonts.css index df6e462e6e..224a841c6c 100644 --- a/zephyr/static/styles/fonts.css +++ b/zephyr/static/styles/fonts.css @@ -472,3 +472,4 @@ ul.icons li [class*=" icon-vector-"] { .icon-vector-eraser:before { content: "\f12d"; } .icon-vector-envelope:before { content: "\f003"; } .icon-vector-tag:before { content: "\f02b"; } +.icon-vector-question-sign:before { content: "\f059"; } diff --git a/zephyr/static/styles/zephyr.css b/zephyr/static/styles/zephyr.css index e61f96742e..d7b54703f4 100644 --- a/zephyr/static/styles/zephyr.css +++ b/zephyr/static/styles/zephyr.css @@ -1563,3 +1563,10 @@ li.expanded_subject { width: 280px; text-align: left; } + +#pin_info_question { + padding-left: 3px; +} +#pin_info_question:hover { + cursor: pointer; +}