* sync with branches/adempiere341 revision 6584

This commit is contained in:
Heng Sin Low 2008-10-04 00:08:49 +00:00
parent 127a2dd87e
commit 453696f06c
5 changed files with 26 additions and 6 deletions

View File

@ -109,4 +109,10 @@ public interface IDesktop {
* @param task_ID * @param task_ID
*/ */
public void openTask(int task_ID); public void openTask(int task_ID);
/**
*
* @param workflow_ID
*/
public void openWorkflow(int workflow_ID);
} }

View File

@ -238,6 +238,8 @@ public class WFPanel extends Panel implements EventListener
SessionManager.getAppDesktop().openProcessDialog(wfn.getAD_Process_ID(), false); SessionManager.getAppDesktop().openProcessDialog(wfn.getAD_Process_ID(), false);
} else if (wfn.getAD_Task_ID() > 0) { } else if (wfn.getAD_Task_ID() > 0) {
SessionManager.getAppDesktop().openTask(wfn.getAD_Task_ID()); SessionManager.getAppDesktop().openTask(wfn.getAD_Task_ID());
} else if (wfn.getAD_Workflow_ID() > 0) {
SessionManager.getAppDesktop().openWorkflow(wfn.getAD_Workflow_ID());
} else { } else {
throw new ApplicationException("Action not yet implemented: " + wfn.getAction()); throw new ApplicationException("Action not yet implemented: " + wfn.getAction());
} }

View File

@ -125,6 +125,12 @@ public class ADTreeOnDropListener implements EventListener {
{ {
SimpleTreeNode newParent; SimpleTreeNode newParent;
int index; int index;
// remove
SimpleTreeNode oldParent = treeModel.getParent(movingNode);
treeModel.removeNode(movingNode);
//get new index
if (!moveInto) if (!moveInto)
{ {
newParent = treeModel.getParent(toNode); newParent = treeModel.getParent(toNode);
@ -136,10 +142,6 @@ public class ADTreeOnDropListener implements EventListener {
index = 0; // the first node index = 0; // the first node
} }
// remove
SimpleTreeNode oldParent = treeModel.getParent(movingNode);
treeModel.removeNode(movingNode);
// insert // insert
treeModel.addNode(newParent, movingNode, index); treeModel.addNode(newParent, movingNode, index);

View File

@ -30,6 +30,7 @@ public class Datebox extends org.zkoss.zul.Datebox
public void setEnabled(boolean enabled) public void setEnabled(boolean enabled)
{ {
this.setReadonly(!enabled); this.setReadonly(!enabled);
this.setButtonVisible(enabled);
} }
public boolean isEnabled() public boolean isEnabled()

View File

@ -51,6 +51,8 @@ public class NumberBox extends Div
private Decimalbox decimalBox = null; private Decimalbox decimalBox = null;
private Button btn; private Button btn;
private Popup popup;
/** /**
* *
* @param integral * @param integral
@ -72,7 +74,7 @@ public class NumberBox extends Div
btn = new Button(); btn = new Button();
btn.setImage("/images/Calculator16.png"); btn.setImage("/images/Calculator16.png");
Popup popup = getCalculatorPopup(); popup = getCalculatorPopup();
btn.setSclass("editor-button"); btn.setSclass("editor-button");
btn.setPopup(popup); btn.setPopup(popup);
btn.setStyle("text-align: center;"); btn.setStyle("text-align: center;");
@ -346,6 +348,13 @@ public class NumberBox extends Div
{ {
decimalBox.setReadonly(!enabled); decimalBox.setReadonly(!enabled);
btn.setEnabled(enabled); btn.setEnabled(enabled);
if (enabled)
btn.setPopup(popup);
else
{
Popup p = null;
btn.setPopup(p);
}
} }
/** /**