Update of /var/cvs/applications/searchrelate/examples
In directory james.mmbase.org:/tmp/cvs-serv32336
Modified Files:
example5.jspx
Log Message:
should bind only to the current example
See also: http://cvs.mmbase.org/viewcvs/applications/searchrelate/examples
Index: example5.jspx
===================================================================
RCS file: /var/cvs/applications/searchrelate/examples/example5.jspx,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- example5.jspx 21 Apr 2008 09:44:58 -0000 1.1
+++ example5.jspx 21 Apr 2008 09:49:47 -0000 1.2
@@ -8,13 +8,15 @@
<p>The 'current' repository, is actually optional. You'd probably bind some
other functionality to the 'relate' function then.
That can be done by setting the 'relateCallBack' function</p>
- <div>
+ <div id="example5">
<script type="text/javascript">
MMBaseRelater.ready(function(relater) {
+ if ($(relater.div).parents("#example5").length > 0) {
relater.relateCallBack = function(tr) {
var nodeNumber = relater.getNumber(tr);
alert("clicked on " + nodeNumber);
}
+ }
});
</script>
<mm:listnodescontainer type="news" id="repository" />
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs