Merge revision 6246 from branches/adempiere341
This commit is contained in:
parent
34c5801c80
commit
fc34e54d53
|
@ -734,10 +734,7 @@ public class Desktop extends AbstractUIPart implements MenuListener, Serializabl
|
|||
pd.setPage(page);
|
||||
pd.setClosable(true);
|
||||
pd.setWidth("500px");
|
||||
try {
|
||||
pd.doModal();
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
pd.doHighlighted();
|
||||
}
|
||||
}
|
||||
else if(menu.getAction().equals(MMenu.ACTION_Form))
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
*****************************************************************************/
|
||||
package org.adempiere.webui;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import org.adempiere.webui.session.ServerContext;
|
||||
|
@ -23,7 +24,7 @@ import net.sf.cglib.proxy.InvocationHandler;
|
|||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class ServerContextCallback implements InvocationHandler {
|
||||
public class ServerContextCallback implements InvocationHandler, Serializable {
|
||||
|
||||
public Object invoke(Object proxy, Method method, Object[] args)
|
||||
throws Throwable {
|
||||
|
|
|
@ -28,6 +28,9 @@ import java.sql.SQLException;
|
|||
import java.util.Enumeration;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
|
@ -44,6 +47,9 @@ import org.compiere.util.CLogger;
|
|||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Ini;
|
||||
import org.zkoss.web.servlet.Servlets;
|
||||
import org.zkoss.zk.ui.Execution;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
|
||||
/**
|
||||
* Windows Application Environment and utilities
|
||||
|
@ -691,4 +697,22 @@ public final class AEnv
|
|||
}
|
||||
return uri;
|
||||
} // getImageIcon
|
||||
|
||||
/**
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
public static boolean isFirefox2() {
|
||||
Execution execution = Executions.getCurrent();
|
||||
if (execution == null)
|
||||
return false;
|
||||
|
||||
Object n = execution.getNativeRequest();
|
||||
if (n instanceof ServletRequest) {
|
||||
String userAgent = Servlets.getUserAgent((ServletRequest) n);
|
||||
return userAgent.indexOf("Firefox/2") >= 0;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
} // AEnv
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
package org.adempiere.webui.apps;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
|
||||
|
@ -11,13 +16,17 @@ import org.adempiere.webui.component.Panel;
|
|||
import org.adempiere.webui.component.VerticalBox;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.adempiere.webui.window.SimplePDFViewer;
|
||||
import org.compiere.apps.ProcessCtl;
|
||||
import org.compiere.print.ReportEngine;
|
||||
import org.compiere.process.ProcessInfo;
|
||||
import org.compiere.process.ProcessInfoUtil;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.au.out.AuEcho;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.DesktopUnavailableException;
|
||||
import org.zkoss.zk.ui.Executions;
|
||||
|
@ -29,6 +38,13 @@ import org.zkoss.zul.Div;
|
|||
import org.zkoss.zul.Hbox;
|
||||
import org.zkoss.zul.Html;
|
||||
|
||||
import com.lowagie.text.Document;
|
||||
import com.lowagie.text.pdf.PdfContentByte;
|
||||
import com.lowagie.text.pdf.PdfCopy;
|
||||
import com.lowagie.text.pdf.PdfImportedPage;
|
||||
import com.lowagie.text.pdf.PdfReader;
|
||||
import com.lowagie.text.pdf.PdfWriter;
|
||||
|
||||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 2007 Low Heng Sin *
|
||||
|
@ -334,8 +350,8 @@ public class ProcessDialog extends Window implements EventListener//, ASyncProce
|
|||
m_isLocked = false;
|
||||
if (Executions.getCurrent() != null)
|
||||
{
|
||||
updateUI(pi);
|
||||
Clients.showBusy(null, false);
|
||||
updateUI(pi);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -366,22 +382,25 @@ public class ProcessDialog extends Window implements EventListener//, ASyncProce
|
|||
message.setContent(m_messageText.toString());
|
||||
//message.setCaretPosition(message.getDocument().getLength()); // scroll down
|
||||
m_ids = pi.getIDs();
|
||||
//
|
||||
bOK.setEnabled(true);
|
||||
|
||||
//no longer needed, hide to give more space to display log
|
||||
centerPanel.detach();
|
||||
invalidate();
|
||||
|
||||
Clients.response(new AuEcho(this, "onAfterProcess", null));
|
||||
}
|
||||
|
||||
public void onAfterProcess()
|
||||
{
|
||||
//
|
||||
afterProcessTask();
|
||||
// Close automatically
|
||||
if (m_IsReport && !pi.isError())
|
||||
if (m_IsReport && !m_pi.isError())
|
||||
this.dispose();
|
||||
|
||||
// If the process is a silent one and no errors occured, close the dialog
|
||||
if(m_ShowHelp != null && m_ShowHelp.equals("S"))
|
||||
this.dispose();
|
||||
this.dispose();
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -406,63 +425,139 @@ public class ProcessDialog extends Window implements EventListener//, ASyncProce
|
|||
* Print Shipments
|
||||
*/
|
||||
private void printShipments()
|
||||
{
|
||||
/*
|
||||
{
|
||||
if (m_ids == null)
|
||||
return;
|
||||
if (!ADialog.ask(m_WindowNo, this, "PrintShipments"))
|
||||
if (!FDialog.ask(m_WindowNo, this, "PrintShipments"))
|
||||
return;
|
||||
|
||||
m_messageText.append("<p>").append(Msg.getMsg(Env.getCtx(), "PrintShipments")).append("</p>");
|
||||
message.setText(m_messageText.toString());
|
||||
int retValue = ADialogDialog.A_CANCEL;
|
||||
do
|
||||
{
|
||||
// Loop through all items
|
||||
for (int i = 0; i < m_ids.length; i++)
|
||||
{
|
||||
int M_InOut_ID = m_ids[i];
|
||||
ReportCtl.startDocumentPrint(ReportEngine.SHIPMENT, M_InOut_ID, this, Env.getWindowNo(this), true);
|
||||
}
|
||||
ADialogDialog d = new ADialogDialog (this,
|
||||
Env.getHeader(Env.getCtx(), m_WindowNo),
|
||||
Msg.getMsg(Env.getCtx(), "PrintoutOK?"),
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
retValue = d.getReturnCode();
|
||||
}
|
||||
while (retValue == ADialogDialog.A_CANCEL);
|
||||
*/
|
||||
message.setContent(m_messageText.toString());
|
||||
Clients.showBusy("Processing...", true);
|
||||
Clients.response(new AuEcho(this, "onPrintShipments", null));
|
||||
} // printInvoices
|
||||
|
||||
public void onPrintShipments()
|
||||
{
|
||||
// Loop through all items
|
||||
List<File> pdfList = new ArrayList<File>();
|
||||
for (int i = 0; i < m_ids.length; i++)
|
||||
{
|
||||
int M_InOut_ID = m_ids[i];
|
||||
ReportEngine re = ReportEngine.get (Env.getCtx(), ReportEngine.SHIPMENT, M_InOut_ID);
|
||||
pdfList.add(re.getPDF());
|
||||
}
|
||||
|
||||
if (pdfList.size() > 1) {
|
||||
try {
|
||||
File outFile = File.createTempFile("PrintShipments", ".pdf");
|
||||
Document document = null;
|
||||
PdfWriter copy = null;
|
||||
for (File f : pdfList)
|
||||
{
|
||||
String fileName = f.getAbsolutePath();
|
||||
PdfReader reader = new PdfReader(fileName);
|
||||
reader.consolidateNamedDestinations();
|
||||
if (document == null)
|
||||
{
|
||||
document = new Document(reader.getPageSizeWithRotation(1));
|
||||
copy = PdfWriter.getInstance(document, new FileOutputStream(outFile));
|
||||
document.open();
|
||||
}
|
||||
int pages = reader.getNumberOfPages();
|
||||
PdfContentByte cb = copy.getDirectContent();
|
||||
for (int i = 1; i <= pages; i++) {
|
||||
document.newPage();
|
||||
PdfImportedPage page = copy.getImportedPage(reader, i);
|
||||
cb.addTemplate(page, 0, 0);
|
||||
}
|
||||
}
|
||||
document.close();
|
||||
|
||||
Clients.showBusy(null, false);
|
||||
Window win = new SimplePDFViewer(this.getTitle(), new FileInputStream(outFile));
|
||||
SessionManager.getAppDesktop().showWindow(win, "center");
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
||||
}
|
||||
} else if (pdfList.size() > 0) {
|
||||
Clients.showBusy(null, false);
|
||||
try {
|
||||
Window win = new SimplePDFViewer(this.getTitle(), new FileInputStream(pdfList.get(0)));
|
||||
SessionManager.getAppDesktop().showWindow(win, "center");
|
||||
} catch (Exception e)
|
||||
{
|
||||
log.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Print Invoices
|
||||
*/
|
||||
private void printInvoices()
|
||||
{
|
||||
/*
|
||||
if (m_ids == null)
|
||||
return;
|
||||
if (!ADialog.ask(m_WindowNo, this, "PrintInvoices"))
|
||||
if (!FDialog.ask(m_WindowNo, this, "PrintInvoices"))
|
||||
return;
|
||||
m_messageText.append("<p>").append(Msg.getMsg(Env.getCtx(), "PrintInvoices")).append("</p>");
|
||||
message.setText(m_messageText.toString());
|
||||
int retValue = ADialogDialog.A_CANCEL;
|
||||
do
|
||||
{
|
||||
// Loop through all items
|
||||
for (int i = 0; i < m_ids.length; i++)
|
||||
{
|
||||
int AD_Invoice_ID = m_ids[i];
|
||||
ReportCtl.startDocumentPrint(ReportEngine.INVOICE, AD_Invoice_ID, this, Env.getWindowNo(this), true);
|
||||
}
|
||||
ADialogDialog d = new ADialogDialog (this,
|
||||
Env.getHeader(Env.getCtx(), m_WindowNo),
|
||||
Msg.getMsg(Env.getCtx(), "PrintoutOK?"),
|
||||
JOptionPane.QUESTION_MESSAGE);
|
||||
retValue = d.getReturnCode();
|
||||
}
|
||||
while (retValue == ADialogDialog.A_CANCEL);
|
||||
*/
|
||||
message.setContent(m_messageText.toString());
|
||||
Clients.showBusy("Processing...", true);
|
||||
Clients.response(new AuEcho(this, "onPrintInvoices", null));
|
||||
} // printInvoices
|
||||
|
||||
public void onPrintInvoices()
|
||||
{
|
||||
// Loop through all items
|
||||
List<File> pdfList = new ArrayList<File>();
|
||||
for (int i = 0; i < m_ids.length; i++)
|
||||
{
|
||||
int C_Invoice_ID = m_ids[i];
|
||||
ReportEngine re = ReportEngine.get (Env.getCtx(), ReportEngine.INVOICE, C_Invoice_ID);
|
||||
pdfList.add(re.getPDF());
|
||||
}
|
||||
|
||||
if (pdfList.size() > 1) {
|
||||
try {
|
||||
File outFile = File.createTempFile("PrintInvoices", ".pdf");
|
||||
Document document = null;
|
||||
PdfWriter copy = null;
|
||||
for (File f : pdfList)
|
||||
{
|
||||
PdfReader reader = new PdfReader(f.getAbsolutePath());
|
||||
if (document == null)
|
||||
{
|
||||
document = new Document(reader.getPageSizeWithRotation(1));
|
||||
copy = PdfWriter.getInstance(document, new FileOutputStream(outFile));
|
||||
document.open();
|
||||
}
|
||||
PdfContentByte cb = copy.getDirectContent(); // Holds the PDF
|
||||
int pages = reader.getNumberOfPages();
|
||||
for (int i = 1; i <= pages; i++) {
|
||||
document.newPage();
|
||||
PdfImportedPage page = copy.getImportedPage(reader, i);
|
||||
cb.addTemplate(page, 0, 0);
|
||||
}
|
||||
}
|
||||
document.close();
|
||||
|
||||
Clients.showBusy(null, false);
|
||||
Window win = new SimplePDFViewer(this.getTitle(), new FileInputStream(outFile));
|
||||
SessionManager.getAppDesktop().showWindow(win, "center");
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
||||
}
|
||||
} else if (pdfList.size() > 0) {
|
||||
try {
|
||||
Window win = new SimplePDFViewer(this.getTitle(), new FileInputStream(pdfList.get(0)));
|
||||
SessionManager.getAppDesktop().showWindow(win, "center");
|
||||
} catch (Exception e)
|
||||
{
|
||||
log.log(Level.SEVERE, e.getLocalizedMessage(), e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isValid() {
|
||||
return valid;
|
||||
|
|
|
@ -34,7 +34,6 @@ import org.adempiere.webui.component.Row;
|
|||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.WListbox;
|
||||
import org.adempiere.webui.component.WStatusBar;
|
||||
import org.adempiere.webui.editor.WDateEditor;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.editor.WTableDirEditor;
|
||||
|
@ -43,6 +42,7 @@ import org.adempiere.webui.event.ValueChangeListener;
|
|||
import org.adempiere.webui.event.WTableModelEvent;
|
||||
import org.adempiere.webui.event.WTableModelListener;
|
||||
import org.adempiere.webui.panel.ADForm;
|
||||
import org.adempiere.webui.panel.StatusBarPanel;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.process.*;
|
||||
|
@ -85,7 +85,6 @@ public class WAllocation extends ADForm
|
|||
calculate();
|
||||
southPanel.appendChild(new Separator());
|
||||
southPanel.appendChild(statusBar);
|
||||
statusBar.setWidth("100%");
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
@ -140,7 +139,7 @@ public class WAllocation extends ADForm
|
|||
private WTableDirEditor currencyPick = null;
|
||||
private Checkbox multiCurrency = new Checkbox();
|
||||
private Label allocCurrencyLabel = new Label();
|
||||
private WStatusBar statusBar = new WStatusBar();
|
||||
private StatusBarPanel statusBar = new StatusBarPanel();
|
||||
private Label dateLabel = new Label();
|
||||
private WDateEditor dateField = new WDateEditor();
|
||||
private Checkbox autoWriteOff = new Checkbox();
|
||||
|
|
|
@ -36,7 +36,6 @@ import org.adempiere.webui.component.Row;
|
|||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.WAppsAction;
|
||||
import org.adempiere.webui.component.WListbox;
|
||||
import org.adempiere.webui.component.WStatusBar;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.editor.WEditor;
|
||||
import org.adempiere.webui.editor.WLocatorEditor;
|
||||
|
@ -44,6 +43,7 @@ import org.adempiere.webui.editor.WSearchEditor;
|
|||
import org.adempiere.webui.editor.WStringEditor;
|
||||
import org.adempiere.webui.event.WTableModelEvent;
|
||||
import org.adempiere.webui.event.WTableModelListener;
|
||||
import org.adempiere.webui.panel.StatusBarPanel;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.*;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
|
@ -177,7 +177,7 @@ public abstract class WCreateFrom extends Window
|
|||
private Panel southPanel = new Panel();
|
||||
// private Borderlayout southLayout = new Borderlayout();
|
||||
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
||||
private WStatusBar statusBar = new WStatusBar();
|
||||
private StatusBarPanel statusBar = new StatusBarPanel();
|
||||
protected WListbox dataTable = ListboxFactory.newDataTable();
|
||||
protected Label locatorLabel = new Label();
|
||||
protected WLocatorEditor locatorField = new WLocatorEditor();
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -14,10 +14,10 @@ import org.adempiere.webui.component.Listbox;
|
|||
import org.adempiere.webui.component.Row;
|
||||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.WStatusBar;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.panel.ADForm;
|
||||
import org.adempiere.webui.panel.StatusBarPanel;
|
||||
import org.adempiere.webui.window.FDialog;
|
||||
import org.compiere.model.MColumn;
|
||||
import org.compiere.model.MLookup;
|
||||
|
@ -89,7 +89,7 @@ public class WWFActivity extends ADForm implements EventListener
|
|||
private WSearchEditor fForward = null; // dynInit
|
||||
private Label lForward = new Label(Msg.getMsg(Env.getCtx(), "Forward"));
|
||||
private Label lOptional = new Label("(" + Msg.translate(Env.getCtx(), "Optional") + ")");
|
||||
private WStatusBar statusBar = new WStatusBar();
|
||||
private StatusBarPanel statusBar = new StatusBarPanel();
|
||||
|
||||
public WWFActivity()
|
||||
{
|
||||
|
@ -226,7 +226,6 @@ public class WWFActivity extends ADForm implements EventListener
|
|||
|
||||
South south = new South();
|
||||
south.appendChild(statusBar);
|
||||
statusBar.setWidth("100%");
|
||||
layout.appendChild(south);
|
||||
south.setStyle("background-color: transparent");
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ import java.util.List;
|
|||
import org.adempiere.webui.component.ADTabListModel.ADTabLabel;
|
||||
import org.zkoss.zhtml.Button;
|
||||
import org.zkoss.zhtml.Text;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
|
@ -38,10 +39,15 @@ public class ADButtonTabList extends Panel implements IADTabList, EventListener
|
|||
this.setStyle("margin:0;padding:0");
|
||||
}
|
||||
|
||||
public void refresh() {
|
||||
this.getChildren().clear();
|
||||
int i = 0;
|
||||
for (ADTabLabel tabLabel : listItems) {
|
||||
public synchronized void refresh() {
|
||||
List childs = getChildren();
|
||||
int childCount = childs.size();
|
||||
for (int c = childCount - 1; c >=0; c--) {
|
||||
removeChild((Component) childs.get(c));
|
||||
}
|
||||
Object[] items = listItems.toArray();
|
||||
for (int i = 0; i < items.length; i++) {
|
||||
ADTabLabel tabLabel = (ADTabLabel) items[i];
|
||||
Button button = new Button();
|
||||
Text text = new Text(tabLabel.label);
|
||||
button.appendChild(text);
|
||||
|
@ -67,7 +73,6 @@ public class ADButtonTabList extends Panel implements IADTabList, EventListener
|
|||
|
||||
button.setParent(this);
|
||||
button.addEventListener(Events.ON_CLICK, this);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -79,7 +84,7 @@ public class ADButtonTabList extends Panel implements IADTabList, EventListener
|
|||
this.selectedIndex = index;
|
||||
}
|
||||
|
||||
public void setItems(List<ADTabLabel> listItems) {
|
||||
public synchronized void setItems(List<ADTabLabel> listItems) {
|
||||
this.listItems = listItems;
|
||||
refresh();
|
||||
}
|
||||
|
|
|
@ -441,7 +441,6 @@ public class CWindowToolbar extends FToolbar implements EventListener
|
|||
public void enableChanges(boolean enabled)
|
||||
{
|
||||
this.btnNew.setDisabled(!enabled);
|
||||
this.btnIgnore.setDisabled(!enabled);
|
||||
}
|
||||
|
||||
public void enableIgnore(boolean enabled)
|
||||
|
|
|
@ -13,15 +13,15 @@
|
|||
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Hbox;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class Combinationbox extends Hbox
|
||||
public class Combinationbox extends Panel
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -49,11 +49,14 @@ public class Combinationbox extends Hbox
|
|||
private void initComponents()
|
||||
{
|
||||
textbox = new Textbox();
|
||||
textbox.setWidth("100%");
|
||||
button = new Button();
|
||||
button.setHeight("98%");
|
||||
button.setHeight("22px");
|
||||
button.setWidth("26px");
|
||||
appendChild(textbox);
|
||||
appendChild(button);
|
||||
|
||||
String style = AEnv.isFirefox2() ? "display: inline" : "display: inline-block";
|
||||
this.setStyle(style);
|
||||
}
|
||||
|
||||
public void setText(String value)
|
||||
|
|
|
@ -23,6 +23,8 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
import org.zkoss.zul.Hbox;
|
||||
|
@ -68,6 +70,8 @@ public final class ConfirmPanel extends Hbox
|
|||
/** Action String New. */
|
||||
public static final String A_NEW = "New";
|
||||
|
||||
private boolean m_withText = false;
|
||||
|
||||
private Map<String, Button> buttonMap = new HashMap<String, Button>();
|
||||
|
||||
/**
|
||||
|
@ -98,15 +102,50 @@ public final class ConfirmPanel extends Hbox
|
|||
Button button = new Button();
|
||||
button.setName("btn"+name);
|
||||
button.setId(name);
|
||||
button.setSrc("images/"+name+"24.png");
|
||||
String text = Msg.translate(Env.getCtx(), name);
|
||||
if (!name.equals(text))
|
||||
text = text.replaceAll("[&]", "");
|
||||
else
|
||||
text = null;
|
||||
|
||||
LayoutUtils.addSclass("action-button", button);
|
||||
if (m_withText && text != null)
|
||||
{
|
||||
button.setSrc("images/"+name+"16.png");
|
||||
button.setLabel(text);
|
||||
LayoutUtils.addSclass("action-text-button", button);
|
||||
}
|
||||
else
|
||||
{
|
||||
button.setSrc("images/"+name+"24.png");
|
||||
if (text != null)
|
||||
button.setTooltiptext(text);
|
||||
LayoutUtils.addSclass("action-button", button);
|
||||
}
|
||||
|
||||
buttonMap.put(name, button);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
||||
/**
|
||||
* create confirm panel with multiple options
|
||||
* @param withCancelButton with cancel
|
||||
* @param withRefreshButton with refresh
|
||||
* @param withResetButton with reset
|
||||
* @param withCustomizeButton with customize
|
||||
* @param withHistoryButton with history
|
||||
* @param withZoomButton with zoom
|
||||
*/
|
||||
public ConfirmPanel(boolean withCancelButton,
|
||||
boolean withRefreshButton,
|
||||
boolean withResetButton,
|
||||
boolean withCustomizeButton,
|
||||
boolean withHistoryButton,
|
||||
boolean withZoomButton)
|
||||
{
|
||||
this(withCancelButton, withRefreshButton, withResetButton, withCustomizeButton, withHistoryButton, withZoomButton, false);
|
||||
}
|
||||
|
||||
/**
|
||||
* create confirm panel with multiple options
|
||||
* @param withCancelButton with cancel
|
||||
|
@ -121,8 +160,11 @@ public final class ConfirmPanel extends Hbox
|
|||
boolean withResetButton,
|
||||
boolean withCustomizeButton,
|
||||
boolean withHistoryButton,
|
||||
boolean withZoomButton)
|
||||
boolean withZoomButton,
|
||||
boolean withText)
|
||||
{
|
||||
m_withText = withText;
|
||||
|
||||
init();
|
||||
|
||||
setVisible(A_CANCEL, withCancelButton);
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.adempiere.webui.component;
|
|||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
|
||||
/**
|
||||
|
@ -62,6 +63,12 @@ public class EditorBox extends Panel
|
|||
|
||||
this.appendChild(txt);
|
||||
this.appendChild(btn);
|
||||
|
||||
btn.setHeight("22px");
|
||||
btn.setWidth("26px");
|
||||
|
||||
String style = AEnv.isFirefox2() ? "display: inline" : "display: inline-block";
|
||||
this.setStyle(style);
|
||||
}
|
||||
|
||||
public Textbox getTextBox()
|
||||
|
|
|
@ -60,7 +60,8 @@ public class Label extends org.zkoss.zul.Label
|
|||
@Override
|
||||
public void setValue(String value) {
|
||||
super.setValue(value != null ? value.replaceAll("[&]", "") : null);
|
||||
setupMandatoryDecorator();
|
||||
if ((value == null || value.trim().length() == 0) && decorator != null)
|
||||
decorator.setVisible(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -75,15 +76,20 @@ public class Label extends org.zkoss.zul.Label
|
|||
}
|
||||
|
||||
private void setupMandatoryDecorator() {
|
||||
if (decorator == null)
|
||||
createMandatoryDecorator();
|
||||
String value = getValue();
|
||||
if (value != null && (value.trim().length() > 0) && mandatory) {
|
||||
if (decorator == null)
|
||||
decorator = new Label("*");
|
||||
((Label)decorator).setStyle("text-decoration: none; font-size: xx-small; vertical-align: top;");
|
||||
} else if (decorator != null)
|
||||
if (mandatory && value != null && value.trim().length() > 0) {
|
||||
decorator.setVisible(true);
|
||||
} else
|
||||
decorator.setVisible(false);
|
||||
}
|
||||
|
||||
private void createMandatoryDecorator() {
|
||||
decorator = new Label("*");
|
||||
((Label)decorator).setStyle("text-decoration: none; font-size: xx-small; vertical-align: top;");
|
||||
}
|
||||
|
||||
/**
|
||||
* alias for setValue, added to ease porting of swing form
|
||||
* @param translate
|
||||
|
|
|
@ -257,13 +257,16 @@ public class ListModelTable extends ListModelList implements ListModelExt
|
|||
if (vector)
|
||||
{
|
||||
newRow = new Vector<Object>(getNoColumns());
|
||||
((Vector)newRow).ensureCapacity(getNoColumns());
|
||||
((Vector)newRow).setSize(getNoColumns());
|
||||
add(newRow);
|
||||
}
|
||||
else
|
||||
{
|
||||
newRow = new ArrayList<Object>(getNoColumns());
|
||||
((ArrayList)newRow).ensureCapacity(getNoColumns());
|
||||
for(int i = 0; i < getNoColumns(); i++)
|
||||
{
|
||||
newRow.add(null);
|
||||
}
|
||||
add(newRow);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -219,7 +219,10 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener
|
|||
* remove all items, to ease porting of swing form
|
||||
*/
|
||||
public void removeAllItems() {
|
||||
getItems().clear();
|
||||
int cnt = getItemCount();
|
||||
for (int i = cnt - 1; i >=0; i--) {
|
||||
removeItemAt(i);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,6 +20,7 @@ package org.adempiere.webui.component;
|
|||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
|
||||
/** Location Editor component
|
||||
|
@ -53,8 +54,13 @@ public class Locationbox extends Panel
|
|||
{
|
||||
txt = new Textbox();
|
||||
btn = new Button();
|
||||
btn.setHeight("22px");
|
||||
btn.setWidth("26px");
|
||||
this.appendChild(txt);
|
||||
this.appendChild(btn);
|
||||
|
||||
String style = AEnv.isFirefox2() ? "display: inline" : "display: inline-block";
|
||||
this.setStyle(style);
|
||||
}
|
||||
|
||||
public Textbox getTextBox()
|
||||
|
|
|
@ -101,32 +101,39 @@ public class Messagebox extends Window implements EventListener
|
|||
lblMsg.setValue(msg);
|
||||
|
||||
btnOk.setLabel("OK");
|
||||
btnOk.setImage("/images/Ok24.png");
|
||||
btnOk.setImage("/images/Ok16.png");
|
||||
btnOk.addEventListener(Events.ON_CLICK, this);
|
||||
btnOk.setSclass("action-text-button");
|
||||
|
||||
btnCancel.setLabel("Cancel");
|
||||
btnCancel.setImage("/images/Cancel24.png");
|
||||
btnCancel.setImage("/images/Cancel16.png");
|
||||
btnCancel.addEventListener(Events.ON_CLICK, this);
|
||||
btnCancel.setSclass("action-text-button");
|
||||
|
||||
btnYes.setLabel("Yes");
|
||||
btnYes.setImage("/images/Ok24.png");
|
||||
btnYes.setImage("/images/Ok16.png");
|
||||
btnYes.addEventListener(Events.ON_CLICK, this);
|
||||
btnYes.setSclass("action-text-button");
|
||||
|
||||
btnNo.setLabel("No");
|
||||
btnNo.setImage("/images/Cancel24.png");
|
||||
btnNo.setImage("/images/Cancel16.png");
|
||||
btnNo.addEventListener(Events.ON_CLICK, this);
|
||||
btnNo.setSclass("action-text-button");
|
||||
|
||||
btnAbort.setLabel("Abort");
|
||||
//btnAbort.setImage("/images/");
|
||||
btnAbort.addEventListener(Events.ON_CLICK, this);
|
||||
btnAbort.setSclass("action-text-button");
|
||||
|
||||
btnRetry.setLabel("Retry");
|
||||
//btnRetry.setImage("/images/");
|
||||
btnRetry.addEventListener(Events.ON_CLICK, this);
|
||||
btnRetry.setSclass("action-text-button");
|
||||
|
||||
btnIgnore.setLabel("Ignore");
|
||||
btnIgnore.setImage("/images/Ignore24.png");
|
||||
btnIgnore.setImage("/images/Ignore16.png");
|
||||
btnIgnore.addEventListener(Events.ON_CLICK, this);
|
||||
btnIgnore.setSclass("action-text-button");
|
||||
|
||||
Panel pnlMessage = new Panel();
|
||||
pnlMessage.setWidth("100%");
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Hbox;
|
||||
|
||||
/**
|
||||
* Product Attribute Box
|
||||
* @author Low Heng Sin
|
||||
*/
|
||||
public class PAttributebox extends Hbox
|
||||
public class PAttributebox extends Panel
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -51,11 +51,14 @@ public class PAttributebox extends Hbox
|
|||
private void initComponents()
|
||||
{
|
||||
textBox = new Textbox();
|
||||
textBox.setWidth("100%");
|
||||
button = new Button();
|
||||
button.setHeight("98%");
|
||||
button.setHeight("22px");
|
||||
button.setWidth("26px");
|
||||
appendChild(textBox);
|
||||
appendChild(button);
|
||||
|
||||
String style = AEnv.isFirefox2() ? "display: inline" : "display: inline-block";
|
||||
this.setStyle(style);
|
||||
}
|
||||
|
||||
public void setText(String value)
|
||||
|
|
|
@ -20,9 +20,10 @@ package org.adempiere.webui.component;
|
|||
import java.beans.PropertyChangeListener;
|
||||
import java.beans.PropertyChangeSupport;
|
||||
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
|
||||
public class Searchbox extends Panel//Hbox
|
||||
public class Searchbox extends Panel
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
private PropertyChangeSupport m_propertyChangeListeners = new PropertyChangeSupport(this);
|
||||
|
@ -48,13 +49,14 @@ public class Searchbox extends Panel//Hbox
|
|||
private void initComponents()
|
||||
{
|
||||
txt = new Textbox();
|
||||
// txt.setWidth("100%");
|
||||
btn = new Button();
|
||||
btn.setHeight("98%");
|
||||
btn.setHeight("22px");
|
||||
btn.setWidth("26px");
|
||||
appendChild(txt);
|
||||
appendChild(btn);
|
||||
|
||||
this.setStyle("display: inline-block");
|
||||
String style = AEnv.isFirefox2() ? "display: inline" : "display: inline-block";
|
||||
this.setStyle(style);
|
||||
}
|
||||
|
||||
public Textbox getTextBox()
|
||||
|
|
|
@ -17,13 +17,14 @@
|
|||
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zul.Hbox;
|
||||
|
||||
/**
|
||||
* URL Box
|
||||
*/
|
||||
public class Urlbox extends Hbox
|
||||
public class Urlbox extends Panel
|
||||
{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
@ -51,11 +52,14 @@ public class Urlbox extends Hbox
|
|||
private void initComponents()
|
||||
{
|
||||
txtUrl = new Textbox();
|
||||
txtUrl.setWidth("100%");
|
||||
btnUrl = new Button();
|
||||
btnUrl.setHeight("98%");
|
||||
btnUrl.setHeight("22px");
|
||||
btnUrl.setWidth("26px");
|
||||
appendChild(txtUrl);
|
||||
appendChild(btnUrl);
|
||||
|
||||
String style = AEnv.isFirefox2() ? "display: inline" : "display: inline-block";
|
||||
this.setStyle(style);
|
||||
}
|
||||
|
||||
public void setText(String value)
|
||||
|
|
|
@ -400,10 +400,11 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
|
|||
*
|
||||
* @param headerValue The object to use for generating the header text.
|
||||
* @param headerIndex The column index of the header
|
||||
* @param classType
|
||||
* @return The generated ListHeader
|
||||
* @see #renderListHead(ListHead)
|
||||
*/
|
||||
private Component getListHeaderComponent(Object headerValue, int headerIndex)
|
||||
private Component getListHeaderComponent(Object headerValue, int headerIndex, Class classType)
|
||||
{
|
||||
ListHeader header = null;
|
||||
|
||||
|
@ -422,6 +423,22 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
|
|||
int width = headerText.trim().length() * 9;
|
||||
if (width > 300)
|
||||
width = 300;
|
||||
else if (classType != null)
|
||||
{
|
||||
if (classType.equals(String.class))
|
||||
{
|
||||
if (width > 0 && width < 180)
|
||||
width = 180;
|
||||
}
|
||||
else if (classType.equals(IDColumn.class))
|
||||
{
|
||||
header.setSort("none");
|
||||
if (width == 0)
|
||||
width = 30;
|
||||
}
|
||||
else if (width > 0 && width < 100)
|
||||
width = 100;
|
||||
}
|
||||
else if (width > 0 && width < 100)
|
||||
width = 100;
|
||||
|
||||
|
@ -483,7 +500,7 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
|
|||
for (int columnIndex = 0; columnIndex < m_tableColumns.size(); columnIndex++)
|
||||
{
|
||||
column = m_tableColumns.get(columnIndex);
|
||||
header = getListHeaderComponent(column.getHeaderValue(), columnIndex);
|
||||
header = getListHeaderComponent(column.getHeaderValue(), columnIndex, column.getColumnClass());
|
||||
head.appendChild(header);
|
||||
}
|
||||
head.setSizable(true);
|
||||
|
@ -693,6 +710,26 @@ public class WListItemRenderer implements ListitemRenderer, EventListener, Listi
|
|||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param index
|
||||
* @param header
|
||||
*/
|
||||
public void setColumnHeader(int index, String header)
|
||||
{
|
||||
if (index >= 0 && index < m_tableColumns.size())
|
||||
{
|
||||
m_tableColumns.get(index).setHeaderValue(Util.cleanAmp(header));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void setColumnClass(int index, Class classType) {
|
||||
if (index >= 0 && index < m_tableColumns.size())
|
||||
{
|
||||
m_tableColumns.get(index).setColumnClass(classType);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -443,9 +443,15 @@ public class WListbox extends Listbox implements TableValueChangeListener, WTabl
|
|||
WListItemRenderer renderer = (WListItemRenderer)getItemRenderer();
|
||||
|
||||
setColumnReadOnly(index, readOnly);
|
||||
|
||||
renderer.setColumnHeader(index, header);
|
||||
|
||||
renderer.setColumnClass(index, classType);
|
||||
|
||||
// TODO transfer this to Renderer
|
||||
m_modelHeaderClass.add(classType);
|
||||
if (index < m_modelHeaderClass.size())
|
||||
m_modelHeaderClass.set(index, classType);
|
||||
else
|
||||
m_modelHeaderClass.add(classType);
|
||||
|
||||
return;
|
||||
}
|
||||
|
@ -466,6 +472,10 @@ public class WListbox extends Listbox implements TableValueChangeListener, WTabl
|
|||
{
|
||||
setColumnReadOnly(index, readOnly);
|
||||
|
||||
WListItemRenderer renderer = (WListItemRenderer)getItemRenderer();
|
||||
|
||||
renderer.setColumnClass(index, classType);
|
||||
|
||||
m_modelHeaderClass.add(classType);
|
||||
|
||||
return;
|
||||
|
@ -488,6 +498,9 @@ public class WListbox extends Listbox implements TableValueChangeListener, WTabl
|
|||
setColumnReadOnly(m_modelHeaderClass.size() - 1, readOnly);
|
||||
|
||||
addColumn(header);
|
||||
|
||||
WListItemRenderer renderer = (WListItemRenderer)getItemRenderer();
|
||||
renderer.setColumnClass((renderer.getNoColumns() - 1), classType);
|
||||
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -1,240 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Posterita Ajax UI *
|
||||
* Copyright (C) 2007 Posterita Ltd. All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Posterita Ltd., 3, Draper Avenue, Quatre Bornes, Mauritius *
|
||||
* or via info@posterita.org or http://www.posterita.org/ *
|
||||
*****************************************************************************/
|
||||
|
||||
package org.adempiere.webui.component;
|
||||
|
||||
import java.awt.Color;
|
||||
|
||||
import org.adempiere.webui.component.Label;
|
||||
import org.compiere.model.DataStatusEvent;
|
||||
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
|
||||
/**
|
||||
* Web UI status bar. Based upon the rich client's
|
||||
* {@link org.compiere.apps.StatusBar}. The basic status bar contains one or
|
||||
* both of (a) a general status description and (b) a database status
|
||||
* description. In addition, components can be added to the status bar to extend
|
||||
* its functionaility
|
||||
*
|
||||
* @author Andrew Kimball
|
||||
*/
|
||||
public class WStatusBar extends Grid implements EventListener
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** label */
|
||||
private Label statusLine = new Label();
|
||||
|
||||
private Label statusDB = new Label();
|
||||
|
||||
private Row statusBar = new Row();
|
||||
|
||||
private String m_text;
|
||||
|
||||
private DataStatusEvent m_dse = null;
|
||||
|
||||
private boolean mt_error;
|
||||
|
||||
private String mt_text;
|
||||
|
||||
/**
|
||||
* Constructor for a Standard Status Bar.
|
||||
*/
|
||||
public WStatusBar()
|
||||
{
|
||||
super();
|
||||
|
||||
Rows rows = new Rows();
|
||||
try
|
||||
{
|
||||
initialise();
|
||||
// this.setBorder("normal");
|
||||
rows.appendChild(statusBar);
|
||||
this.appendChild(rows);
|
||||
this.setWidth("99%");
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
|
||||
}
|
||||
// this.setName("statusBar");
|
||||
} // StatusBar
|
||||
|
||||
/**
|
||||
* Static Initialisation.
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
private void initialise() throws Exception
|
||||
{
|
||||
statusLine.setValue("statusLine");
|
||||
statusBar.appendChild(statusLine);
|
||||
|
||||
statusDB.setValue("#");
|
||||
statusDB.setStyle("text-align:right; " + "color:"
|
||||
+ ZkCssHelper.createHexColorString(Color.blue));
|
||||
statusDB.addEventListener(Events.ON_CLICK, this);
|
||||
|
||||
statusBar.appendChild(statusDB);
|
||||
} // jbInit
|
||||
|
||||
/**
|
||||
* Get Status Line text.
|
||||
*
|
||||
* @return StatusLine text
|
||||
*/
|
||||
public final String getStatusLine()
|
||||
{
|
||||
return statusLine.getValue().trim();
|
||||
} // getStatusLine
|
||||
|
||||
/**
|
||||
* Set Status Line
|
||||
*
|
||||
* @param text
|
||||
* text
|
||||
* @param error
|
||||
* error
|
||||
*/
|
||||
public final void setStatusLine(final String text, final boolean error)
|
||||
{
|
||||
mt_error = error;
|
||||
mt_text = text;
|
||||
if (mt_error)
|
||||
{
|
||||
/* ZkCssHelper.appendStyle(statusLine, ZkCssHelper
|
||||
.createHexColorString(AdempierePLAF.getTextColor_Issue()));
|
||||
*/ }
|
||||
else
|
||||
{
|
||||
/* ZkCssHelper.appendStyle(statusLine, ZkCssHelper
|
||||
.createHexColorString(AdempierePLAF.getTextColor_OK()));
|
||||
*/ }
|
||||
statusLine.setValue(mt_text);
|
||||
//
|
||||
} // setStatusLine
|
||||
|
||||
/**
|
||||
* Set ToolTip of StatusLine
|
||||
*
|
||||
* @param tip
|
||||
* tooltip text
|
||||
*/
|
||||
public final void setStatusToolTip(final String tip)
|
||||
{
|
||||
statusLine.setTooltiptext(tip);
|
||||
} // setStatusToolTip
|
||||
|
||||
/**
|
||||
* Set Standard Status Line (non error)
|
||||
*
|
||||
* @param text
|
||||
* text to display on the status line
|
||||
*/
|
||||
public final void setStatusLine(final String text)
|
||||
{
|
||||
if (text == null)
|
||||
{
|
||||
setStatusLine("", false);
|
||||
}
|
||||
else
|
||||
{
|
||||
setStatusLine(text, false);
|
||||
}
|
||||
} // setStatusLine
|
||||
|
||||
/**
|
||||
* Set Status DB Info
|
||||
*
|
||||
* @param text
|
||||
* description of database status
|
||||
* @param dse
|
||||
* data status event
|
||||
*/
|
||||
public final void setStatusDB(final String text, final DataStatusEvent dse)
|
||||
{
|
||||
if (text == null || text.length() == 0)
|
||||
{
|
||||
statusDB.setValue("");
|
||||
statusDB.setVisible(false);
|
||||
statusDB.detach();
|
||||
}
|
||||
else
|
||||
{
|
||||
StringBuffer sb = new StringBuffer(" ");
|
||||
sb.append(text).append(" ");
|
||||
statusDB.setValue(sb.toString());
|
||||
if (!statusDB.isVisible())
|
||||
{
|
||||
statusDB.setVisible(true);
|
||||
}
|
||||
statusDB.setParent(statusBar);
|
||||
}
|
||||
|
||||
// Save
|
||||
m_text = text;
|
||||
m_dse = dse;
|
||||
} // setStatusDB
|
||||
|
||||
/**
|
||||
* Set Status DB Info
|
||||
*
|
||||
* @param text
|
||||
* description of database status
|
||||
*/
|
||||
public final void setStatusDB(final String text)
|
||||
{
|
||||
setStatusDB(text, null);
|
||||
} // setStatusDB
|
||||
|
||||
/**
|
||||
* Set Status DB Info
|
||||
*
|
||||
* @param no
|
||||
* Database status identifier
|
||||
*/
|
||||
public final void setStatusDB(final int no)
|
||||
{
|
||||
setStatusDB(String.valueOf(no), null);
|
||||
} // setStatusDB
|
||||
|
||||
/**
|
||||
* Add Component to East of StatusBar
|
||||
*
|
||||
* @param component
|
||||
* component
|
||||
*/
|
||||
public final void addStatusComponent(final Component component)
|
||||
{
|
||||
this.appendChild(component);
|
||||
} // addStatusComponent
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see org.zkoss.zk.ui.event.EventListener#onEvent(org.zkoss.zk.ui.event.Event)
|
||||
*/
|
||||
public void onEvent(final Event evt) throws Exception
|
||||
{
|
||||
// TODO Auto-generated method stub
|
||||
}
|
||||
|
||||
}
|
|
@ -40,6 +40,8 @@ public class WTableColumn
|
|||
|
||||
/** The header value of the column. */
|
||||
protected Object headerValue;
|
||||
|
||||
protected Class columnClass;
|
||||
|
||||
/**
|
||||
* Cover method, using a default width of 75
|
||||
|
@ -252,4 +254,22 @@ public class WTableColumn
|
|||
{
|
||||
return isResizable;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @return Class
|
||||
*/
|
||||
public Class getColumnClass()
|
||||
{
|
||||
return columnClass;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param columnClass
|
||||
*/
|
||||
public void setColumnClass(Class columnClass)
|
||||
{
|
||||
this.columnClass = columnClass;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -77,7 +77,23 @@ public class WDateEditor extends WEditor
|
|||
this("Date", "Date", false, false, true);
|
||||
} // VDate
|
||||
|
||||
public void onEvent(Event event)
|
||||
/**
|
||||
*
|
||||
* @param columnName
|
||||
* @param mandatory
|
||||
* @param readonly
|
||||
* @param updateable
|
||||
* @param displayType
|
||||
* @param label
|
||||
*/
|
||||
public WDateEditor(String columnName, boolean mandatory, boolean readonly, boolean updateable,
|
||||
int displayType, String label) {
|
||||
//TODO: support for displayType
|
||||
super(new Datebox(), columnName, label, null, mandatory, readonly, updateable);
|
||||
}
|
||||
|
||||
|
||||
public void onEvent(Event event)
|
||||
{
|
||||
Date date = getComponent().getValue();
|
||||
Timestamp newValue = null;
|
||||
|
@ -85,7 +101,7 @@ public class WDateEditor extends WEditor
|
|||
if (date != null)
|
||||
{
|
||||
newValue = new Timestamp(date.getTime());
|
||||
}
|
||||
}
|
||||
|
||||
ValueChangeEvent changeEvent = new ValueChangeEvent(this, this.getColumnName(), oldValue, newValue);
|
||||
super.fireValueChange(changeEvent);
|
||||
|
@ -126,6 +142,7 @@ public class WDateEditor extends WEditor
|
|||
if (value == null)
|
||||
{
|
||||
oldValue = null;
|
||||
getComponent().setValue(null);
|
||||
}
|
||||
else if (value instanceof Timestamp)
|
||||
{
|
||||
|
|
|
@ -411,4 +411,8 @@ public abstract class WEditor implements EventListener, PropertyChangeListener
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public void dynamicDisplay()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@ public class WLocatorEditor extends WEditor implements EventListener, PropertyCh
|
|||
|
||||
private String m_columnName;
|
||||
private MLocatorLookup m_mLocator;
|
||||
private MLocator m_value;
|
||||
private Object m_value;
|
||||
private int m_WindowNo;
|
||||
|
||||
private static CLogger log = CLogger.getCLogger(WLocatorEditor.class);
|
||||
|
@ -113,7 +113,7 @@ public class WLocatorEditor extends WEditor implements EventListener, PropertyCh
|
|||
value = null;
|
||||
}
|
||||
|
||||
m_value = m_mLocator.getMLocator(value, null);
|
||||
m_value = value;
|
||||
getComponent().setText(m_mLocator.getDisplay(value)); // loads value
|
||||
|
||||
// Data Binding
|
||||
|
@ -159,8 +159,9 @@ public class WLocatorEditor extends WEditor implements EventListener, PropertyCh
|
|||
|
||||
public int getM_Locator_ID()
|
||||
{
|
||||
if (m_value != null/* && m_value instanceof Integer*/)
|
||||
return m_value.getM_Locator_ID();
|
||||
if (m_value != null
|
||||
&& m_value instanceof Integer)
|
||||
return ((Integer)m_value).intValue();
|
||||
|
||||
return 0;
|
||||
} // getM_Locator_ID
|
||||
|
@ -193,9 +194,8 @@ public class WLocatorEditor extends WEditor implements EventListener, PropertyCh
|
|||
|
||||
int M_Locator_ID = 0;
|
||||
|
||||
//if (m_value instanceof Integer)
|
||||
if (m_value != null)
|
||||
M_Locator_ID = m_value.getM_Locator_ID();
|
||||
if (m_value instanceof Integer)
|
||||
M_Locator_ID = ((Integer)m_value).intValue();
|
||||
|
||||
m_mLocator.setOnly_Warehouse_ID(only_Warehouse_ID);
|
||||
m_mLocator.setOnly_Product_ID(getOnly_Product_ID());
|
||||
|
|
|
@ -827,16 +827,16 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value
|
|||
|
||||
public void valueChange(ValueChangeEvent evt)
|
||||
{
|
||||
if (getColumnName().equals(evt.getPropertyName()))
|
||||
{
|
||||
if (evt.getNewValue() != null)
|
||||
if ("zoom".equals(evt.getPropertyName()))
|
||||
{
|
||||
actionZoom(evt.getNewValue());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (evt.getNewValue() != null)
|
||||
{
|
||||
actionCombo(evt.getNewValue());
|
||||
}
|
||||
}
|
||||
else if ("zoom".equals(evt.getPropertyName()))
|
||||
{
|
||||
actionZoom(evt.getNewValue());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -211,7 +211,7 @@ ContextMenuListener, IZoomableEditor
|
|||
private void refreshList()
|
||||
{
|
||||
if (getComponent().getItemCount() > 0)
|
||||
getComponent().getItems().clear();
|
||||
getComponent().removeAllItems();
|
||||
|
||||
if (isReadWrite())
|
||||
{
|
||||
|
@ -327,4 +327,11 @@ ContextMenuListener, IZoomableEditor
|
|||
setValue(evt.getNewValue());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dynamicDisplay()
|
||||
{
|
||||
if (isReadWrite() && (!lookup.isValidated() || !lookup.isLoaded()))
|
||||
this.actionRefresh();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.Map.Entry;
|
|||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.webui.LayoutUtils;
|
||||
import org.adempiere.webui.apps.AEnv;
|
||||
import org.adempiere.webui.component.Bandbox;
|
||||
import org.adempiere.webui.component.Datebox;
|
||||
import org.adempiere.webui.component.Grid;
|
||||
|
@ -347,7 +348,8 @@ DataStatusListener, ValueChangeListener, IADTabpanel
|
|||
|
||||
if (editor instanceof WButtonEditor)
|
||||
{
|
||||
((WButtonEditor)editor).addActionListener(windowPanel);
|
||||
if (windowPanel != null)
|
||||
((WButtonEditor)editor).addActionListener(windowPanel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -356,8 +358,11 @@ DataStatusListener, ValueChangeListener, IADTabpanel
|
|||
|
||||
if (editor.getComponent() instanceof HtmlBasedComponent) {
|
||||
//can't stretch bandbox & datebox
|
||||
if (!(editor.getComponent() instanceof Bandbox) && !(editor.getComponent() instanceof Datebox))
|
||||
((HtmlBasedComponent)editor.getComponent()).setWidth("100%");
|
||||
if (!(editor.getComponent() instanceof Bandbox) &&
|
||||
!(editor.getComponent() instanceof Datebox)) {
|
||||
String width = AEnv.isFirefox2() ? "99%" : "100%";
|
||||
((HtmlBasedComponent)editor.getComponent()).setWidth(width);
|
||||
}
|
||||
}
|
||||
|
||||
WEditorPopupMenu popupMenu = editor.getPopupMenu();
|
||||
|
@ -460,14 +465,20 @@ DataStatusListener, ValueChangeListener, IADTabpanel
|
|||
}
|
||||
else
|
||||
{
|
||||
comp.dynamicDisplay();
|
||||
boolean rw = mField.isEditable(true); // r/w - check Context
|
||||
comp.setReadWrite(rw);
|
||||
if (comp.getLabel() != null)
|
||||
{
|
||||
comp.setMandatory(mField.isMandatory(true)); // check context
|
||||
}
|
||||
/*
|
||||
boolean manMissing = false;
|
||||
if (rw && mField.getValue() == null && mField.isMandatory(true)) // check context
|
||||
{
|
||||
manMissing = true;
|
||||
}
|
||||
comp.setBackground(manMissing || mField.isError());
|
||||
comp.setBackground(manMissing || mField.isError());*/
|
||||
}
|
||||
}
|
||||
else if (comp.isVisible())
|
||||
|
@ -724,6 +735,8 @@ DataStatusListener, ValueChangeListener, IADTabpanel
|
|||
|
||||
}
|
||||
//if (col >= 0)
|
||||
if (!uiCreated)
|
||||
createUI();
|
||||
dynamicDisplay(col);
|
||||
|
||||
//sync tree
|
||||
|
@ -835,7 +848,9 @@ DataStatusListener, ValueChangeListener, IADTabpanel
|
|||
//
|
||||
if (e.getNewValue() == null && e.getOldValue() != null
|
||||
&& e.getOldValue().toString().length() > 0) // some editors return "" instead of null
|
||||
mTable.setChanged (true);
|
||||
// this is the original code from GridController, don't know what it does there but it breaks ignore button for web ui
|
||||
// mTable.setChanged (true);
|
||||
mTable.setValueAt (e.getNewValue(), row, col);
|
||||
else
|
||||
{
|
||||
// mTable.setValueAt (e.getNewValue(), row, col, true);
|
||||
|
|
|
@ -31,7 +31,6 @@ import org.adempiere.webui.apps.AEnv;
|
|||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.ListModelTable;
|
||||
import org.adempiere.webui.component.WListbox;
|
||||
import org.adempiere.webui.component.WStatusBar;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.event.ValueChangeEvent;
|
||||
import org.adempiere.webui.event.ValueChangeListener;
|
||||
|
@ -266,7 +265,7 @@ public abstract class InfoPanel extends Window implements EventListener, WTableM
|
|||
protected boolean p_multipleSelection;
|
||||
/** Initial WHERE Clause */
|
||||
protected String p_whereClause = "";
|
||||
protected WStatusBar statusBar = new WStatusBar();
|
||||
protected StatusBarPanel statusBar = new StatusBarPanel();
|
||||
/** */
|
||||
private Vector<Object> line;
|
||||
private boolean m_ok = false;
|
||||
|
|
|
@ -25,6 +25,7 @@ import org.compiere.model.DataStatusEvent;
|
|||
import org.compiere.model.MRole;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.event.Event;
|
||||
import org.zkoss.zk.ui.event.EventListener;
|
||||
import org.zkoss.zk.ui.event.Events;
|
||||
|
@ -51,6 +52,10 @@ public class StatusBarPanel extends Panel implements EventListener
|
|||
private DataStatusEvent m_dse;
|
||||
|
||||
private String m_text;
|
||||
|
||||
private Div east;
|
||||
|
||||
private Div west;
|
||||
|
||||
public StatusBarPanel()
|
||||
{
|
||||
|
@ -61,40 +66,41 @@ public class StatusBarPanel extends Panel implements EventListener
|
|||
private void init()
|
||||
{
|
||||
statusLine = new Label();
|
||||
statusDB = new Label();
|
||||
statusDB = new Label(" ");
|
||||
infoLine = new Label();
|
||||
|
||||
Hbox hbox = new Hbox();
|
||||
hbox.setWidth("100%");
|
||||
hbox.setHeight("100%");
|
||||
hbox.setWidths("50%, 50%");
|
||||
Div div = new Div();
|
||||
div.setStyle("text-align: left; ");
|
||||
div.appendChild(statusLine);
|
||||
div.setWidth("100%");
|
||||
west = new Div();
|
||||
west.setStyle("text-align: left; ");
|
||||
west.appendChild(statusLine);
|
||||
west.setWidth("100%");
|
||||
Vbox vbox = new Vbox();
|
||||
vbox.setPack("center");
|
||||
LayoutUtils.addSclass("status", vbox);
|
||||
vbox.appendChild(div);
|
||||
vbox.appendChild(west);
|
||||
hbox.appendChild(vbox);
|
||||
|
||||
div = new Div();
|
||||
div.setWidth("100%");
|
||||
div.setStyle("text-align: right; ");
|
||||
div.appendChild(infoLine);
|
||||
div.appendChild(statusDB);
|
||||
east = new Div();
|
||||
east.setWidth("100%");
|
||||
east.setStyle("text-align: right; ");
|
||||
east.appendChild(infoLine);
|
||||
east.appendChild(statusDB);
|
||||
|
||||
LayoutUtils.addSclass("status-db", statusDB);
|
||||
LayoutUtils.addSclass("status-info", infoLine);
|
||||
vbox = new Vbox();
|
||||
vbox.setPack("center");
|
||||
LayoutUtils.addSclass("status", vbox);
|
||||
vbox.appendChild(div);
|
||||
vbox.appendChild(east);
|
||||
hbox.appendChild(vbox);
|
||||
|
||||
this.appendChild(hbox);
|
||||
|
||||
statusDB.addEventListener(Events.ON_CLICK, this);
|
||||
infoLine.setVisible(false);
|
||||
}
|
||||
|
||||
public void setStatusDB (String text)
|
||||
|
@ -130,13 +136,28 @@ public class StatusBarPanel extends Panel implements EventListener
|
|||
statusLine.setTooltiptext(text);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add Component to East of StatusBar
|
||||
*
|
||||
* @param component
|
||||
* component
|
||||
*/
|
||||
public final void addStatusComponent(final Component component)
|
||||
{
|
||||
east.appendChild(component);
|
||||
} // addStatusComponent
|
||||
|
||||
/**
|
||||
* Set Info Line
|
||||
* @param text text
|
||||
*/
|
||||
public void setInfo (String text)
|
||||
{
|
||||
infoLine.setValue(text);
|
||||
infoLine.setValue(text != null ? text : "");
|
||||
if (text == null || text.trim().length() == 0)
|
||||
infoLine.setVisible(false);
|
||||
else
|
||||
infoLine.setVisible(true);
|
||||
} // setInfo
|
||||
|
||||
public void onEvent(Event event) throws Exception {
|
||||
|
@ -147,7 +168,7 @@ public class StatusBarPanel extends Panel implements EventListener
|
|||
return;
|
||||
|
||||
String title = Msg.getMsg(Env.getCtx(), "Who") + m_text;
|
||||
WRecordInfo info = new WRecordInfo (title, m_dse);
|
||||
new WRecordInfo (title, m_dse);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ public class FDialog
|
|||
|
||||
if (title == null)
|
||||
{
|
||||
newTitle = Env.getHeader(ctx, windowNo);
|
||||
newTitle = windowNo > 0 ? Env.getHeader(ctx, windowNo) : null;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -141,7 +141,8 @@ public class FDialog
|
|||
|
||||
try
|
||||
{
|
||||
Messagebox.showDialog(out.toString(), newTitle, Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
String s = out.toString().replace("\n", "<br>");
|
||||
Messagebox.showDialog(s, newTitle, Messagebox.OK, Messagebox.EXCLAMATION);
|
||||
}
|
||||
catch (InterruptedException exception)
|
||||
{
|
||||
|
@ -239,7 +240,8 @@ public class FDialog
|
|||
|
||||
try
|
||||
{
|
||||
Messagebox.showDialog(out.toString(), Env.getHeader(ctx, windowNo), Messagebox.OK, Messagebox.ERROR);
|
||||
String s = out.toString().replace("\n", "<br>");
|
||||
Messagebox.showDialog(s, (windowNo > 0 ? Env.getHeader(ctx, windowNo) : null), Messagebox.OK, Messagebox.ERROR);
|
||||
}
|
||||
catch (InterruptedException exception)
|
||||
{
|
||||
|
@ -267,7 +269,8 @@ public class FDialog
|
|||
out.append(Msg.getMsg(Env.getCtx(), adMessage));
|
||||
if (msg != null && msg.length() > 0)
|
||||
out.append("\n").append(msg);
|
||||
return ask(windowNo, comp, out.toString());
|
||||
String s = out.toString().replace("\n", "<br>");
|
||||
return ask(windowNo, comp, s);
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
|
@ -284,7 +287,8 @@ public class FDialog
|
|||
{
|
||||
try
|
||||
{
|
||||
int response = Messagebox.showDialog(Msg.getMsg(Env.getCtx(), adMessage), "Confirmation", Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
String s = Msg.getMsg(Env.getCtx(), adMessage).replace("\n", "<br>");
|
||||
int response = Messagebox.showDialog(s, "Confirmation", Messagebox.YES | Messagebox.NO, Messagebox.QUESTION);
|
||||
|
||||
return (response == Messagebox.YES);
|
||||
}
|
||||
|
@ -343,7 +347,8 @@ public class FDialog
|
|||
|
||||
try
|
||||
{
|
||||
Messagebox.showDialog(out.toString(), Env.getHeader(ctx, windowNo), Messagebox.OK, Messagebox.INFORMATION);
|
||||
String s = out.toString().replace("\n", "<br>");
|
||||
Messagebox.showDialog(s, Env.getHeader(ctx, windowNo), Messagebox.OK, Messagebox.INFORMATION);
|
||||
}
|
||||
catch (InterruptedException exception)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
/******************************************************************************
|
||||
* Copyright (C) 2008 Low Heng Sin *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
*****************************************************************************/
|
||||
package org.adempiere.webui.window;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.session.SessionManager;
|
||||
import org.zkoss.util.media.AMedia;
|
||||
import org.zkoss.zul.Iframe;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Low Heng Sin
|
||||
*
|
||||
*/
|
||||
public class SimplePDFViewer extends Window {
|
||||
|
||||
public SimplePDFViewer(String title, InputStream pdfInput) {
|
||||
Iframe iframe = new Iframe();
|
||||
iframe.setId("reportFrame");
|
||||
int height = Double.valueOf(SessionManager.getAppDesktop().getClientInfo().desktopHeight * 0.85).intValue();
|
||||
this.setHeight(height + "px");
|
||||
|
||||
height = height - 30;
|
||||
iframe.setHeight(height + "px");
|
||||
iframe.setWidth("100%");
|
||||
AMedia media = new AMedia(getTitle(), "pdf", "application/pdf", pdfInput);
|
||||
iframe.setContent(media);
|
||||
|
||||
this.setBorder("normal");
|
||||
this.appendChild(iframe);
|
||||
this.setClosable(true);
|
||||
this.setTitle(title);
|
||||
|
||||
int width = Double.valueOf(SessionManager.getAppDesktop().getClientInfo().desktopWidth * 0.80).intValue();
|
||||
this.setWidth(width + "px");
|
||||
}
|
||||
}
|
|
@ -70,8 +70,8 @@ public final class WAccountDialog extends Window
|
|||
{
|
||||
super ();
|
||||
this.setTitle(title);
|
||||
this.setHeight("450px");
|
||||
this.setWidth("650px");
|
||||
this.setHeight("500px");
|
||||
this.setWidth("700px");
|
||||
|
||||
log.config("C_AcctSchema_ID=" + C_AcctSchema_ID
|
||||
+ ", C_ValidCombination_ID=" + mAccount.C_ValidCombination_ID);
|
||||
|
@ -185,7 +185,7 @@ public final class WAccountDialog extends Window
|
|||
//
|
||||
|
||||
northPanel.appendChild(parameterPanel);
|
||||
parameterPanel.setWidth("80%");
|
||||
parameterPanel.setWidth("95%");
|
||||
northPanel.appendChild(toolBar);
|
||||
northPanel.setWidth("100%");
|
||||
|
||||
|
@ -193,15 +193,25 @@ public final class WAccountDialog extends Window
|
|||
|
||||
Borderlayout layout = new Borderlayout();
|
||||
layout.setParent(this);
|
||||
layout.setHeight("100%");
|
||||
layout.setWidth("100%");
|
||||
layout.setStyle("background-color: transparent;");
|
||||
if (AEnv.isFirefox2())
|
||||
{
|
||||
layout.setHeight("93%");
|
||||
layout.setWidth("98%");
|
||||
layout.setStyle("background-color: transparent; position: absolute;");
|
||||
this.setStyle("position: relative;");
|
||||
}
|
||||
else
|
||||
{
|
||||
layout.setHeight("100%");
|
||||
layout.setWidth("100%");
|
||||
layout.setStyle("background-color: transparent;");
|
||||
}
|
||||
|
||||
North nRegion = new North();
|
||||
nRegion.setParent(layout);
|
||||
nRegion.setFlex(true);
|
||||
nRegion.setFlex(false);
|
||||
nRegion.appendChild(northPanel);
|
||||
nRegion.setStyle("background-color: transparent;");
|
||||
nRegion.setStyle("background-color: transparent; border: none");
|
||||
northPanel.setStyle("background-color: transparent;");
|
||||
|
||||
Center cRegion = new Center();
|
||||
|
@ -216,7 +226,7 @@ public final class WAccountDialog extends Window
|
|||
confirmPanel.setStyle("margin-top: 5px; margin-bottom: 5px");
|
||||
div.appendChild(statusBar);
|
||||
sRegion.appendChild(div);
|
||||
sRegion.setStyle("background-color: transparent;");
|
||||
sRegion.setStyle("background-color: transparent; border: none");
|
||||
|
||||
confirmPanel.addActionListener(Events.ON_CLICK, this);
|
||||
|
||||
|
|
|
@ -29,11 +29,11 @@ import org.adempiere.webui.component.Row;
|
|||
import org.adempiere.webui.component.Rows;
|
||||
import org.adempiere.webui.component.Textbox;
|
||||
import org.adempiere.webui.component.ConfirmPanel;
|
||||
import org.adempiere.webui.component.WStatusBar;
|
||||
import org.adempiere.webui.component.Window;
|
||||
import org.adempiere.webui.editor.WSearchEditor;
|
||||
import org.adempiere.webui.event.ValueChangeEvent;
|
||||
import org.adempiere.webui.event.ValueChangeListener;
|
||||
import org.adempiere.webui.panel.StatusBarPanel;
|
||||
import org.compiere.model.Lookup;
|
||||
import org.compiere.model.MClient;
|
||||
import org.compiere.model.MLookupFactory;
|
||||
|
@ -167,7 +167,7 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi
|
|||
private Textbox fAttachment = new Textbox();//40);
|
||||
private Textbox fMessage = new Textbox();
|
||||
private ConfirmPanel confirmPanel = new ConfirmPanel(true);
|
||||
private WStatusBar statusBar = new WStatusBar();
|
||||
private StatusBarPanel statusBar = new StatusBarPanel();
|
||||
|
||||
/**
|
||||
* Static Init
|
||||
|
@ -284,7 +284,6 @@ public class WEMailDialog extends Window implements EventListener, ValueChangeLi
|
|||
|
||||
South south = new South();
|
||||
south.appendChild(statusBar);
|
||||
statusBar.setWidth("100%");
|
||||
layout.appendChild(south);
|
||||
south.setStyle("background-color: white");
|
||||
|
||||
|
|
|
@ -309,7 +309,7 @@ public class WPAttributeDialog extends Window implements EventListener
|
|||
row = new Row();
|
||||
row.setParent(rows);
|
||||
m_row++;
|
||||
rows.appendChild(label);
|
||||
row.appendChild(label);
|
||||
row.appendChild(fieldLot);
|
||||
if (m_masi.getM_Lot_ID() != 0)
|
||||
{
|
||||
|
|
|
@ -142,7 +142,7 @@ public class WPAttributeInstance extends Window implements EventListener
|
|||
South south = new South();
|
||||
south.setParent(mainLayout);
|
||||
south.appendChild(confirmPanel);
|
||||
confirmPanel.addEventListener(Events.ON_CLICK, this);
|
||||
confirmPanel.addActionListener(this);
|
||||
} // jbInit
|
||||
|
||||
/** Table Column Layout Info */
|
||||
|
|
|
@ -46,6 +46,11 @@ html,body {
|
|||
width: 48px;
|
||||
}
|
||||
|
||||
.action-text-button {
|
||||
height: 32px;
|
||||
width: 80px;
|
||||
}
|
||||
|
||||
div.wc-modal, div.wc-modal-none, div.wc-highlighted, div.wc-highlighted-none {
|
||||
background-color: white;
|
||||
}
|
||||
|
@ -253,4 +258,9 @@ tr.tab-desktop-tb-m {
|
|||
|
||||
.status-info {
|
||||
padding-right: 10px;
|
||||
border-left: solid 1px #9CBDFF;
|
||||
}
|
||||
|
||||
.status-border {
|
||||
border: solid 1px #9CBDFF;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue