From c4ad59bdb6eabfac90a3359ac2981834408393f7 Mon Sep 17 00:00:00 2001 From: rolux Date: Mon, 4 Jun 2012 14:32:58 +0200 Subject: [PATCH] Ox.IconItem: fix a regression related to highlights across linebreaks; add a class to ellipsis --- source/Ox.UI/js/List/IconItem.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/Ox.UI/js/List/IconItem.js b/source/Ox.UI/js/List/IconItem.js index c72b652e..ae4cd7a5 100644 --- a/source/Ox.UI/js/List/IconItem.js +++ b/source/Ox.UI/js/List/IconItem.js @@ -163,12 +163,12 @@ Ox.IconItem = function(options, self) { // truncated rest (including the last line) and discard all extra lines if (lines.length > maxLines) { lines[maxLines - 1] = Ox.truncate( - lines.slice(maxLines - 1).join(' '), 'center', maxLength - ); + lines.slice(maxLines - 1).join(''), 'center', maxLength + ).replace('…', ''); lines = lines.slice(0, maxLines); } return Ox.highlight( - lines.join('
'), self.options.find, 'OxHighlight', true + lines.join('
'), self.options.find, 'OxHighlight', true ); }