* Remove hardcoded width for info listbox
* don't stretch numberbox and datebox * make stretch work for urlbox and searchbox * enable showacct, showtrl and showadvance by default. revisit later when doing preference * fixed issue with page reload
This commit is contained in:
parent
c4ba906b73
commit
9551cae4fc
|
@ -122,6 +122,11 @@ public class AdempiereWebUI extends Window implements EventListener, IWebClient
|
||||||
MSession.get (ctx, currSess.getRemoteAddr(),
|
MSession.get (ctx, currSess.getRemoteAddr(),
|
||||||
currSess.getRemoteHost(), httpSess.getId() );
|
currSess.getRemoteHost(), httpSess.getId() );
|
||||||
|
|
||||||
|
//enable full interface, relook into this when doing preference
|
||||||
|
Env.setContext(ctx, "#ShowTrl", true);
|
||||||
|
Env.setContext(ctx, "#ShowAcct", true);
|
||||||
|
Env.setContext(ctx, "#ShowAdvanced", true);
|
||||||
|
|
||||||
IDesktop d = (IDesktop) currSess.getAttribute("application.desktop");
|
IDesktop d = (IDesktop) currSess.getAttribute("application.desktop");
|
||||||
if (d != null && d instanceof Desktop)
|
if (d != null && d instanceof Desktop)
|
||||||
{
|
{
|
||||||
|
@ -142,7 +147,7 @@ public class AdempiereWebUI extends Window implements EventListener, IWebClient
|
||||||
|
|
||||||
current.carryOver();
|
current.carryOver();
|
||||||
|
|
||||||
appDesktop.getComponent().setPage(this.getPage());
|
appDesktop.setPage(this.getPage());
|
||||||
|
|
||||||
currSess.setAttribute("execution.carryover", current);
|
currSess.setAttribute("execution.carryover", current);
|
||||||
|
|
||||||
|
|
|
@ -108,12 +108,13 @@ public class NumberBox extends Bandbox
|
||||||
super.setValue(formattedValue);
|
super.setValue(formattedValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
public void setReadonly(boolean readonly)
|
public void setReadonly(boolean readonly)
|
||||||
{
|
{
|
||||||
// Due to bug in bandbox - once set readonly, setting to not readonly
|
// Due to bug in bandbox - once set readonly, setting to not readonly
|
||||||
// does not work
|
// does not work
|
||||||
super.setDisabled(readonly);
|
super.setDisabled(readonly);
|
||||||
}
|
}*/
|
||||||
|
|
||||||
private Bandpopup getBandPopup()
|
private Bandpopup getBandPopup()
|
||||||
{
|
{
|
||||||
|
|
|
@ -21,8 +21,9 @@ import java.beans.PropertyChangeListener;
|
||||||
import java.beans.PropertyChangeSupport;
|
import java.beans.PropertyChangeSupport;
|
||||||
|
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
import org.zkoss.zul.Hbox;
|
||||||
|
|
||||||
public class Searchbox extends Panel
|
public class Searchbox extends Hbox
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
private PropertyChangeSupport m_propertyChangeListeners = new PropertyChangeSupport(this);
|
private PropertyChangeSupport m_propertyChangeListeners = new PropertyChangeSupport(this);
|
||||||
|
@ -48,7 +49,9 @@ public class Searchbox extends Panel
|
||||||
private void initComponents()
|
private void initComponents()
|
||||||
{
|
{
|
||||||
txt = new Textbox();
|
txt = new Textbox();
|
||||||
|
txt.setWidth("100%");
|
||||||
btn = new Button();
|
btn = new Button();
|
||||||
|
btn.setHeight("98%");
|
||||||
appendChild(txt);
|
appendChild(txt);
|
||||||
appendChild(btn);
|
appendChild(btn);
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,11 +18,12 @@
|
||||||
package org.adempiere.webui.component;
|
package org.adempiere.webui.component;
|
||||||
|
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
import org.zkoss.zul.Hbox;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* URL Box
|
* URL Box
|
||||||
*/
|
*/
|
||||||
public class Urlbox extends Panel
|
public class Urlbox extends Hbox
|
||||||
{
|
{
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -50,7 +51,9 @@ public class Urlbox extends Panel
|
||||||
private void initComponents()
|
private void initComponents()
|
||||||
{
|
{
|
||||||
txtUrl = new Textbox();
|
txtUrl = new Textbox();
|
||||||
|
txtUrl.setWidth("100%");
|
||||||
btnUrl = new Button();
|
btnUrl = new Button();
|
||||||
|
btnUrl.setHeight("98%");
|
||||||
appendChild(txtUrl);
|
appendChild(txtUrl);
|
||||||
appendChild(btnUrl);
|
appendChild(btnUrl);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,6 +23,8 @@ import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.adempiere.webui.LayoutUtils;
|
import org.adempiere.webui.LayoutUtils;
|
||||||
|
import org.adempiere.webui.component.Bandbox;
|
||||||
|
import org.adempiere.webui.component.Datebox;
|
||||||
import org.adempiere.webui.component.Grid;
|
import org.adempiere.webui.component.Grid;
|
||||||
import org.adempiere.webui.component.GridPanel;
|
import org.adempiere.webui.component.GridPanel;
|
||||||
import org.adempiere.webui.component.Label;
|
import org.adempiere.webui.component.Label;
|
||||||
|
@ -290,7 +292,9 @@ DataStatusListener, ValueChangeListener
|
||||||
}
|
}
|
||||||
|
|
||||||
if (comp.getComponent() instanceof HtmlBasedComponent) {
|
if (comp.getComponent() instanceof HtmlBasedComponent) {
|
||||||
((HtmlBasedComponent)comp.getComponent()).setWidth("100%");
|
//can't stretch bandbox & datebox
|
||||||
|
if (!(comp.getComponent() instanceof Bandbox) && !(comp.getComponent() instanceof Datebox))
|
||||||
|
((HtmlBasedComponent)comp.getComponent()).setWidth("100%");
|
||||||
}
|
}
|
||||||
|
|
||||||
WEditorPopupMenu popupMenu = comp.getPopupMenu();
|
WEditorPopupMenu popupMenu = comp.getPopupMenu();
|
||||||
|
|
|
@ -167,7 +167,7 @@ public class InfoBPartnerPanel extends InfoPanel implements EventListener, WTabl
|
||||||
checkVendor.addEventListener(Events.ON_CHECK, this);
|
checkVendor.addEventListener(Events.ON_CHECK, this);
|
||||||
|
|
||||||
contentPanel = new WListbox();
|
contentPanel = new WListbox();
|
||||||
contentPanel.setWidth("100%");
|
contentPanel.setWidth("99%");
|
||||||
contentPanel.setHeight("400px");
|
contentPanel.setHeight("400px");
|
||||||
contentPanel.setStyle("overflow:auto");
|
contentPanel.setStyle("overflow:auto");
|
||||||
|
|
||||||
|
|
|
@ -37,7 +37,6 @@ import org.compiere.util.DisplayType;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zul.Div;
|
|
||||||
import org.zkoss.zul.Hbox;
|
import org.zkoss.zul.Hbox;
|
||||||
import org.zkoss.zul.Vbox;
|
import org.zkoss.zul.Vbox;
|
||||||
|
|
||||||
|
@ -102,12 +101,11 @@ public class InfoGeneralPanel extends InfoPanel implements EventListener
|
||||||
|
|
||||||
Vbox mainPanel = new Vbox();
|
Vbox mainPanel = new Vbox();
|
||||||
mainPanel.appendChild(parameterPanel);
|
mainPanel.appendChild(parameterPanel);
|
||||||
Div div = new Div();
|
contentPanel.setWidth("99%");
|
||||||
div.setStyle("overflow:auto");
|
contentPanel.setHeight("400px");
|
||||||
div.setWidth("100%");
|
contentPanel.setStyle("overflow:auto");
|
||||||
div.appendChild(contentPanel);
|
|
||||||
|
|
||||||
mainPanel.appendChild(div);
|
mainPanel.appendChild(contentPanel);
|
||||||
mainPanel.appendChild(confirmPanel);
|
mainPanel.appendChild(confirmPanel);
|
||||||
|
|
||||||
this.appendChild(mainPanel);
|
this.appendChild(mainPanel);
|
||||||
|
|
|
@ -44,7 +44,6 @@ import org.compiere.util.KeyNamePair;
|
||||||
import org.compiere.util.Msg;
|
import org.compiere.util.Msg;
|
||||||
import org.compiere.util.Util;
|
import org.compiere.util.Util;
|
||||||
import org.zkoss.zk.ui.WrongValueException;
|
import org.zkoss.zk.ui.WrongValueException;
|
||||||
import org.zkoss.zul.Div;
|
|
||||||
import org.zkoss.zul.Hbox;
|
import org.zkoss.zul.Hbox;
|
||||||
import org.zkoss.zul.Vbox;
|
import org.zkoss.zul.Vbox;
|
||||||
|
|
||||||
|
@ -174,8 +173,9 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
|
||||||
editorOrder.addValueChangeListner(this);
|
editorOrder.addValueChangeListner(this);
|
||||||
|
|
||||||
contentPanel = new WListbox();
|
contentPanel = new WListbox();
|
||||||
contentPanel.setWidth("1300px");
|
contentPanel.setWidth("99%");
|
||||||
contentPanel.setHeight("500px");
|
contentPanel.setHeight("400px");
|
||||||
|
contentPanel.setStyle("overflow:auto");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init()
|
private void init()
|
||||||
|
@ -268,11 +268,10 @@ public class InfoInvoicePanel extends InfoPanel implements ValueChangeListener
|
||||||
Vbox mainPanel = new Vbox();
|
Vbox mainPanel = new Vbox();
|
||||||
mainPanel.setWidth("100%");
|
mainPanel.setWidth("100%");
|
||||||
mainPanel.appendChild(parameterPanel);
|
mainPanel.appendChild(parameterPanel);
|
||||||
Div div = new Div();
|
contentPanel.setWidth("99%");
|
||||||
div.setStyle("overflow:scroll");
|
contentPanel.setHeight("400px");
|
||||||
div.setWidth("100%");
|
contentPanel.setStyle("overflow:auto");
|
||||||
div.appendChild(contentPanel);
|
mainPanel.appendChild(contentPanel);
|
||||||
mainPanel.appendChild(div);
|
|
||||||
mainPanel.appendChild(confirmPanel);
|
mainPanel.appendChild(confirmPanel);
|
||||||
mainPanel.appendChild(statusBar);
|
mainPanel.appendChild(statusBar);
|
||||||
|
|
||||||
|
|
|
@ -151,8 +151,9 @@ public class InfoOrderPanel extends InfoPanel implements ValueChangeListener
|
||||||
Env.getCtx(), "C_BPartner_ID"), "", true, false, true);
|
Env.getCtx(), "C_BPartner_ID"), "", true, false, true);
|
||||||
editorBPartner.addValueChangeListner(this);
|
editorBPartner.addValueChangeListner(this);
|
||||||
contentPanel = new WListbox();
|
contentPanel = new WListbox();
|
||||||
contentPanel.setWidth("1000px");
|
contentPanel.setWidth("99%");
|
||||||
contentPanel.setHeight("500px");
|
contentPanel.setHeight("400px");
|
||||||
|
contentPanel.setStyle("overflow:auto");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void init()
|
public void init()
|
||||||
|
|
|
@ -250,6 +250,8 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
||||||
confirmPanel = new ConfirmPanel(true,true,false,false,true,true);
|
confirmPanel = new ConfirmPanel(true,true,false,false,true,true);
|
||||||
confirmPanel.addActionListener(Events.ON_CLICK, this);
|
confirmPanel.addActionListener(Events.ON_CLICK, this);
|
||||||
confirmPanel.setStyle("border-top: 2px groove #444; padding-top: 4px");
|
confirmPanel.setStyle("border-top: 2px groove #444; padding-top: 4px");
|
||||||
|
|
||||||
|
this.setSizable(true);
|
||||||
} // init
|
} // init
|
||||||
protected ConfirmPanel confirmPanel;
|
protected ConfirmPanel confirmPanel;
|
||||||
/** Master (owning) Window */
|
/** Master (owning) Window */
|
||||||
|
|
|
@ -202,8 +202,9 @@ public final class InfoProductPanel extends InfoPanel implements EventListener
|
||||||
fieldVendor.setMaxlength(40);
|
fieldVendor.setMaxlength(40);
|
||||||
|
|
||||||
contentPanel = new WListbox();
|
contentPanel = new WListbox();
|
||||||
contentPanel.setWidth("1500px");
|
contentPanel.setWidth("99%");
|
||||||
contentPanel.setHeight("500px");
|
contentPanel.setHeight("400px");
|
||||||
|
contentPanel.setStyle("overflow:auto");
|
||||||
} // initComponents
|
} // initComponents
|
||||||
|
|
||||||
private void init()
|
private void init()
|
||||||
|
|
|
@ -37,7 +37,7 @@ public final class WebContext extends Properties
|
||||||
/**
|
/**
|
||||||
* Set english as default language
|
* Set english as default language
|
||||||
*/
|
*/
|
||||||
this.put(Env.LANGUAGE, Language.getBaseAD_Language());
|
this.put(Env.LANGUAGE, Language.getBaseAD_Language());
|
||||||
}
|
}
|
||||||
|
|
||||||
private static InheritableThreadLocal context = new InheritableThreadLocal() {
|
private static InheritableThreadLocal context = new InheritableThreadLocal() {
|
||||||
|
|
Loading…
Reference in New Issue