load modules with Ox.VERSION in build mode to make caching work
This commit is contained in:
parent
0be0d5fbb7
commit
0588ebe211
3 changed files with 5 additions and 4 deletions
|
@ -230,7 +230,7 @@ Ox.load.UI = function(options, callback) {
|
||||||
|
|
||||||
function loadFiles() {
|
function loadFiles() {
|
||||||
|
|
||||||
Ox.getFile(Ox.PATH + '/Ox.UI/jquery/jquery.js', function() {
|
Ox.getFile(Ox.PATH + '/Ox.UI/jquery/jquery.js?' + Ox.VERSION, function() {
|
||||||
initUI();
|
initUI();
|
||||||
Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.json?' + Ox.VERSION, function(data) {
|
Ox.getJSON(Ox.UI.PATH + 'json/Ox.UI.json?' + Ox.VERSION, function(data) {
|
||||||
var counter = 0, length = data.files.length;
|
var counter = 0, length = data.files.length;
|
||||||
|
@ -243,7 +243,7 @@ Ox.load.UI = function(options, callback) {
|
||||||
++counter == length && initThemes();
|
++counter == length && initThemes();
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
Ox.getFile(Ox.PATH + file, function() {
|
Ox.getFile(Ox.PATH + file + '?' + Ox.VERSION, function() {
|
||||||
++counter == length && initThemes();
|
++counter == length && initThemes();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,7 +78,7 @@ Ox.load = function() {
|
||||||
} else {
|
} else {
|
||||||
Ox.forEach(modules, function(options, module) {
|
Ox.forEach(modules, function(options, module) {
|
||||||
Ox.getFile(
|
Ox.getFile(
|
||||||
Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js',
|
Ox.PATH + 'Ox.' + module + '/Ox.' + module + '.js?' + Ox.VERSION,
|
||||||
function() {
|
function() {
|
||||||
Ox.load[module](options, function(success) {
|
Ox.load[module](options, function(success) {
|
||||||
succeeded += success;
|
succeeded += success;
|
||||||
|
|
|
@ -96,7 +96,8 @@ Ox.getAsync = function(urls, get, callback) {
|
||||||
var element, tagValue, typeValue, urlKey;
|
var element, tagValue, typeValue, urlKey;
|
||||||
if (!cache[url]) {
|
if (!cache[url]) {
|
||||||
if (!type) {
|
if (!type) {
|
||||||
type = url.split('.').pop();
|
type = Ox.parseURL(url).pathname.split('.').pop();
|
||||||
|
console.log(type, url);
|
||||||
type = type == 'css' ? 'stylesheet'
|
type = type == 'css' ? 'stylesheet'
|
||||||
: type == 'js' ? 'script' : 'image';
|
: type == 'js' ? 'script' : 'image';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue