Show desktop apps alert when tutorial completes

(imported from commit 7719ec798dbcca519fd79ac8da9196e1a862764f)
This commit is contained in:
Kevin Mehall
2013-09-19 10:30:08 -04:00
parent 1b4ee0c027
commit bc36aad698
3 changed files with 16 additions and 2 deletions

View File

@@ -127,6 +127,15 @@ var fake_messages = [
}
];
function hide_desktop_app_alert() {
$('#alert-bar-container').slideUp(100);
}
function show_desktop_app_alert() {
$('#alert-bar-container').show();
$('#alert-bar-container .close-alert-icon').expectOne().click(hide_desktop_app_alert);
}
function disable_event_handlers() {
$('body').css({'overflow':'hidden'}); // prevents scrolling the feed
_.each(["keydown", "keyup", "keypress", "scroll"], function (event_name) {
@@ -256,6 +265,7 @@ function finale() {
callback();
});
deferred_work = [];
show_desktop_app_alert();
}
function reply() {

View File

@@ -2770,6 +2770,10 @@ div.edit_bot {
right: 0px;
}
#home .alert-bar .close-alert-icon:hover{
opacity: 0.7;
}
#settings-change-box .gravatar-profile {
width: 60px;
height: 60px;

View File

@@ -1,8 +1,8 @@
{# Home tab of the app, containing messages. #}
<div id="alert-bar-container" class="alert-bar-container">
<div id="alert-bar-container" class="alert-bar-container" style='display: none;'>
<div id="alert-bar" class="alert-bar">
<div id="alert-bar-contents" class="alert-bar-contents">
<i class="icon-vector-desktop alert-icon"></i> Have you heard: the <a href="#">Zulip desktop app</a> is awesome and you should get it!
<i class="icon-vector-desktop alert-icon"></i> Have you heard: the <a href="/apps" target="_blank">Zulip desktop app</a> is awesome and you should get it!
<i class="icon-vector-remove close-alert-icon"></i>
</div>
</div>