From 91452f438fc5aa66e95177eb06be686e076cb05b Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 16 Oct 2007 12:05:57 +0000 Subject: [PATCH] make each row of the buffer list clickable and jump to the selected buffer --- content/bookmarks.js | 4 ++-- content/buffers.js | 4 ++-- content/ui.js | 8 +++++++- skin/vimperator.css | 11 +++++++++-- 4 files changed, 20 insertions(+), 7 deletions(-) diff --git a/content/bookmarks.js b/content/bookmarks.js index a0f19020..ad519901 100644 --- a/content/bookmarks.js +++ b/content/bookmarks.js @@ -319,7 +319,7 @@ function Bookmarks() //{{{ } - list += "" + title + "" + url + "" + extra + ""; + list += "" + title + "" + url + "" + extra + ""; } list += ""; @@ -473,7 +473,7 @@ function History() //{{{ if (title.length > 50) title = title.substr(0, 47) + "..."; var url = vimperator.util.escapeHTML(items[i][0]); - list += "" + title + "" + url + ""; + list += "" + title + "" + url + ""; } list += ""; diff --git a/content/buffers.js b/content/buffers.js index 0c345797..0911a6d9 100644 --- a/content/buffers.js +++ b/content/buffers.js @@ -247,9 +247,9 @@ function Buffer() //{{{ url = vimperator.util.escapeHTML(url); title = vimperator.util.escapeHTML(title); - list += " " + number + "" + indicator + + list += " " + number + "" + indicator + "" + title + - "" + url + ""; + "" + url + ""; } list += ""; diff --git a/content/ui.js b/content/ui.js index ecbfb766..41f019bb 100644 --- a/content/ui.js +++ b/content/ui.js @@ -694,7 +694,13 @@ function CommandLine() //{{{ break; case "": - if (event.originalTarget.localName.toLowerCase() == "a") + if (event.originalTarget.parentNode.className == "buffer-list") + { + vimperator.tabs.select(parseInt(event.originalTarget.parentNode.firstChild.textContent) - 1); + close_window = true; + break; + } + else if (event.originalTarget.localName.toLowerCase() == "a") { vimperator.open(event.originalTarget.textContent); break; diff --git a/skin/vimperator.css b/skin/vimperator.css index eb976571..17db1679 100644 --- a/skin/vimperator.css +++ b/skin/vimperator.css @@ -145,11 +145,18 @@ the terms of any one of the MPL, the GPL or the LGPL. background-color: #FF6060 !important; /* light red */ color: black !important; } +.hl-URL { + background-color: white; + color: green; + text-decoration: none; +} /* MOW */ #vimperator-multiline-output { overflow: hidden; + background-color: white; + color: black; } #vimperator-multiline-output-content { @@ -172,8 +179,8 @@ the terms of any one of the MPL, the GPL or the LGPL. padding: 0px 2px; } -#vimperator-multiline-output-content a { - text-decoration: none; +#vimperator-multiline-output-content a, +#vimperator-multiline-output-content .buffer-list { cursor: pointer; }