Merge remote-tracking branch 'manage/master' into subtree
this merges master branch of https://github.com/helma-org/apps-manage-mirror into helma
This commit is contained in:
commit
ca2b08a5df
58 changed files with 2678 additions and 0 deletions
42
apps/manage/Application/functions.js
Normal file
42
apps/manage/Application/functions.js
Normal file
|
@ -0,0 +1,42 @@
|
|||
/**
|
||||
* construct an application object so that we can use
|
||||
* skins for non-active applications too
|
||||
* @arg name
|
||||
*/
|
||||
function constructor(name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* return true/false to determine if application is running
|
||||
*/
|
||||
function isActive() {
|
||||
if (root.getApplication(this.name) == null)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used by Helma for URL composition.
|
||||
*/
|
||||
function href(action) {
|
||||
var base = root.href() + this.name + "/";
|
||||
return action ? base + action : base;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used by Helma for URL composition.
|
||||
*/
|
||||
function getParentElement() {
|
||||
return root;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used by Helma request path resolution.
|
||||
*/
|
||||
function getChildElement(name) {
|
||||
if (name == "api")
|
||||
return this.getDoc();
|
||||
return null;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue