Skip to content

Commit ad5adad

Browse files
NicolasEYSSERICSilverYoCha
authored andcommitted
fixing bug #5068
fixing method move() from KmeliaBmEJB.java and moving it into WysiwygController.java Furthermore, removing leading space character in numbers of publication displayed in the treeview
1 parent cdf7c94 commit ad5adad

File tree

2 files changed

+6
-17
lines changed

2 files changed

+6
-17
lines changed

kmelia/kmelia-ejb/src/main/java/com/stratelia/webactiv/kmelia/control/ejb/KmeliaBmEJB.java

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4917,24 +4917,13 @@ public NodeDetail moveNode(NodePK nodePK, NodePK to, String userId) {
49174917
}
49184918
}
49194919
}
4920-
4921-
try {
4922-
NodePK fromForeignPK = fromNode.getNodePK();
4923-
List<SimpleDocument> documents = AttachmentServiceFactory.getAttachmentService().
4924-
listAllDocumentsByForeignKey(fromForeignPK, null);
4925-
ForeignPK toForeignPK = new ForeignPK(toNodePK.getId(), to);
4926-
for (SimpleDocument document : documents) {
4927-
AttachmentServiceFactory.getAttachmentService().moveDocument(document, toForeignPK);
4928-
}
4929-
} catch (org.silverpeas.attachment.AttachmentException e) {
4930-
SilverTrace.error("kmelia", "KmeliaSessionController.pastePublication()",
4931-
"root.MSG_GEN_PARAM_VALUE", "kmelia.CANT_MOVE_ATTACHMENTS", e);
4920+
4921+
// move rich description of node
4922+
if (!nodePK.getInstanceId().equals(to.getInstanceId())) {
4923+
WysiwygController.move(fromNode.getNodePK().getInstanceId(), "Node_" + fromNode.getId(), to.getInstanceId(), "Node_" + toNodePK.getId());
49324924
}
4933-
// change images path in wysiwyg
4934-
WysiwygController.wysiwygPlaceHaveChanged(fromNode.getNodePK().getInstanceId(),
4935-
"Node_" + fromNode.getNodePK().getId(), to.getInstanceId(), "Node_" + toNodePK.getId());
49364925

4937-
// move publications of topics
4926+
// move publications of node
49384927
movePublicationsOfTopic(fromNode.getNodePK(), toNodePK, userId);
49394928
}
49404929
}

kmelia/kmelia-war/src/main/webapp/kmelia/jsp/treeview.jsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ function spreadNbItems(children) {
662662
child.attr['class'] = child.attr['status'];
663663
<% } %>
664664
if (child.attr['nbItems']) {
665-
child.data = child.data + " ( "+child.attr['nbItems']+")";
665+
child.data = child.data + " ("+child.attr['nbItems']+")";
666666
spreadNbItems(child.children);
667667
}
668668
}

0 commit comments

Comments
 (0)