1
0
Fork 0
forked from 0x2620/oxjs

load svg images inline

This commit is contained in:
rolux 2011-08-09 19:00:39 +02:00
commit dd7191e8d4
12 changed files with 78 additions and 59 deletions

View file

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