Update of /var/cvs/applications/richtext/src/org/mmbase/richtext/processors/xml
In directory
james.mmbase.org:/tmp/cvs-serv28230/src/org/mmbase/richtext/processors/xml
Modified Files:
Wiki.java
Log Message:
support for css classes
See also:
http://cvs.mmbase.org/viewcvs/applications/richtext/src/org/mmbase/richtext/processors/xml
Index: Wiki.java
===================================================================
RCS file:
/var/cvs/applications/richtext/src/org/mmbase/richtext/processors/xml/Wiki.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- Wiki.java 2 Jun 2008 12:54:20 -0000 1.10
+++ Wiki.java 3 Jun 2008 11:58:08 -0000 1.11
@@ -29,7 +29,7 @@
* id of the node).
*
* @author Michiel Meeuwissen
- * @version $Id: Wiki.java,v 1.10 2008/06/02 12:54:20 michiel Exp $
+ * @version $Id: Wiki.java,v 1.11 2008/06/03 11:58:08 michiel Exp $
* @todo something goes wrong if same node relation multiple times.
*/
@@ -172,6 +172,8 @@
if (log.isDebugEnabled()) {
log.debug("Found " + XMLWriter.write(a, true));
}
+ String className = a.getAttribute("class");
+ a.removeAttribute("class");
Node link = findById(a, links, fieldName, usedIds);
if (link == null) {
String id = a.getAttribute("id");
@@ -182,6 +184,7 @@
Relation newRel = editedNode.createRelation(node,
cloud.getRelationManager(editedNode.getNodeManager(), node.getNodeManager(),
"idrel"));
String decoratedId = generateId(fieldName, id,
usedIds);
newRel.setStringValue("id", decoratedId);
+ newRel.setStringValue("class", className);
newRel.commit();
a.setAttribute("id", decoratedId);
usedIds.add(decoratedId);
@@ -191,6 +194,8 @@
} else {
log.warn("No node found for " + id + "");
}
+ } else {
+ link.setStringValue("class", className);
}
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs