Update of /var/cvs/applications/searchrelate/templates
In directory james.mmbase.org:/tmp/cvs-serv841/templates
Modified Files:
List.js.jsp
Log Message:
nested mm-sr:relatednodes were not quite qorking any more
See also: http://cvs.mmbase.org/viewcvs/applications/searchrelate/templates
Index: List.js.jsp
===================================================================
RCS file: /var/cvs/applications/searchrelate/templates/List.js.jsp,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -b -r1.16 -r1.17
--- List.js.jsp 18 Jul 2008 08:20:50 -0000 1.16
+++ List.js.jsp 24 Jul 2008 14:22:25 -0000 1.17
@@ -13,7 +13,7 @@
* The user does not need to push a commit button. All data is implicitely
committed (after a few second of inactivity, or before unload).
*
* @author Michiel Meeuwissen
- * @version $Id: List.js.jsp,v 1.16 2008/07/18 08:20:50 michiel Exp $
+ * @version $Id: List.js.jsp,v 1.17 2008/07/24 14:22:25 michiel Exp $
*/
@@ -23,6 +23,9 @@
this.list = new List(this);
}
});
+ $(document).find("div.list:last").each(function() {
+ List.seq = $(this).find("input[name = 'seq']")[0].value;
+ });
});
@@ -36,9 +39,9 @@
this.type = this.find(this.div, "form.list").find("input[name =
'type']")[0].value;
this.item = this.find(this.div, "form.list").find("input[name =
'item']")[0].value;
- this.seq = this.find(this.div, "form.list").find("input[name =
'seq']")[0].value;
this.source = this.find(this.div, "form.list").find("input[name =
'source']")[0].value;
+
this.lastChange = null;
this.lastCommit = null;
@@ -93,7 +96,6 @@
-
/**
* Finds all elements with given node name and class, but ignores everything
in a child div.list.
*/
@@ -141,12 +143,14 @@
$(a).click(function(ev) {
var url = a.href;
var params = {};
+ params.item = this.item;
+ params.mm_list_sequence = List.seq++;
+ params.source = this.source;
$.ajax({async: false, url: url, type: "GET", dataType: "xml", data:
params,
complete: function(res, status){
try {
if ( status == "success" || status == "notmodified" ) {
var r = $(res.responseText)[0];
-
// remove default value on focus
$(r).find("input").one("focus", function() {
this.value = "";
@@ -164,6 +168,9 @@
}
});
a.list.executeCallBack("create", r);
+ } else {
+ alert(status);
+
}
} catch (ex) {
alert(ex);
@@ -242,13 +249,15 @@
if (now.getTime() - this.lastChange.getTime() > stale) {
this.lastCommit = now;
var params = {};
+ params.item = this.item;
+ params.seq = this.seq;
+ params.source = this.source;
this.find(this.div, "input[checked], input[type='text'],
input[type='hidden'], input[type='password'], option[selected], textarea")
.each(function() {
params[this.name || this.id || this.parentNode.name ||
this.parentNode.id ] = this.value;
});
- params.item = this.item;
- params.seq = this.seq;
- params.source = this.source;
+
+
var self = this;
this.status("<img
src='${mm:link('/mmbase/style/ajax-loader.gif')}' />");
$.ajax({ type: "POST",
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs