From 13f31bbfc67c1323aa4fecaea93b891d64df571c Mon Sep 17 00:00:00 2001 From: benweet Date: Wed, 25 Dec 2013 23:14:23 +0100 Subject: [PATCH] Added markdown syntax tooltip at the end of welcome tour --- public/res/extensions/welcomeTour.js | 15 ++++++++++++++- public/res/html/buttonMarkdownSyntax.html | 2 +- public/res/styles/main.less | 1 + 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/public/res/extensions/welcomeTour.js b/public/res/extensions/welcomeTour.js index cde952c0..7425ee5e 100644 --- a/public/res/extensions/welcomeTour.js +++ b/public/res/extensions/welcomeTour.js @@ -21,6 +21,19 @@ define([ }, onEnd: function() { storage.welcomeTour = 'done'; + var tooltip = $('.button-markdown-syntax').parent().tooltip({ + html: true, + container: $('.extension-preview-buttons'), + placement: 'bottom', + trigger: 'manual', + title: 'Need help with Markdown syntax?' + }).tooltip('show').addClass('info-tooltip'); + tooltip.one('click', function() { + tooltip.tooltip('hide').removeClass('info-tooltip'); + }); + setTimeout(function() { + tooltip.tooltip('hide').removeClass('info-tooltip'); + }, 10000); }, template: [ '
', @@ -32,7 +45,7 @@ define([ ' ', ' ', '
' - ].join("") + ].join(""), }); tour.addSteps([ { diff --git a/public/res/html/buttonMarkdownSyntax.html b/public/res/html/buttonMarkdownSyntax.html index ca0f8329..15973653 100644 --- a/public/res/html/buttonMarkdownSyntax.html +++ b/public/res/html/buttonMarkdownSyntax.html @@ -1,4 +1,4 @@ -