From 533ed06eb8bd7d7751cc43984a34a305d6a7c81b Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Thu, 30 Oct 2014 18:44:49 -0500 Subject: [PATCH] Add shortcut titles to query execute and explain buttons --- static/js/app.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/static/js/app.js b/static/js/app.js index f909915..563ae2f 100644 --- a/static/js/app.js +++ b/static/js/app.js @@ -274,8 +274,20 @@ function initEditor() { }]); } +function addShortcutTooltips() { + if (navigator.userAgent.indexOf("OS X") > 0) { + $("#run").attr("title", "Shortcut: ⌘+Enter"); + $("#explain").attr("title", "Shortcut: ⌘+E"); + } + else { + $("#run").attr("title", "Shortcut: Ctrl+Enter"); + $("#explain").attr("title", "Shortcut: Ctrl+E"); + } +} + $(document).ready(function() { initEditor(); + addShortcutTooltips(); $("#table_content").on("click", function() { showTableContent(); }); $("#table_structure").on("click", function() { showTableStructure(); });