Cosmetics.

This commit is contained in:
Lars Jung 2012-10-05 19:55:48 +02:00
parent 7494491637
commit c71f891af2
311 changed files with 55 additions and 46 deletions

View file

@ -0,0 +1,36 @@
modulejs.define('ext/custom', ['_', '$', 'core/settings', 'core/ajax'], function (_, $, allsettings, ajax) {
var settings = _.extend({
enabled: false,
header: '_h5ai.header.html',
footer: '_h5ai.footer.html'
}, allsettings.custom),
init = function () {
if (!settings.enabled) {
return;
}
if (_.isString(settings.header)) {
ajax.getHtml(settings.header, function (html) {
if (html) {
$('<div id="content-header">' + html + '</div>').prependTo('#content');
}
});
}
if (_.isString(settings.footer)) {
ajax.getHtml(settings.footer, function (html) {
if (html) {
$('<div id="content-footer">' + html + '</div>').appendTo('#content');
}
});
}
};
init();
});