mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Add button to exit the Zulip tutorial.
Fixes: #872. [Tweaked by tabbott to fix focus and rename to "Exit tutorial".]
This commit is contained in:
@@ -321,16 +321,21 @@ function update_popover_info(popover_func) {
|
|||||||
current_popover_info = popover_func;
|
current_popover_info = popover_func;
|
||||||
}
|
}
|
||||||
|
|
||||||
function finale() {
|
function finale(skip) {
|
||||||
var finale_modal = $("#tutorial-finale");
|
var finale_modal = $("#tutorial-finale");
|
||||||
$(".screen").css({opacity: 0.0});
|
if (skip) {
|
||||||
finale_modal.css("z-index", 20001);
|
|
||||||
finale_modal.modal("show");
|
|
||||||
|
|
||||||
$("#tutorial-get-started").click(function () {
|
|
||||||
finale_modal.modal("hide");
|
finale_modal.modal("hide");
|
||||||
$(".screen").css({opacity: 0.0, width: 0, height: 0});
|
$(".screen").css({opacity: 0.0, width: 0, height: 0});
|
||||||
}).focus();
|
} else {
|
||||||
|
$(".screen").css({opacity: 0.0});
|
||||||
|
finale_modal.css("z-index", 20001);
|
||||||
|
finale_modal.modal("show");
|
||||||
|
|
||||||
|
$("#tutorial-get-started").click(function () {
|
||||||
|
finale_modal.modal("hide");
|
||||||
|
$(".screen").css({opacity: 0.0, width: 0, height: 0});
|
||||||
|
}).focus();
|
||||||
|
}
|
||||||
|
|
||||||
// Restore your actual stream colors and rerender to display any
|
// Restore your actual stream colors and rerender to display any
|
||||||
// messages received during the tutorial.
|
// messages received during the tutorial.
|
||||||
@@ -430,7 +435,7 @@ function reply() {
|
|||||||
|
|
||||||
$("#tutorial-reply-next").click(function () {
|
$("#tutorial-reply-next").click(function () {
|
||||||
spotlight_message.popover("destroy");
|
spotlight_message.popover("destroy");
|
||||||
finale();
|
finale(false);
|
||||||
}).focus();
|
}).focus();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -509,6 +514,10 @@ function welcome() {
|
|||||||
bar.popover("destroy");
|
bar.popover("destroy");
|
||||||
stream();
|
stream();
|
||||||
}).focus();
|
}).focus();
|
||||||
|
$("#tutorial-message-skip").click(function () {
|
||||||
|
bar.popover("destroy");
|
||||||
|
finale(true);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
exports.start = function () {
|
exports.start = function () {
|
||||||
|
|||||||
@@ -3804,6 +3804,10 @@ form.admin-realm .control-label {
|
|||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-skip {
|
||||||
|
margin-right: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
#share-the-love {
|
#share-the-love {
|
||||||
margin-left: 0px;
|
margin-left: 0px;
|
||||||
margin-right: 0px;
|
margin-right: 0px;
|
||||||
|
|||||||
@@ -6,6 +6,9 @@
|
|||||||
{{#tr this}}<p>Messages in __page_params.product_name__ go to a <b>stream</b> and have a <b>topic</b>.</p>{{/tr}}
|
{{#tr this}}<p>Messages in __page_params.product_name__ go to a <b>stream</b> and have a <b>topic</b>.</p>{{/tr}}
|
||||||
|
|
||||||
<div class="tutorial-done-button">
|
<div class="tutorial-done-button">
|
||||||
|
<center>
|
||||||
|
<button class="btn btn-skip" type="submit" id="tutorial-message-skip">{{t "Exit Tutorial" }}</button>
|
||||||
<button class="btn btn-primary" type="submit" id="tutorial-message-next">{{t "Next" }}</button>
|
<button class="btn btn-primary" type="submit" id="tutorial-message-next">{{t "Next" }}</button>
|
||||||
|
</center>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user