use Ox.highlight; minor reformatting
This commit is contained in:
parent
90147a69fb
commit
4ba06fde41
7 changed files with 21 additions and 15 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
);
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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, '<br/>')
|
||||
Ox.highlight(self.subtitle, self.options.find, 'OxHighlight')
|
||||
.replace(/\n/g, '<br/>')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue