* Replaced occurrences of User.visisted with User.modified

* Set application's charset to UTF8
 * Added Layout.getFile() method returning the layout's directory as helma.File
 * Simplified Layout.getSkinPath() method (still work in progress)
 * Replaced occurrences of Site.language with Site.locale
 * Modified some wording
 * Added slight b/w compatibility fix in Story.macro_filter() method
 * Added timex factor in Story.getDelta() method to prevent counting  edits as site updates in-beteen 10 minutes
 * Moved site-related aspect hooks to Site prototype of compatibility module
 * Removed obsolete conversion code in compatibility module (has moved to updater app)
 * Re-included spacer_macro() method in compat. module
 * Temporarily overwrote HopObject.renderSkin() method to debug skin rendering process
 * Replaced individual legacy macros of Layout prototype by appropriate code in onUnhandledMacro() method (compat.)
 * Reflect legacy macros of Layout prototype in value() method of compat. module
 * Added and improved compatibility methods
 * Implemented support for renamed prototypes in updater app (still needs to be applied for database, too)
This commit is contained in:
Tobi Schäfer 2007-10-21 16:49:16 +00:00
parent 1df1c87525
commit aa11e5db88
23 changed files with 578 additions and 650 deletions

View file

@ -285,19 +285,22 @@ Layout.prototype.getImage = function(name, fallback) {
return null;
};
Layout.prototype.getFile = function() {
return this.site.getStaticFile("layouts/" + this.name);
};
Layout.prototype.getSkinPath = function() {
// FIXME: Do we need this or not?
/* if (!this.site) {
return [app.dir];
} */
var skinPath = [];
var skinPath = [this.getFile().toString()];
this.parent && (skinPath.push(this.parent.getFile().toString()));
return skinPath;
var layout = this;
do {
res.push();
res.write(getProperty("staticPath"));
layout.site && res.write(layout.site.name + "/");
res.write("layouts/");
res.write(layout.alias);
res.write(layout.name);
skinPath.push(res.pop());
} while (layout = layout.parent);
return skinPath;