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)
}
if (self.options.highlight) {
value = Ox.highlightHTML(value, self.options.highlight, 'OxHighlight', true);
value = Ox.highlight(
value, self.options.highlight, 'OxHighlight', true
);
}
return value;
}

View file

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

View file

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

View file

@ -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);
});
}

View file

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

View file

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

View file

@ -561,9 +561,9 @@ Ox.VideoTimelinePlayer = function(options, self) {
self.$tooltip.options({
title: (
subtitle
? '<span class=\'OxBright\'>' +
Ox.highlight(subtitle.text, self.options.find, 'OxHighlight').replace(/\n/g, '<br/>') +
'</span><br/>'
? '<span class=\'OxBright\'>' + Ox.highlight(
subtitle.text, self.options.find, 'OxHighlight'
).replace(/\n/g, '<br/>') + '</span><br/>'
: ''
) + 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);
});
}