Ox.UI: add 'loadCSS' load option
This commit is contained in:
parent
a312ed2021
commit
f476bd47af
1 changed files with 8 additions and 1 deletions
|
@ -4,6 +4,7 @@ Ox.load.UI = function(options, callback) {
|
|||
|
||||
options = Ox.extend({
|
||||
hideScreen: true,
|
||||
loadCSS: true,
|
||||
showScreen: false,
|
||||
theme: 'oxlight'
|
||||
}, options);
|
||||
|
@ -233,7 +234,13 @@ Ox.load.UI = function(options, callback) {
|
|||
Ox.getFile(Ox.PATH + 'Ox.UI/jquery/jquery.js?' + Ox.VERSION, function() {
|
||||
initUI();
|
||||
Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.json?' + Ox.VERSION, function(data) {
|
||||
var counter = 0, length = data.files.length;
|
||||
var counter = 0, length;
|
||||
if (!options.loadCSS) {
|
||||
data.files = data.files.filter(function(file) {
|
||||
return !Ox.endsWith(file, '.css');
|
||||
});
|
||||
}
|
||||
length = data.files.length;
|
||||
images = data.images;
|
||||
data.files.forEach(function(file) {
|
||||
if (/\.jsonc$/.test(file)) {
|
||||
|
|
Loading…
Reference in a new issue