Author: hannes
Date: 2008-12-17 23:00:24 +0100 (Wed, 17 Dec 2008)
New Revision: 9441
Modified:
apps/gobi/trunk/code/Page/Manage.js
apps/gobi/trunk/code/Page/Page.js
apps/gobi/trunk/code/Type/Type.js
Log:
Fix some oversights from the manage action link refactoring in the previous revision.
Details at http://dev.helma.org/trac/helma/changeset/9441
Modified: apps/gobi/trunk/code/Page/Manage.js
===================================================================
--- apps/gobi/trunk/code/Page/Manage.js 2008-12-17 21:54:35 UTC (rev 9440)
+++ apps/gobi/trunk/code/Page/Manage.js 2008-12-17 22:00:24 UTC (rev 9441)
@@ -35,11 +35,8 @@
/**
* Read the form data from a submitted manage page.
*/
-function readManageForm() {
- var screen = req.data.screen;
- if (!screen)
- screen = this.getAdminScreens()[0];
- var handler = this["readManageForm_"+screen];
+function readManageForm(screen) {
+ var handler = this["readManageForm_" + screen];
if (handler && typeof handler == "function") {
handler.apply(this, []);
}
@@ -105,6 +102,9 @@
this.manage("forms");
}
+function manage_skins_action() {
+ this.manage("skins");
+}
function manage_owner_action() {
this.manage("owner");
}
@@ -122,7 +122,7 @@
function manage(screen) {
if (req.data.save || req.data.reset) {
- this.readManageForm();
+ this.readManageForm(screen);
this.modifier = session.user;
this.modifytime = new Date();
res.message = msg("edit_confirm");
Modified: apps/gobi/trunk/code/Page/Page.js
===================================================================
--- apps/gobi/trunk/code/Page/Page.js 2008-12-17 21:54:35 UTC (rev 9440)
+++ apps/gobi/trunk/code/Page/Page.js 2008-12-17 22:00:24 UTC (rev 9441)
@@ -94,13 +94,6 @@
}
/**
- * Return a list of admin screen names (tabs)
- */
-function getAdminScreens() {
- return ["permissions", "forms", "skins", "owner", "admins", "members"];
-}
-
-/**
* Return true if the current user may create a new page of this type
*/
function isSettableType() {
Modified: apps/gobi/trunk/code/Type/Type.js
===================================================================
--- apps/gobi/trunk/code/Type/Type.js 2008-12-17 21:54:35 UTC (rev 9440)
+++ apps/gobi/trunk/code/Type/Type.js 2008-12-17 22:00:24 UTC (rev 9441)
@@ -132,8 +132,9 @@
/**
* Return a list of admin screen names (tabs)
*/
-function getAdminScreens() {
- return ["permissions", "forms"];
+function getAdminActions() {
+ var actions = Page.prototype.getAdminActions.apply(this);
+ return actions.slice(0, 2);
}
// body macro, overrides to just display body skin
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.