Restructure file base.

This commit is contained in:
Lars Jung 2015-05-12 16:08:20 +02:00
parent 057a5f05a5
commit ee241e7e3f
151 changed files with 88 additions and 86 deletions

View file

@ -0,0 +1,30 @@
modulejs.define('boot', ['$'], function ($) {
if ($('html').hasClass('no-browser')) {
return;
}
var module = $('script[data-module]').data('module');
var data = {action: 'get', setup: true, options: true, types: true, theme: true, langs: true};
var href;
if (module === 'index') {
href = '.';
} else if (module === 'info') {
data.refresh = true;
href = 'index.php';
} else {
return;
}
$.ajax({
url: href,
data: data,
type: 'post',
dataType: 'json'
}).done(function (config) {
modulejs.define('config', config);
$(function () { modulejs.require('main/' + module); });
});
});