- fixed range query - improve layout
This commit is contained in:
parent
0eaef1dc39
commit
9a9b9472f9
|
@ -45,6 +45,7 @@ import org.adempiere.webui.component.Listbox;
|
||||||
import org.adempiere.webui.component.Panel;
|
import org.adempiere.webui.component.Panel;
|
||||||
import org.adempiere.webui.component.Row;
|
import org.adempiere.webui.component.Row;
|
||||||
import org.adempiere.webui.component.Rows;
|
import org.adempiere.webui.component.Rows;
|
||||||
|
import org.adempiere.webui.component.Tabpanel;
|
||||||
import org.adempiere.webui.component.Textbox;
|
import org.adempiere.webui.component.Textbox;
|
||||||
import org.adempiere.webui.component.ToolBar;
|
import org.adempiere.webui.component.ToolBar;
|
||||||
import org.adempiere.webui.component.ToolBarButton;
|
import org.adempiere.webui.component.ToolBarButton;
|
||||||
|
@ -77,10 +78,12 @@ import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
import org.zkoss.zk.ui.event.Events;
|
import org.zkoss.zk.ui.event.Events;
|
||||||
import org.zkoss.zk.ui.util.Clients;
|
import org.zkoss.zk.ui.util.Clients;
|
||||||
|
import org.zkoss.zkex.zul.Borderlayout;
|
||||||
|
import org.zkoss.zkex.zul.Center;
|
||||||
|
import org.zkoss.zkex.zul.North;
|
||||||
|
import org.zkoss.zkex.zul.South;
|
||||||
import org.zkoss.zul.Comboitem;
|
import org.zkoss.zul.Comboitem;
|
||||||
import org.zkoss.zul.Hbox;
|
import org.zkoss.zul.Hbox;
|
||||||
import org.zkoss.zul.Separator;
|
|
||||||
import org.zkoss.zul.Vbox;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class is based on org.compiere.apps.search.Find written by Jorg Janke.
|
* This class is based on org.compiere.apps.search.Find written by Jorg Janke.
|
||||||
|
@ -211,7 +214,8 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.setBorder("normal");
|
this.setBorder("normal");
|
||||||
this.setWidth("700px");
|
this.setWidth("750px");
|
||||||
|
this.setHeight("350px");
|
||||||
this.setTitle(Msg.getMsg(Env.getCtx(), "Find").replaceAll("&", "") + ": " + title);
|
this.setTitle(Msg.getMsg(Env.getCtx(), "Find").replaceAll("&", "") + ": " + title);
|
||||||
this.setAttribute(Window.MODE_KEY, Window.MODE_MODAL);
|
this.setAttribute(Window.MODE_KEY, Window.MODE_MODAL);
|
||||||
this.setClosable(false);
|
this.setClosable(false);
|
||||||
|
@ -310,11 +314,23 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
||||||
contentSimpleRows.appendChild(pnlName);
|
contentSimpleRows.appendChild(pnlName);
|
||||||
contentSimpleRows.appendChild(pnlDocument);
|
contentSimpleRows.appendChild(pnlDocument);
|
||||||
contentSimpleRows.appendChild(pnlDescription);
|
contentSimpleRows.appendChild(pnlDescription);
|
||||||
|
contentSimple.setVflex(true);
|
||||||
|
|
||||||
|
Borderlayout layout = new Borderlayout();
|
||||||
|
layout.setStyle("height: 100%; width: 99%; position: relative");
|
||||||
|
winLookupRecord.appendChild(layout);
|
||||||
|
|
||||||
|
Center center = new Center();
|
||||||
|
layout.appendChild(center);
|
||||||
|
center.appendChild(contentSimple);
|
||||||
|
center.setFlex(true);
|
||||||
|
|
||||||
|
South south = new South();
|
||||||
|
layout.appendChild(south);
|
||||||
|
south.appendChild(hboxButton);
|
||||||
|
|
||||||
winLookupRecord.appendChild(contentSimple);
|
|
||||||
winLookupRecord.appendChild(new Separator());
|
|
||||||
winLookupRecord.appendChild(hboxButton);
|
|
||||||
winLookupRecord.setWidth("100%");
|
winLookupRecord.setWidth("100%");
|
||||||
|
winLookupRecord.setHeight("100%");
|
||||||
winLookupRecord.addEventListener(Events.ON_OK, this);
|
winLookupRecord.addEventListener(Events.ON_OK, this);
|
||||||
|
|
||||||
} // initSimple
|
} // initSimple
|
||||||
|
@ -407,13 +423,27 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
||||||
listhead.appendChild(lstHQueryValue);
|
listhead.appendChild(lstHQueryValue);
|
||||||
listhead.appendChild(lstHQueryTo);
|
listhead.appendChild(lstHQueryTo);
|
||||||
advancedPanel.appendChild(listhead);
|
advancedPanel.appendChild(listhead);
|
||||||
|
advancedPanel.setVflex(true);
|
||||||
|
|
||||||
Vbox advancedWindow = new Vbox();
|
Borderlayout layout = new Borderlayout();
|
||||||
advancedWindow.setWidth("100%");
|
layout.setStyle("height: 100%; width: 99%; position: relative;");
|
||||||
advancedWindow.appendChild(toolBar);
|
winAdvanced.appendChild(layout);
|
||||||
advancedWindow.appendChild(advancedPanel);
|
|
||||||
advancedWindow.appendChild(confirmPanel);
|
North north = new North();
|
||||||
winAdvanced.appendChild(advancedWindow);
|
layout.appendChild(north);
|
||||||
|
north.appendChild(toolBar);
|
||||||
|
|
||||||
|
Center center = new Center();
|
||||||
|
layout.appendChild(center);
|
||||||
|
center.appendChild(advancedPanel);
|
||||||
|
center.setFlex(true);
|
||||||
|
|
||||||
|
South south = new South();
|
||||||
|
layout.appendChild(south);
|
||||||
|
south.appendChild(confirmPanel);
|
||||||
|
|
||||||
|
winAdvanced.setHeight("100%");
|
||||||
|
winAdvanced.setWidth("100%");
|
||||||
winAdvanced.addEventListener(Events.ON_OK,this);
|
winAdvanced.addEventListener(Events.ON_OK,this);
|
||||||
|
|
||||||
} // initAdvanced
|
} // initAdvanced
|
||||||
|
@ -426,10 +456,17 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
||||||
{
|
{
|
||||||
winMain = new MultiTabPart();
|
winMain = new MultiTabPart();
|
||||||
winMain.createPart(this);
|
winMain.createPart(this);
|
||||||
|
winMain.getComponent().setStyle("height: 100%; width: 100%; position: relative;");
|
||||||
winAdvanced = new Window();
|
winAdvanced = new Window();
|
||||||
winLookupRecord = new Window();
|
winLookupRecord = new Window();
|
||||||
winMain.addTab(winLookupRecord, Msg.getMsg(Env.getCtx(), "Find").replaceAll("&", ""),false, true);
|
Tabpanel tabPanel = new Tabpanel();
|
||||||
winMain.addTab(winAdvanced, Msg.getMsg(Env.getCtx(), "Advanced").replaceAll("&", ""), false, false);
|
tabPanel.setStyle("height: 100%; width: 100%");
|
||||||
|
tabPanel.appendChild(winLookupRecord);
|
||||||
|
winMain.addTab(tabPanel, Msg.getMsg(Env.getCtx(), "Find").replaceAll("&", ""),false, true);
|
||||||
|
tabPanel = new Tabpanel();
|
||||||
|
tabPanel.setStyle("height: 100%; width: 100%");
|
||||||
|
tabPanel.appendChild(winAdvanced);
|
||||||
|
winMain.addTab(tabPanel, Msg.getMsg(Env.getCtx(), "Advanced").replaceAll("&", ""), false, false);
|
||||||
initSimple();
|
initSimple();
|
||||||
initAdvanced();
|
initAdvanced();
|
||||||
|
|
||||||
|
@ -1371,7 +1408,7 @@ public class FindWindow extends Window implements EventListener,ValueChangeListe
|
||||||
else if (field.getDisplayType() == DisplayType.YesNo)
|
else if (field.getDisplayType() == DisplayType.YesNo)
|
||||||
infoDisplay = Msg.getMsg(Env.getCtx(), infoDisplay);
|
infoDisplay = Msg.getMsg(Env.getCtx(), infoDisplay);
|
||||||
// Value2 ******
|
// Value2 ******
|
||||||
if (MQuery.OPERATORS[MQuery.BETWEEN_INDEX].equals(op))
|
if (MQuery.OPERATORS[MQuery.BETWEEN_INDEX].equals(op.getSelectedItem().toValueNamePair()))
|
||||||
{
|
{
|
||||||
ListCell cellQueryTo = (ListCell)row.getFellow("cellQueryTo"+row.getId());
|
ListCell cellQueryTo = (ListCell)row.getFellow("cellQueryTo"+row.getId());
|
||||||
Object value2 = cellQueryTo.getAttribute("value");
|
Object value2 = cellQueryTo.getAttribute("value");
|
||||||
|
|
Loading…
Reference in New Issue