Refactored and lots of modification. See README.md.

This commit is contained in:
Lars Jung 2012-04-16 12:53:54 +02:00
parent 859a680e19
commit 71ed41fa69
85 changed files with 3191 additions and 2969 deletions

View file

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