[kupu-checkins] r52490 - in kupu/trunk/kupu: common doc
duncan at codespeak.net
duncan at codespeak.net
Fri Mar 14 13:14:30 CET 2008
Author: duncan
Date: Fri Mar 14 13:14:29 2008
New Revision: 52490
Modified:
kupu/trunk/kupu/common/kupubasetools.js
kupu/trunk/kupu/doc/CHANGES.txt
Log:
Manage anchors got confused by links
Modified: kupu/trunk/kupu/common/kupubasetools.js
==============================================================================
--- kupu/trunk/kupu/common/kupubasetools.js (original)
+++ kupu/trunk/kupu/common/kupubasetools.js Fri Mar 14 13:14:29 2008
@@ -2870,7 +2870,10 @@
/* Returns the anchor for a node, creating one if reqd. unless
* ifexists is set*/
var anchors = node.getElementsByTagName('a');
- if (anchors.length > 0) return anchors[0].name;
+ for (var i = 0; i < anchors.length; i++) {
+ if (anchors[i].name) { return anchors[i].name; }
+ }
+
if (ifexists) return;
var anchor = Sarissa.getText(node, true).strip().truncate(40).
Modified: kupu/trunk/kupu/doc/CHANGES.txt
==============================================================================
--- kupu/trunk/kupu/doc/CHANGES.txt (original)
+++ kupu/trunk/kupu/doc/CHANGES.txt Fri Mar 14 13:14:29 2008
@@ -4,7 +4,12 @@
- 1.4.9
- - Workaround for bad KSS form submissions (Plone ticket 7893)
+ - Manage anchors didn't add an anchor correctly if there was an
+ anchor used for a link inside the element.
+
+ - Plone tickets
+
+ * 7893 Workaround for bad KSS form submissions
- 1.4.8
More information about the kupu-checkins
mailing list