Update of /var/cvs/applications/searchrelate/templates
In directory james.mmbase.org:/tmp/cvs-serv19303

Modified Files:
        Searcher.js.jsp 
Log Message:
some unsaved changes



See also: http://cvs.mmbase.org/viewcvs/applications/searchrelate/templates


Index: Searcher.js.jsp
===================================================================
RCS file: /var/cvs/applications/searchrelate/templates/Searcher.js.jsp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -b -r1.45 -r1.46
--- Searcher.js.jsp     9 Nov 2008 20:22:03 -0000       1.45
+++ Searcher.js.jsp     9 Nov 2008 20:22:41 -0000       1.46
@@ -18,7 +18,7 @@
  * - mmsrCommitted         (use   $("div.mm_related").bind("mmsrCommitted", 
function (e, submitter, status, relater) ) )
  *
  * @author Michiel Meeuwissen
- * @version $Id: Searcher.js.jsp,v 1.45 2008/11/09 20:22:03 andre Exp $
+ * @version $Id: Searcher.js.jsp,v 1.46 2008/11/09 20:22:41 andre Exp $
  */
 
 
@@ -177,12 +177,13 @@
                     if (status == "success") {
                         //console.log("" + res);
                         $(a).addClass("succeeded");
-                        if (relatedNumbers != "") { // get them to create tr's 
to edit relations 
+                        if (relatedNumbers != "") { // get them to create tr's 
in which to edit relations 
                             var nrs = relatedNumbers.split(",");
                             $(nrs).each(function(i) {
                                 var nr = this;
                                 console.log(i + ", nr: " + nr);
-                                // var trr = self.getTrrelation(nr); // 
allmost works except for query (you can't get the current one, getQueryId looks 
for a.search))
+                                // allmost works except for query (you can't 
get the current one, BUG: getQueryId looks for a.search))
+                                // var trr = self.getTrrelation(nr); 
                                 // var tr = // find the tr
                                 // $(trr).after(tr);
                             });
@@ -206,22 +207,11 @@
     }
 }
 
-
-MMBaseRelater.prototype.getNumbers = function(map) {
-    var numbers = "";
-    $.each(map, function(key, value) {
-        if (value != null) {
-            if (numbers.length > 0) numbers += ",";
-            numbers += key;
-        }
-    });
-    return numbers;
-}
-
 MMBaseRelater.prototype.getTrrelation = function(nodenr) {
     var url = "${mm:link('/mmbase/searchrelate/relations.tr.jspx')}";
     var params = {id: this.current.searcher.getQueryId(), node: nodenr, 
fields: this.repository.searcher.fields};
-    this.logger.debug(url + ", " + params);
+    // BUG: can't get this.current.searcher.getQueryId()
+    this.logger.debug(url + ", id: " + this.current.searcher.getQueryId() + ", 
flds: " + this.repository.searcher.fields);
     var result;
     $.ajax({async: false, url: url, type: "GET", dataType: "xml", data: params,
             complete: function(res, status){
@@ -233,6 +223,17 @@
     return result;
 }
 
+MMBaseRelater.prototype.getNumbers = function(map) {
+    var numbers = "";
+    $.each(map, function(key, value) {
+        if (value != null) {
+            if (numbers.length > 0) numbers += ",";
+            numbers += key;
+        }
+    });
+    return numbers;
+}
+
 MMBaseRelater.prototype.bindEvents = function(rep, type) {
     var self = this;
     if (type == "repository") {
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to