IDEMPIERE-5005 - Chat window broken (#935)
* IDEMPIERE-5005 - Chat window broken Fix event processing on chat window * IDEMPIERE-5005 - Chat window broken Removed confirm panel as it servers no other purpose than closing the window.
This commit is contained in:
parent
6a56596f10
commit
aeb45c6192
|
@ -24,9 +24,7 @@ import java.util.logging.Level;
|
|||
|
||||
import org.adempiere.webui.AdempiereWebUI;
|
||||
import org.adempiere.webui.ClientInfo;
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.component.Button;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.Window;
|
||||
|
@ -127,7 +125,6 @@ public class WChat extends Window implements EventListener<Event>, DialogEvents
|
|||
|
||||
private Borderlayout mainPanel = new Borderlayout();
|
||||
private Textbox newText = new Textbox();
|
||||
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
||||
private Tree messageTree = new Tree();
|
||||
private Button addButton;
|
||||
private Map<Integer, Component> entryMap = new HashMap<Integer, Component>();
|
||||
|
@ -172,10 +169,6 @@ public class WChat extends Window implements EventListener<Event>, DialogEvents
|
|||
ZKUpdateUtil.setVflex(south, "min");
|
||||
|
||||
mainPanel.appendChild(south);
|
||||
LayoutUtils.addSclass("dialog-footer", confirmPanel);
|
||||
confirmPanel.addActionListener(this);
|
||||
south.appendChild(confirmPanel);
|
||||
ZKUpdateUtil.setVflex(confirmPanel, "min");
|
||||
|
||||
if (!ThemeManager.isUseCSSForWindowSize())
|
||||
{
|
||||
|
@ -332,11 +325,7 @@ public class WChat extends Window implements EventListener<Event>, DialogEvents
|
|||
*/
|
||||
public void actionPerformed (Event e)
|
||||
{
|
||||
if (e.getTarget().getId().equals(ConfirmPanel.A_OK))
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
else if (e.getTarget() == addButton)
|
||||
if (e.getTarget() == addButton)
|
||||
{
|
||||
String data = newText.getText();
|
||||
if (data != null && data.length() > 0)
|
||||
|
@ -391,10 +380,7 @@ public class WChat extends Window implements EventListener<Event>, DialogEvents
|
|||
} // actionPerformed
|
||||
|
||||
public void onEvent(Event event) throws Exception {
|
||||
if (event.getTarget() == confirmPanel.getOKButton())
|
||||
actionPerformed(event);
|
||||
else if (event.getTarget() == confirmPanel.getButton(ConfirmPanel.A_CANCEL))
|
||||
onCancel();
|
||||
actionPerformed(event);
|
||||
}
|
||||
|
||||
private void onCancel() {
|
||||
|
|
Loading…
Reference in New Issue