onboarding: only show the app popover on mouseover once.

(imported from commit 45d9c7de583e3243e0e65f09392fb15ad5ea2043)
This commit is contained in:
Jessica McKellar 2013-05-29 13:46:24 -04:00
parent bbd2322586
commit f51d0ce001
3 changed files with 26 additions and 2 deletions

View File

@ -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');
if (item.find("#pin_info_question").length === 0) {
item.unbind("mouseenter");
var info_span = $('<span id="pin_info_question">' +
'<i class="icon-vector-question-sign"></i></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");
}
});
}
});

View File

@ -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"; }

View File

@ -1563,3 +1563,10 @@ li.expanded_subject {
width: 280px;
text-align: left;
}
#pin_info_question {
padding-left: 3px;
}
#pin_info_question:hover {
cursor: pointer;
}