diff --git a/content/bindings.xml b/content/bindings.xml new file mode 100644 index 00000000..f1e1b9f2 --- /dev/null +++ b/content/bindings.xml @@ -0,0 +1,19 @@ + + + + + + +
+ + + + + + + + + + diff --git a/content/ui.js b/content/ui.js index 6ad28241..10503e80 100644 --- a/content/ui.js +++ b/content/ui.js @@ -1235,32 +1235,6 @@ liberator.ItemList = function (id) //{{{ var completionElements = null; var minHeight = 0; - // TODO: temporary, to be changed/removed - function createRow(b, c, a, dom) - { - /* Obviously, ItemList shouldn't know or care about this. */ - let filter = liberator.completion.filterString; - if (filter) - { - b = liberator.template.highlightFilter(b, filter); - c = liberator.template.highlightFilter(c, filter); - } - - if (typeof a == "function") - a = a(); - - let row = - - {a ? : } - {b} - {c} - ; - - if (dom) - return liberator.util.xmlToDom(row, doc); - return row; - } - function autoSize() { function getHeight() @@ -1279,6 +1253,32 @@ liberator.ItemList = function (id) //{{{ } doc.body.addEventListener("DOMSubtreeModified", autoSize, true); + // TODO: temporary, to be changed/removed + function createRow(b, c, a, dom) + { + /* Obviously, ItemList shouldn't know or care about this. */ + let filter = liberator.completion.filterString; + if (filter) + { + b = liberator.template.highlightFilter(b, filter); + c = liberator.template.highlightFilter(c, filter); + } + + if (typeof a == "function") + a = a(); + + let row = + + {a ? : <>} + {b} + {c} + ; + + if (dom) + return liberator.util.xmlToDom(row, doc); + return row; + } + /** * uses the entries in completions to fill the listbox * does incremental filling to speed up things @@ -1334,7 +1334,7 @@ liberator.ItemList = function (id) //{{{ { liberator.template.map(liberator.util.range(0, maxItems), function (i) - ) + ) }
~
~
; diff --git a/skin/liberator.css b/skin/liberator.css index 663eab80..8452de35 100644 --- a/skin/liberator.css +++ b/skin/liberator.css @@ -72,9 +72,14 @@ the terms of any one of the MPL, the GPL or the LGPL. *:-moz-loading, *:-moz-broken { display: none !important; } +.compitem > td { + display: table-cell; + -moz-binding: url(chrome://liberator/content/bindings.xml#compitem-td); +} +.compitem-td-span { height: 1.5em; display: block; } + .compitem[selected=true] { background-color: yellow; } .compitem > .favicon { width: 16px; } -.compitem > .favicon > * { width: 16px; height: 16px; display: block; } .compitem > .completion { width: 45%; overflow: hidden; } .compitem > .description { color: gray; } @@ -95,6 +100,8 @@ the terms of any one of the MPL, the GPL or the LGPL. .hl-Keyword { color: red; } .hl-Tag { color: blue; } +.hl-NonText { color: blue; } + .hl-Filter { font-weight: bold !important; } }