From 1b24942054248e6e31a102ffc57c79a2fa0b4fa9 Mon Sep 17 00:00:00 2001 From: Nicolas Micoud Date: Sun, 2 Jun 2013 14:06:50 +0200 Subject: [PATCH] IDEMPIERE 1009 Translation of tree popup --- .../webui/component/ADTreeOnDropListener.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java index 55c3dbfc7e..665b3a3ddb 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/ADTreeOnDropListener.java @@ -20,14 +20,16 @@ import org.compiere.model.MTree; import org.compiere.model.MTreeNode; import org.compiere.util.CLogger; import org.compiere.util.DB; +import org.compiere.util.Env; +import org.compiere.util.Msg; import org.compiere.util.Trx; import org.zkoss.zk.ui.event.DropEvent; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; +import org.zkoss.zul.DefaultTreeNode; import org.zkoss.zul.Menuitem; import org.zkoss.zul.Menupopup; -import org.zkoss.zul.DefaultTreeNode; import org.zkoss.zul.Tree; import org.zkoss.zul.Treeitem; import org.zkoss.zul.Treerow; @@ -102,21 +104,20 @@ public class ADTreeOnDropListener implements EventListener { tree.setSelectedItem(toItem); Events.sendEvent(tree, new Event(Events.ON_SELECT, tree)); - + MenuListener listener = new MenuListener(movingNode, toNode); - - //TODO: translation + Menupopup popup = new Menupopup(); - Menuitem menuItem = new Menuitem("Insert After"); + Menuitem menuItem = new Menuitem(Msg.getMsg(Env.getCtx(), "InsertAfter")); menuItem.setValue("InsertAfter"); menuItem.setParent(popup); menuItem.addEventListener(Events.ON_CLICK, listener); - - menuItem = new Menuitem("Move Into"); + + menuItem = new Menuitem(Msg.getMsg(Env.getCtx(), "MoveInto")); menuItem.setValue("MoveInto"); menuItem.setParent(popup); menuItem.addEventListener(Events.ON_CLICK, listener); - + popup.setPage(tree.getPage()); popup.open(toItem.getTreerow()); }