mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-06-02 16:19:48 -04:00
Removes aai.
This commit is contained in:
parent
e43d43933a
commit
70f4500232
5 changed files with 1 additions and 231 deletions
|
@ -39,52 +39,13 @@
|
|||
|
||||
$(function () { modulejs.require('info'); });
|
||||
|
||||
} else if (mode === 'php') {
|
||||
} else {
|
||||
|
||||
$.getJSON('.', {action: 'get', options: true, types: true, langs: true, server: true}, function (config) {
|
||||
|
||||
modulejs.define('config', config);
|
||||
$(function () { modulejs.require('main'); });
|
||||
});
|
||||
|
||||
} else if (mode === 'aai') {
|
||||
|
||||
var src = $script.attr('src'),
|
||||
appHref = src.substr(0, src.length - filename.length),
|
||||
loadJson = function (href) {
|
||||
|
||||
var deferred = $.Deferred();
|
||||
|
||||
$.ajax(href, {dataType: 'text'}).always(function (content) {
|
||||
|
||||
var json = content.replace ? JSON.parse(content.replace(/\/\*[\s\S]*?\*\/|\/\/.*?(\n|$)/g, '')) : {};
|
||||
deferred.resolve(json);
|
||||
});
|
||||
|
||||
return deferred;
|
||||
};
|
||||
|
||||
$.when(
|
||||
loadJson(appHref + 'conf/options.json'),
|
||||
loadJson(appHref + 'conf/types.json'),
|
||||
loadJson(appHref + 'conf/langs.json')
|
||||
).done(function (options, types, langs) {
|
||||
|
||||
var config = {
|
||||
options: options,
|
||||
types: types,
|
||||
langs: langs,
|
||||
server: {
|
||||
backend: mode,
|
||||
api: false,
|
||||
name: 'apache',
|
||||
version: null
|
||||
}
|
||||
};
|
||||
|
||||
modulejs.define('config', config);
|
||||
$(function () { modulejs.require('main'); });
|
||||
});
|
||||
}
|
||||
|
||||
}());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue