use Ox.highlight; minor reformatting

This commit is contained in:
rolux 2012-06-03 10:41:18 +02:00
parent 90147a69fb
commit 4ba06fde41
7 changed files with 21 additions and 15 deletions

View file

@ -204,7 +204,9 @@ Ox.Editable = function(options, self) {
value = self.options.format(self.options.value) value = self.options.format(self.options.value)
} }
if (self.options.highlight) { if (self.options.highlight) {
value = Ox.highlightHTML(value, self.options.highlight, 'OxHighlight', true); value = Ox.highlight(
value, self.options.highlight, 'OxHighlight', true
);
} }
return value; return value;
} }

View file

@ -167,7 +167,7 @@ Ox.IconItem = function(options, self) {
); );
lines = lines.slice(0, maxLines); lines = lines.slice(0, maxLines);
} }
return Ox.highlightHTML( return Ox.highlight(
lines.join(' <br/>'), self.options.find, 'OxHighlight', true lines.join(' <br/>'), self.options.find, 'OxHighlight', true
); );
} }

View file

@ -209,10 +209,11 @@ Ox.BlockVideoTimeline = function(options, self) {
subtitle = getSubtitle(position); subtitle = getSubtitle(position);
self.$tooltip.options({ self.$tooltip.options({
title: subtitle title: subtitle
? '<span class=\'OxBright\'>' + ? '<span class=\'OxBright\'>'
Ox.highlight(subtitle.text, self.options.find, 'OxHighlight').replace(/\n/g, '<br/>') + + Ox.highlight(
'</span><br/>' + subtitle.text, self.options.find, 'OxHighlight'
Ox.formatDuration(subtitle['in'], 3) + ' - ' ).replace(/\n/g, '<br/>') + '</span><br/>'
+ Ox.formatDuration(subtitle['in'], 3) + ' - '
+ Ox.formatDuration(subtitle['out'], 3) + Ox.formatDuration(subtitle['out'], 3)
: Ox.formatDuration(position) : Ox.formatDuration(position)
}) })

View file

@ -191,7 +191,9 @@ Ox.LargeVideoTimeline = function(options, self) {
left: (subtitle['in'] * self.fps) + 'px', left: (subtitle['in'] * self.fps) + 'px',
width: (((subtitle.out - subtitle['in']) * self.fps) - 2) + '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); .appendTo(self.$timeline);
}); });
} }

View file

@ -184,8 +184,7 @@ Ox.SmallVideoTimeline = function(options, self) {
return subtitle return subtitle
? '<span class=\'OxBright\'>' + Ox.highlight( ? '<span class=\'OxBright\'>' + Ox.highlight(
subtitle.text, self.options.find, 'OxHighlight' subtitle.text, self.options.find, 'OxHighlight'
).replace(/\n/g, '<br/>') + '</span><br/>' ).replace(/\n/g, '<br/>') + '</span><br/>' + Ox.formatDuration(
+ Ox.formatDuration(
subtitle['in'], self.options.showMilliseconds subtitle['in'], self.options.showMilliseconds
) + ' - ' + Ox.formatDuration( ) + ' - ' + Ox.formatDuration(
subtitle['out'], self.options.showMilliseconds subtitle['out'], self.options.showMilliseconds

View file

@ -322,7 +322,7 @@ Ox.VideoEditorPlayer = function(options, self) {
if (subtitle != self.subtitle) { if (subtitle != self.subtitle) {
self.subtitle = subtitle; self.subtitle = subtitle;
self.$subtitle.html( self.$subtitle.html(
Ox.highlight(self.subtitle, self.options.find, 'Ox.Highlight') Ox.highlight(self.subtitle, self.options.find, 'OxHighlight')
.replace(/\n/g, '<br/>') .replace(/\n/g, '<br/>')
); );
} }

View file

@ -561,9 +561,9 @@ Ox.VideoTimelinePlayer = function(options, self) {
self.$tooltip.options({ self.$tooltip.options({
title: ( title: (
subtitle subtitle
? '<span class=\'OxBright\'>' + ? '<span class=\'OxBright\'>' + Ox.highlight(
Ox.highlight(subtitle.text, self.options.find, 'OxHighlight').replace(/\n/g, '<br/>') + subtitle.text, self.options.find, 'OxHighlight'
'</span><br/>' ).replace(/\n/g, '<br/>') + '</span><br/>'
: '' : ''
) + Ox.formatDuration(position, 3) ) + Ox.formatDuration(position, 3)
}) })
@ -708,7 +708,9 @@ Ox.VideoTimelinePlayer = function(options, self) {
left: (subtitle['in'] * self.fps) + 'px', left: (subtitle['in'] * self.fps) + 'px',
width: (((subtitle.out - subtitle['in']) * self.fps) - 2) + '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); .appendTo(self.$timeline);
}); });
} }