Ox.UI: add loadThemes option to loader

This commit is contained in:
rolux 2015-02-22 19:13:25 +05:30
parent 29792f74aa
commit 747128bdea

View file

@ -5,6 +5,7 @@ Ox.load.UI = function(options, callback) {
options = Ox.extend({
hideScreen: true,
loadCSS: true,
loadThemes: true,
showScreen: false,
theme: 'oxlight'
}, options);
@ -246,6 +247,11 @@ Ox.load.UI = function(options, callback) {
return !Ox.endsWith(file, '.css');
});
}
if (!options.loadThemes) {
data.files = data.files.filter(function(file) {
return !Ox.contains(file, '/themes/');
});
}
length = data.files.length;
Ox.UI.IMAGES = data.images;
Ox.UI.THEMES = {};