aboutsummaryrefslogtreecommitdiffstats
path: root/completionDialog.js
diff options
context:
space:
mode:
authorPhil Crosby2012-01-15 19:20:26 -0800
committerPhil Crosby2012-01-15 19:20:26 -0800
commit73f8a90bff353e6b3c1e61c0d339d95f2c349cd4 (patch)
treedfd7e6330be8185637ae3aa8fb4e6bc2eb2dc10b /completionDialog.js
parent012fade804efdcd6e551ba26e2cea6d906e8bb18 (diff)
parentd2118277a39ddb89e95dbcc2c339b15923caea74 (diff)
downloadvimium-73f8a90bff353e6b3c1e61c0d339d95f2c349cd4.tar.bz2
Merge pull request #409 from venshi/master
Greater specificity for the linkhints CSS
Diffstat (limited to 'completionDialog.js')
-rw-r--r--completionDialog.js51
1 files changed, 8 insertions, 43 deletions
diff --git a/completionDialog.js b/completionDialog.js
index f264eb2a..eec089a0 100644
--- a/completionDialog.js
+++ b/completionDialog.js
@@ -14,6 +14,7 @@
handlerStack.push({ keydown: this.onKeydown });
render.call(this);
clearInterval(this._tweenId);
+ this.container.style.display = "block";
this._tweenId = Tween.fade(this.container, 1.0, 150);
}
},
@@ -41,7 +42,6 @@
var initialize = function() {
var self = this;
- addCssToPage(completionCSS);
self.currentSelection = 0;
@@ -94,27 +94,27 @@
container.style.display = "";
if (searchString === undefined) {
- this.container.className = "vimium-dialog";
+ this.container.className = "vimiumReset vimium-dialog";
createDivInside(container).innerHTML = this.options.initialSearchText || "Begin typing";
}
else {
- this.container.className = "vimium-dialog vimium-completions";
+ this.container.className = "vimiumReset vimium-dialog vimium-completions";
var searchBar = createDivInside(container);
searchBar.innerHTML=searchString;
- searchBar.className="vimium-searchBar";
+ searchBar.className="vimiumReset vimium-searchBar";
searchResults = createDivInside(container);
- searchResults.className="vimium-searchResults";
+ searchResults.className="vimiumReset vimium-searchResults";
if (completions.length<=0) {
var resultDiv = createDivInside(searchResults);
- resultDiv.className="vimium-noResults";
+ resultDiv.className="vimiumReset vimium-noResults";
resultDiv.innerHTML="No results found";
}
else {
for (var i = 0; i < completions.length; i++) {
var resultDiv = createDivInside(searchResults);
if (i === this.currentSelection) {
- resultDiv.className="vimium-selected";
+ resultDiv.className="vimiumReset vimium-selected";
}
resultDiv.innerHTML=this.options.renderOption(searchString, completions[i]);
}
@@ -127,6 +127,7 @@
};
var createDivInside = function(parent) {
var element = document.createElement("div");
+ element.className = "vimiumReset";
parent.appendChild(element);
return element;
}
@@ -139,42 +140,6 @@
}
}
- var completionCSS = ".vimium-dialog {"+
- "position:fixed;"+
- "background-color: #ebebeb;" +
- "z-index: 99999998;" +
- "border: 1px solid #b3b3b3;" +
- "font-size: 12px;" +
- "text-align:left;"+
- "color: black;" +
- "padding:10px;"+
- "border-radius: 4px;" +
- "font-family: Lucida Grande, Arial, Sans;" +
- "}"+
- ".vimium-completions {"+
- "width:400px;"+
- "}"+
- ".vimium-completions .vimium-searchBar {"+
- "height: 15px;"+
- "border-bottom: 1px solid #b3b3b3;"+
- "}"+
- ".vimium-completions .vimium-searchResults {"+
- "}"+
- ".vimium-completions .vimium-searchResults .vimium-selected{"+
- "background-color:#aaa;"+
- "border-radius: 4px;" +
- "}"+
- ".vimium-completions div{"+
- "padding:4px;"+
- "}"+
- ".vimium-completions div strong{"+
- "color: black;" +
- "font-weight:bold;"+
- "}"+
- ".vimium-completions .vimium-noResults{"+
- "color:#555;"+
- "}";
-
window.CompletionDialog = CompletionDialog;
}(window, document))