Update of /var/cvs/applications/searchrelate/templates
In directory james.mmbase.org:/tmp/cvs-serv24606
Modified Files:
Searcher.js.jsp
Log Message:
Added customizedir as a parameter now everywhere since this prevented it from
using it in the repository part.
And hopefully fixed a bug in which it was impossible to unrelate on the next
pages of current.
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.53
retrieving revision 1.54
diff -u -b -r1.53 -r1.54
--- Searcher.js.jsp 26 Nov 2008 19:13:37 -0000 1.53
+++ Searcher.js.jsp 27 Nov 2008 09:49:09 -0000 1.54
@@ -1,5 +1,5 @@
// -*- mode: javascript; -*-
-<[EMAIL PROTECTED] uri="http://www.mmbase.org/mmbase-taglib-2.0" prefix="mm"
%>
+<%@ taglib uri="http://www.mmbase.org/mmbase-taglib-2.0" prefix="mm" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<mm:content type="text/javascript" language="${param.locale}">
<fmt:bundle basename="org.mmbase.searchrelate.resources.searchrelate">
@@ -19,7 +19,7 @@
* - mmsrCommitted (use $("div.mm_related").bind("mmsrCommitted",
function (e, submitter, status, relater) ) )
*
* @author Michiel Meeuwissen
- * @version $Id: Searcher.js.jsp,v 1.53 2008/11/26 19:13:37 andre Exp $
+ * @version $Id: Searcher.js.jsp,v 1.54 2008/11/27 09:49:09 andre Exp $
*/
@@ -248,7 +248,7 @@
MMBaseRelater.prototype.bindSaverelation = function(div) {
var self = this;
self.logger.debug("unbinding and binding relation forms");
- $(div).find('form.relation').unbind();
+ $(div).find('form.relation').unbind('submit');
$(div).find("form.relation").each(function() {
$(this).submit(function(ev) {
self.saverelation(ev);
@@ -267,7 +267,7 @@
}
if (type == "current") {
$(rep).find("tr.click").each(function() {
- if ($(this).hasClass("new") || (self.relater != null &&
self.relater.canUnrelate)) {
+ if ($(this).hasClass("new") || (self != null && self.canUnrelate))
{
$(this).click(function() {
self.unrelate(this);
return false;
@@ -442,6 +442,15 @@
}
}
+MMBaseRelater.prototype.setCustomizedir = function(customizedir) {
+ if (this.current != null) {
+ this.current.searcher.setCustomizedir(customizedir);
+ }
+ if (this.repository != null) {
+ this.repository.searcher.setCustomizedir(customizedir);
+ }
+}
+
MMBaseRelater.prototype.setPageSize = function(pagesize) {
if (this.current != null) {
this.current.searcher.setPageSize(pagesize);
@@ -471,6 +480,7 @@
this.relater = r;
this.type = type;
this.fields = "";
+ this.customizedir = "";
this.pagesize = 10;
this.maxpages = 20;
this.logger = logger != null ? logger : new MMBaseLogger();
@@ -503,6 +513,10 @@
}
+MMBaseSearcher.prototype.setCustomizedir = function(customizedir) {
+ this.customizedir = customizedir;
+}
+
MMBaseSearcher.prototype.setFields = function(fields) {
this.fields = fields;
}
@@ -552,7 +566,13 @@
}
var rep = this.getResultDiv();
- var params = {id: this.getQueryId(), offset: offset, search: "" +
this.value, fields: this.fields, pagesize: this.pagesize, maxpages:
this.maxpages};
+ var params = { id: this.getQueryId(),
+ offset: offset,
+ search: "" + this.value,
+ fields: this.fields,
+ pagesize: this.pagesize,
+ maxpages: this.maxpages,
+ customizedir: this.customizedir };
var result = this.searchResults["" + offset];
this.logger.debug("Searching " + this.searchUrl + " " + params);
@@ -678,7 +698,7 @@
MMBaseSearcher.prototype.getTr = function(node) {
var url = "${mm:link('/mmbase/searchrelate/node.tr.jspx')}";
- var params = {id: this.getQueryId(), node: node, fields: this.fields};
+ var params = {id: this.getQueryId(), node: node, fields: this.fields,
customizedir: this.customizedir};
var result;
$.ajax({async: false, url: url, type: "GET", dataType: "xml", data: params,
complete: function(res, status){
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs