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