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

@ -69,7 +69,7 @@ Ox.DocPage = function(options, self) {
})
.append(
$('<img>')
.attr({src: Ox.UI.getImagePath('symbolDown.svg')})
.attr({src: Ox.UI.getImageURL('symbolDown')})
.css({
width: '12px',
height: '12px',
@ -77,11 +77,11 @@ Ox.DocPage = function(options, self) {
})
.click(function() {
var $this = $(this),
isExpanded = $this.attr('src') == Ox.UI.getImagePath('symbolDown.svg');
isExpanded = $this.attr('src') == Ox.UI.getImageURL('symbolDown');
$this.attr({
src: isExpanded ?
Ox.UI.getImagePath('symbolRight.svg') :
Ox.UI.getImagePath('symbolDown.svg')
Ox.UI.getImageURL('symbolRight') :
Ox.UI.getImageURL('symbolDown')
});
$('.' + className).each(function() {
var $this = $(this);

View file

@ -17,7 +17,7 @@ Ox.LoadingIcon = function(options, self) {
})
.options(options || {})
.attr({
src: Ox.UI.getImagePath('symbolLoadingAnimated.svg')
src: Ox.UI.getImageURL('symbolLoadingAnimated')
})
.addClass(
'OxLoadingIcon Ox' + Ox.toTitleCase(self.options.size)

View file

@ -32,14 +32,13 @@ Ox.Theme = function(theme) {
Ox.UI.$body
.addClass('OxTheme' + Ox.toTitleCase(theme))
.removeClass('OxTheme' + Ox.toTitleCase(currentTheme));
$('img:not(.OxVideo)').add('input[type=image]:not(.OxVideo)').each(function() {
var $this = $(this);
$('img:not(.OxVideo)').add('input[type="image"]:not(.OxVideo)').each(function() {
var $this = $(this),
src = $this.attr('src');
$this.attr({
src: $this.attr('src').replace(
'/Ox.UI/themes/' + currentTheme + '/',
'/Ox.UI/themes/' + theme + '/'
)
src: Ox.UI.getImageURL(Ox.UI.getImageName(src), theme)
});
Ox.print(Ox.UI.getImageName(src), Ox.UI.getImageURL(Ox.UI.getImageName(src), theme))
});
}
return theme;