Author: michiel Date: 2010-07-15 11:31:02 +0200 (Thu, 15 Jul 2010) New Revision: 42896
Modified: mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/webapp/mmbase/searchrelate/Searcher.js.jsp Log: moved a bit of javascript to Searcher.js.jsp, which also fixed a bug that the event binded to click doesn't seem to work always Modified: mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/webapp/mmbase/searchrelate/Searcher.js.jsp =================================================================== --- mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/webapp/mmbase/searchrelate/Searcher.js.jsp 2010-07-15 09:30:39 UTC (rev 42895) +++ mmbase/branches/MMBase-1_9/applications/searchrelate/src/main/webapp/mmbase/searchrelate/Searcher.js.jsp 2010-07-15 09:31:02 UTC (rev 42896) @@ -121,6 +121,7 @@ * The 'relater' encapsulated 1 or 2 'searchers', and is responsible for moving elements from one to the other. */ function MMBaseRelater(d, validator) { + var self = this; this.div = d; this.related = {}; // related nodes this.unrelated = {}; // unrelated nodes @@ -201,7 +202,14 @@ this.setMaxPages($(d).find("div.settings span.maxpages").html()); this.setContext($(d).find("div.settings span.context").html()); - + var submit = $(d).find("div.settings span.submit").html(); + if (submit != null) { + $(submit).click( + function(el) { + return self.commit(el); + }); + } + $(this.div).trigger("mmsrRelaterReady", [self]); } _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs