properly cache Ox.UI.getImageURL

This commit is contained in:
rolux 2012-12-29 15:57:01 +01:00
parent 5466c7208c
commit 914d92f135

View file

@ -327,7 +327,7 @@ Ox.load.UI = function(options, callback) {
color <s|[n]> Color name or RGB values
theme <s> Theme name
@*/
Ox.UI.getImageURL = function(name, color, theme) {
Ox.UI.getImageURL = Ox.cache(function(name, color, theme) {
var colorName,
image = images[name],
themeData,
@ -355,7 +355,13 @@ Ox.load.UI = function(options, callback) {
name: name, theme: theme
})) + '-->'
);
};
}, {
key: function(args) {
args[1] = args[1] || 'default';
args[2] = args[2] || Ox.Theme();
return JSON.stringify(args);
}
});
/*@
Ox.UI.getVideoFormat <f> Get supported video formats
(formats) -> <a> of supported formats