From 4ba06fde4112777cda8549d84f99f7fe6edfcd04 Mon Sep 17 00:00:00 2001 From: rolux Date: Sun, 3 Jun 2012 10:41:18 +0200 Subject: [PATCH] use Ox.highlight; minor reformatting --- source/Ox.UI/js/Form/Editable.js | 4 +++- source/Ox.UI/js/List/IconItem.js | 2 +- source/Ox.UI/js/Video/BlockVideoTimeline.js | 9 +++++---- source/Ox.UI/js/Video/LargeVideoTimeline.js | 4 +++- source/Ox.UI/js/Video/SmallVideoTimeline.js | 3 +-- source/Ox.UI/js/Video/VideoEditorPlayer.js | 4 ++-- source/Ox.UI/js/Video/VideoTimelinePlayer.js | 10 ++++++---- 7 files changed, 21 insertions(+), 15 deletions(-) diff --git a/source/Ox.UI/js/Form/Editable.js b/source/Ox.UI/js/Form/Editable.js index f6901998..e8e66888 100644 --- a/source/Ox.UI/js/Form/Editable.js +++ b/source/Ox.UI/js/Form/Editable.js @@ -204,7 +204,9 @@ Ox.Editable = function(options, self) { value = self.options.format(self.options.value) } if (self.options.highlight) { - value = Ox.highlightHTML(value, self.options.highlight, 'OxHighlight', true); + value = Ox.highlight( + value, self.options.highlight, 'OxHighlight', true + ); } return value; } diff --git a/source/Ox.UI/js/List/IconItem.js b/source/Ox.UI/js/List/IconItem.js index a569cf7a..907017c8 100644 --- a/source/Ox.UI/js/List/IconItem.js +++ b/source/Ox.UI/js/List/IconItem.js @@ -167,7 +167,7 @@ Ox.IconItem = function(options, self) { ); lines = lines.slice(0, maxLines); } - return Ox.highlightHTML( + return Ox.highlight( lines.join('
'), self.options.find, 'OxHighlight', true ); } diff --git a/source/Ox.UI/js/Video/BlockVideoTimeline.js b/source/Ox.UI/js/Video/BlockVideoTimeline.js index 569994a7..4b880ee0 100644 --- a/source/Ox.UI/js/Video/BlockVideoTimeline.js +++ b/source/Ox.UI/js/Video/BlockVideoTimeline.js @@ -209,10 +209,11 @@ Ox.BlockVideoTimeline = function(options, self) { subtitle = getSubtitle(position); self.$tooltip.options({ title: subtitle - ? '' + - Ox.highlight(subtitle.text, self.options.find, 'OxHighlight').replace(/\n/g, '
') + - '

' + - Ox.formatDuration(subtitle['in'], 3) + ' - ' + ? '' + + Ox.highlight( + subtitle.text, self.options.find, 'OxHighlight' + ).replace(/\n/g, '
') + '

' + + Ox.formatDuration(subtitle['in'], 3) + ' - ' + Ox.formatDuration(subtitle['out'], 3) : Ox.formatDuration(position) }) diff --git a/source/Ox.UI/js/Video/LargeVideoTimeline.js b/source/Ox.UI/js/Video/LargeVideoTimeline.js index 497bed62..e823d2e3 100644 --- a/source/Ox.UI/js/Video/LargeVideoTimeline.js +++ b/source/Ox.UI/js/Video/LargeVideoTimeline.js @@ -191,7 +191,9 @@ Ox.LargeVideoTimeline = function(options, self) { left: (subtitle['in'] * self.fps) + 'px', width: (((subtitle.out - subtitle['in']) * self.fps) - 2) + 'px' }) - .html(Ox.highlight(subtitle.text, self.options.find, 'OxHighlight')) + .html(Ox.highlight( + subtitle.text, self.options.find, 'OxHighlight' + )) .appendTo(self.$timeline); }); } diff --git a/source/Ox.UI/js/Video/SmallVideoTimeline.js b/source/Ox.UI/js/Video/SmallVideoTimeline.js index eef71a5d..cfd099fa 100644 --- a/source/Ox.UI/js/Video/SmallVideoTimeline.js +++ b/source/Ox.UI/js/Video/SmallVideoTimeline.js @@ -184,8 +184,7 @@ Ox.SmallVideoTimeline = function(options, self) { return subtitle ? '' + Ox.highlight( subtitle.text, self.options.find, 'OxHighlight' - ).replace(/\n/g, '
') + '

' - + Ox.formatDuration( + ).replace(/\n/g, '
') + '
' + Ox.formatDuration( subtitle['in'], self.options.showMilliseconds ) + ' - ' + Ox.formatDuration( subtitle['out'], self.options.showMilliseconds diff --git a/source/Ox.UI/js/Video/VideoEditorPlayer.js b/source/Ox.UI/js/Video/VideoEditorPlayer.js index 1001d33f..8b66dd08 100644 --- a/source/Ox.UI/js/Video/VideoEditorPlayer.js +++ b/source/Ox.UI/js/Video/VideoEditorPlayer.js @@ -322,8 +322,8 @@ Ox.VideoEditorPlayer = function(options, self) { if (subtitle != self.subtitle) { self.subtitle = subtitle; self.$subtitle.html( - Ox.highlight(self.subtitle, self.options.find, 'Ox.Highlight') - .replace(/\n/g, '
') + Ox.highlight(self.subtitle, self.options.find, 'OxHighlight') + .replace(/\n/g, '
') ); } } diff --git a/source/Ox.UI/js/Video/VideoTimelinePlayer.js b/source/Ox.UI/js/Video/VideoTimelinePlayer.js index 20ce7443..0c88ffc5 100644 --- a/source/Ox.UI/js/Video/VideoTimelinePlayer.js +++ b/source/Ox.UI/js/Video/VideoTimelinePlayer.js @@ -561,9 +561,9 @@ Ox.VideoTimelinePlayer = function(options, self) { self.$tooltip.options({ title: ( subtitle - ? '' + - Ox.highlight(subtitle.text, self.options.find, 'OxHighlight').replace(/\n/g, '
') + - '

' + ? '' + Ox.highlight( + subtitle.text, self.options.find, 'OxHighlight' + ).replace(/\n/g, '
') + '

' : '' ) + Ox.formatDuration(position, 3) }) @@ -708,7 +708,9 @@ Ox.VideoTimelinePlayer = function(options, self) { left: (subtitle['in'] * self.fps) + 'px', width: (((subtitle.out - subtitle['in']) * self.fps) - 2) + 'px' }) - .html(Ox.highlight(subtitle.text, self.options.find, 'OxHighlight')) + .html(Ox.highlight( + subtitle.text, self.options.find, 'OxHighlight' + )) .appendTo(self.$timeline); }); }