From cc09af6921228033b822ef4ad4713abd26c375e7 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 11 Dec 2016 14:18:59 +0000 Subject: Rework help-dialog HTML. Previously, the dynamic HTML for the help dialog was generated on the background page. The HTML itself was tangled in with program logic. Here, we move all of the HTML to HTML5 templates; also, we build the help-dialog contents in the help dialog itself, not on the background page. Note: #2368 is included here too. (Background: I'm trying to clean up some of the command and help-dialog logic in preparation for addressing the issue of how to document command options, see #2319.) --- content_scripts/vimium.css | 5 ++++- content_scripts/vimium_frontend.coffee | 3 +-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'content_scripts') diff --git a/content_scripts/vimium.css b/content_scripts/vimium.css index edb1ab85..3e8f65d6 100644 --- a/content_scripts/vimium.css +++ b/content_scripts/vimium.css @@ -243,7 +243,7 @@ div#vimiumHelpDialog td.vimiumHelpDescription { font-family:"Helvetica Neue",Helvetica,Arial,sans-serif; font-size:14px; } -div#vimiumHelpDialog span.commandName { +div#vimiumHelpDialog span.vimiumCopyCommandNameName { font-style: italic; cursor: pointer; font-size: 12px; @@ -275,6 +275,9 @@ div#vimiumHelpDialogFooter { position: relative; margin-bottom: 37px; } +table.helpDialogBottom { + width:100%; +} td.helpDialogBottomRight { width:100%; float:right; diff --git a/content_scripts/vimium_frontend.coffee b/content_scripts/vimium_frontend.coffee index fcca98ab..21826944 100644 --- a/content_scripts/vimium_frontend.coffee +++ b/content_scripts/vimium_frontend.coffee @@ -646,8 +646,7 @@ enterFindMode = -> new FindMode() window.showHelp = (sourceFrameId) -> - chrome.runtime.sendMessage handler: "getHelpDialogHtml", (response) -> - HelpDialog.toggle {sourceFrameId, html: response} + HelpDialog.toggle {sourceFrameId, showAllCommandDetails: false} # If we are in the help dialog iframe, then HelpDialog is already defined with the necessary functions. window.HelpDialog ?= -- cgit v1.2.3