Update of /var/cvs/applications/editwizard/templates/javascript
In directory james.mmbase.org:/tmp/cvs-serv24746/templates/javascript
Modified Files:
Tag: MMBase-1_8
editwizard.jsp
Log Message:
Add a ;main' attribute to search (similar to main from the wizard list jsp, to
specify the main builder in a nodepath)
See also:
http://cvs.mmbase.org/viewcvs/applications/editwizard/templates/javascript
Index: editwizard.jsp
===================================================================
RCS file: /var/cvs/applications/editwizard/templates/javascript/editwizard.jsp,v
retrieving revision 1.62.2.8
retrieving revision 1.62.2.9
diff -u -b -r1.62.2.8 -r1.62.2.9
--- editwizard.jsp 9 May 2008 14:01:40 -0000 1.62.2.8
+++ editwizard.jsp 27 Feb 2009 12:02:20 -0000 1.62.2.9
@@ -6,7 +6,7 @@
* and validation (in validator.js)
*
* @since MMBase-1.6
- * @version $Id: editwizard.jsp,v 1.62.2.8 2008/05/09 14:01:40 nklasens Exp $
+ * @version $Id: editwizard.jsp,v 1.62.2.9 2009/02/27 12:02:20 pierre Exp $
* @author Kars Veling
* @author Pierre van Rooden
* @author Nico Klasens
@@ -155,21 +155,24 @@
var directions = el.getAttribute("directions");
var searchdir = el.getAttribute("searchdir");
var distinct = el.getAttribute("distinct");
+ var main = el.getAttribute("main");
var pagelength = el.getAttribute("pagelength");
if (!pagelength) {
pagelength = 10;
}
- // lastobject is generally the last builder in the nodepath.
+ // lastobject is generally the last builder in the nodepath or the builder
in 'main'.
// however, if the first field is a "<buildername>.number" field, that
buildername is used
- var tmp=nodepath.split(",");
- var lastobject="";
- if (tmp.length>1) {
- lastobject=tmp[tmp.length-1];
- tmp=fields.split(",");
- if (tmp.length>1 && tmp[0].indexOf(".number") != -1) {
- lastobject=tmp[0].split(".")[0];
+ var lastobject = main;
+ if (lastobject == "" || lastobject == null) {
+ var tmp = nodepath.split(",");
+ if (tmp.length > 1) {
+ lastobject = tmp[tmp.length-1];
+ tmp = fields.split(",");
+ if (tmp.length > 1 && tmp[0].indexOf(".number") != -1) {
+ lastobject = tmp[0].split(".")[0];
+ }
}
}
@@ -227,6 +230,7 @@
url += setParam("directions", directions);
url += setParam("searchdir", searchdir);
url += setParam("distinct", distinct);
+ url += setParam("main", main);
url += setParam("age", searchage+"");
url += setParam("type", el.getAttribute("type"));
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs