From 7e98b67a2b48a741ad2f84681246c0eb9a74aea3 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 21 Jan 2013 21:44:42 -0800 Subject: [PATCH 1/2] IDEMPIERE-77 Start on the left, Cancel on the right / Revert changes for installer from changeset 367d6f7 / Implement correct fix --- .../src/org/compiere/install/KeyStoreDialog.java | 13 ++++--------- .../src/org/compiere/install/util/ConfirmPanel.java | 7 +------ 2 files changed, 5 insertions(+), 15 deletions(-) diff --git a/org.adempiere.install/src/org/compiere/install/KeyStoreDialog.java b/org.adempiere.install/src/org/compiere/install/KeyStoreDialog.java index 522c99134a..08a20506d2 100644 --- a/org.adempiere.install/src/org/compiere/install/KeyStoreDialog.java +++ b/org.adempiere.install/src/org/compiere/install/KeyStoreDialog.java @@ -86,13 +86,10 @@ public class KeyStoreDialog extends JDialog implements ActionListener private JTextField fS = new JTextField(20); private JLabel lC = new JLabel("(C) Country (2 Char)"); private JTextField fC = new JTextField(2); - // Invert OK/Cancel IDEMPIERE-77 - private JButton bOK = ConfirmPanel.createOKButton(""); - private JButton bCancel = ConfirmPanel.createCancelButton(""); - private boolean m_ok = false; - - + private JButton bOK = ConfirmPanel.createOKButton("OK"); + private JButton bCancel = ConfirmPanel.createCancelButton("Cancel"); + private boolean m_ok = false; /** * Static Layout @@ -118,14 +115,12 @@ public class KeyStoreDialog extends JDialog implements ActionListener getContentPane().add (panel, BorderLayout.CENTER); // JPanel confirmPanel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); - // Invert OK/Cancel IDEMPIERE-77 confirmPanel.add(bOK); confirmPanel.add(bCancel); getContentPane().add (confirmPanel, BorderLayout.SOUTH); // - bOK.addActionListener(this); bCancel.addActionListener(this); - + bOK.addActionListener(this); } // jbInit /** diff --git a/org.adempiere.install/src/org/compiere/install/util/ConfirmPanel.java b/org.adempiere.install/src/org/compiere/install/util/ConfirmPanel.java index 07d4a5f389..30cc4f97e1 100644 --- a/org.adempiere.install/src/org/compiere/install/util/ConfirmPanel.java +++ b/org.adempiere.install/src/org/compiere/install/util/ConfirmPanel.java @@ -24,7 +24,6 @@ import java.awt.event.ActionListener; import java.awt.event.KeyEvent; import javax.swing.Icon; -import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JFrame; @@ -49,8 +48,7 @@ public final class ConfirmPanel extends JPanel * */ private static final long serialVersionUID = 6041019802043360966L; - private static ImageIcon ImagenCancel = new ImageIcon("/images/Cancel24.png"); - private static ImageIcon ImagenOk = new ImageIcon("/images/Ok24.png"); + /** * Create OK Button with label text and F4 Shortcut @@ -63,7 +61,6 @@ public final class ConfirmPanel extends JPanel JButton button = (JButton)aa.getButton(); button.setMargin(s_insets); button.setDefaultCapable(true); - button.setIcon(ImagenOk); return button; } // createOKButton @@ -89,7 +86,6 @@ public final class ConfirmPanel extends JPanel AppsAction aa = new AppsAction (A_CANCEL, KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), text); JButton button = (JButton)aa.getButton(); button.setMargin(s_insets); - button.setIcon(ImagenCancel); return button; } // createCancelButton @@ -498,7 +494,6 @@ public final class ConfirmPanel extends JPanel // JPanel okCancel = new JPanel(new FlowLayout(FlowLayout.RIGHT)); okCancel.setOpaque(false); - // Invert OK/Cancel IDEMPIERE-77 bOK = createOKButton(withText); okCancel.add(bOK); bCancel = createCancelButton(withText); From 573e919b3a3e1070653d1f2da4d12ce412682ada Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Mon, 21 Jan 2013 21:59:48 -0800 Subject: [PATCH 2/2] IDEMPIERE-377 Improve current search dialog box - Lookup button on toolbar continues to insert a new record - Thanks to Juliana --- .../WEB-INF/src/org/adempiere/webui/window/FindWindow.java | 1 + 1 file changed, 1 insertion(+) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index 36843e8a8a..809036a8db 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -992,6 +992,7 @@ public class FindWindow extends Window implements EventListener, ValueCha public void onEvent(Event event) throws Exception { + m_createNew = false; if (Events.ON_SELECT.equals(event.getName())) { if (event.getTarget() instanceof Listbox)