forked from 0x2620/oxjs
load svg images inline
This commit is contained in:
parent
6118eae51a
commit
dd7191e8d4
12 changed files with 78 additions and 59 deletions
|
|
@ -356,8 +356,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.$loadingIcon = $('<img>')
|
||||
.addClass('OxLoadingIcon OxVideo')
|
||||
.attr({
|
||||
src: Ox.UI.getImagePath('symbolLoadingAnimated.svg')
|
||||
.replace('/classic/', '/modern/')
|
||||
src: Ox.UI.getImageURL('symbolLoadingAnimated', 'modern')
|
||||
})
|
||||
.appendTo(self.$videoContainer);
|
||||
|
||||
|
|
@ -365,9 +364,9 @@ Ox.VideoPlayer = function(options, self) {
|
|||
self.$playIcon = $('<img>')
|
||||
.addClass('OxPlayIcon OxVideo')
|
||||
.attr({
|
||||
src: Ox.UI.getImagePath(
|
||||
'symbol' + (self.options.paused ? 'Play' : 'Pause') + '.svg'
|
||||
).replace('/classic/', '/modern/')
|
||||
src: Ox.UI.getImageURL('symbol' + (
|
||||
self.options.paused ? 'Play' : 'Pause'
|
||||
), 'modern')
|
||||
})
|
||||
.appendTo(self.$videoContainer);
|
||||
if (self.options.showIcon) {
|
||||
|
|
@ -633,7 +632,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
var $this = $(this);
|
||||
$this.children()[1].src =
|
||||
$this.data('resolution') == resolution ?
|
||||
Ox.UI.getImagePath('symbolCheck.svg') :
|
||||
Ox.UI.getImageURL('symbolCheck') :
|
||||
Ox.UI.PATH + 'png/transparent.png'
|
||||
});
|
||||
self.$resolutionButton.html(resolution + 'p');
|
||||
|
|
@ -664,7 +663,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
.addClass('OxVideo')
|
||||
.attr({
|
||||
src: resolution == self.options.resolution ?
|
||||
Ox.UI.getImagePath('symbolCheck.svg').replace('/classic/', '/modern/') :
|
||||
Ox.UI.getImageURL('symbolCheck', 'modern') :
|
||||
Ox.UI.PATH + 'png/transparent.png'
|
||||
})
|
||||
.appendTo($item);
|
||||
|
|
@ -1310,7 +1309,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
} else {
|
||||
symbol = 'mute';
|
||||
}
|
||||
return Ox.UI.getImagePath('symbol' + symbol + '.svg').replace('/classic/', '/modern/');
|
||||
return Ox.UI.getImageURL('symbol' + symbol, 'modern');
|
||||
}
|
||||
|
||||
function goToPoint() {
|
||||
|
|
@ -1361,7 +1360,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
function hideLoadingIcon() {
|
||||
self.$loadingIcon.hide().attr({
|
||||
src: Ox.UI.getImagePath('symbolLoading.svg')
|
||||
src: Ox.UI.getImageURL('symbolLoading')
|
||||
.replace('/classic/', '/modern/')
|
||||
});
|
||||
}
|
||||
|
|
@ -1752,7 +1751,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
function showLoadingIcon() {
|
||||
self.$loadingIcon.attr({
|
||||
src: Ox.UI.getImagePath('symbolLoadingAnimated.svg')
|
||||
src: Ox.UI.getImageURL('symbolLoadingAnimated')
|
||||
.replace('/classic/', '/modern/')
|
||||
}).show();
|
||||
}
|
||||
|
|
@ -1960,9 +1959,9 @@ Ox.VideoPlayer = function(options, self) {
|
|||
|
||||
function togglePlayIcon() {
|
||||
self.$playIcon.attr({
|
||||
src: Ox.UI.getImagePath(
|
||||
src: Ox.UI.getImageURL(
|
||||
'symbol' + (self.options.paused ? 'Play' : 'Pause'
|
||||
)+ '.svg').replace('/classic/', '/modern/')
|
||||
), 'modern')
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue