diff options
| author | ilya | 2011-02-11 18:27:09 -0800 |
|---|---|---|
| committer | ilya | 2011-02-11 18:27:09 -0800 |
| commit | c65e85a840ba25ee59141b8ae1c424ec804c81f9 (patch) | |
| tree | 56f80fbe848d0a241ba86fa4a7fcaa2f4db9c1a7 /options.html | |
| parent | 01c974dc057cc36a21375c460ca6c668d31c4d0d (diff) | |
| download | vimium-c65e85a840ba25ee59141b8ae1c424ec804c81f9.tar.bz2 | |
Make the options page use the normal help dialog code path when its showing the command view. This fixes a regression with the new advanced commands functionality -- the command view wasn't showing at all.
Diffstat (limited to 'options.html')
| -rw-r--r-- | options.html | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/options.html b/options.html index f52cb6ec..4e2f6ecc 100644 --- a/options.html +++ b/options.html @@ -75,8 +75,6 @@ <script type="text/javascript"> $ = function(id) { return document.getElementById(id); }; - currentlyShowingDialog = null; - var defaultSettings = chrome.extension.getBackgroundPage().defaultSettings; var editableFields = ["scrollStepSize", "defaultZoomLevel", "excludedUrls", "linkHintCharacters", @@ -99,8 +97,8 @@ $(editableFields[i]).addEventListener("keyup", onOptionKeyup, false); $("advancedOptions").addEventListener("click", openAdvancedOptions, false); $("showCommands").addEventListener("click", function () { - showDialog("vimiumCommandListingContainer", - chrome.extension.getBackgroundPage().helpDialogHtml(true, true, "Command Listing")); + showHelpDialog( + chrome.extension.getBackgroundPage().helpDialogHtml(true, true, "Command Listing"), frameId); }, false); } @@ -164,30 +162,6 @@ elements[i].style.display = (elements[i].style.display == "table-row") ? "none" : "table-row"; event.preventDefault(); } - - function showDialog(dialogId, dialogHtml) { - if (currentlyShowingDialog) - return false; - - currentlyShowingDialog = dialogId; - var container = document.createElement("div"); - container.id = currentlyShowingDialog; - container.innerHTML = dialogHtml; - container.getElementsByClassName("closeButton")[0].addEventListener("click", hideDialog, false); - container.getElementsByClassName("optionsPage")[0].style.display = 'none'; - document.body.appendChild(container); - var dialog = document.getElementById("vimiumHelpDialog"); - dialog.style.top = Math.max((window.innerHeight - dialog.clientHeight) / 2.0, 20) + "px"; - } - - function hideDialog() { - var dialog = document.getElementById(currentlyShowingDialog); - if (dialog) - dialog.parentNode.removeChild(dialog); - - currentlyShowingDialog = null; - } - </script> </head> |
