Refs #6142 / IDEMPIERE-3535 - missing font icons

This commit is contained in:
Murilo Habermann Torquato 2019-11-29 23:16:18 -03:00
parent 629f4e2a8a
commit 23dee999a6
12 changed files with 114 additions and 6 deletions

View File

@ -477,16 +477,25 @@ public class WAcctViewer extends Window implements EventListener<Event>
forcePost.setVisible(false);
// Elaine 2009/07/29
if (ThemeManager.isUseFontIconForImage())
bZoom.setIconSclass("z-icon-Zoom");
else
bZoom.setImage(ThemeManager.getThemeResource("images/Zoom16.png"));
bZoom.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Zoom")));
bZoom.setVisible(tabbedPane.getSelectedIndex() == 1);
bZoom.addEventListener(Events.ON_CLICK, this);
//
if (ThemeManager.isUseFontIconForImage())
bQuery.setIconSclass("z-icon-Refresh");
else
bQuery.setImage(ThemeManager.getThemeResource("images/Refresh16.png"));
bQuery.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh")));
bQuery.addEventListener(Events.ON_CLICK, this);
if (ThemeManager.isUseFontIconForImage())
bExport.setIconSclass("z-icon-Export");
else
bExport.setImage(ThemeManager.getThemeResource("images/Export16.png"));
bExport.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Export")));
bExport.addEventListener(Events.ON_CLICK, this);
@ -625,6 +634,9 @@ public class WAcctViewer extends Window implements EventListener<Event>
m_data.fillTable(selTable);
selTable.addEventListener(Events.ON_SELECT, this);
if (ThemeManager.isUseFontIconForImage())
selRecord.setIconSclass("z-icon-Find");
else
selRecord.setImage(ThemeManager.getThemeResource("images/Find16.png"));
selRecord.addEventListener(Events.ON_CLICK, this);
selRecord.setLabel("");
@ -638,6 +650,9 @@ public class WAcctViewer extends Window implements EventListener<Event>
selAcct.setName("Account_ID");
selAcct.addEventListener(Events.ON_CLICK, this);
selAcct.setLabel("");
if (ThemeManager.isUseFontIconForImage())
selAcct.setIconSclass("z-icon-Find");
else
selAcct.setImage(ThemeManager.getThemeResource("images/Find16.png"));
statusLine.setValue(" " + Msg.getMsg(Env.getCtx(), "ViewerOptions"));
@ -855,6 +870,9 @@ public class WAcctViewer extends Window implements EventListener<Event>
labels[selectionIndex].setVisible(true);
buttons[selectionIndex].setName(columnName); // actionCommand
buttons[selectionIndex].addEventListener(Events.ON_CLICK, this);
if (ThemeManager.isUseFontIconForImage())
buttons[selectionIndex].setIconSclass("z-icon-Find");
else
buttons[selectionIndex].setImage(ThemeManager.getThemeResource("images/Find16.png"));
buttons[selectionIndex].setLabel("");
buttons[selectionIndex].setVisible(true);

View File

@ -222,6 +222,11 @@ public class FeedbackRequestWindow extends Window implements EventListener<Event
southPane.appendChild(confirmPanel);
Button btn = new Button();
//devCoffee #6142
if (ThemeManager.isUseFontIconForImage())
btn.setIconSclass("z-icon-Attachment");
else
btn.setImage(ThemeManager.getThemeResource("images/Attachment24.png"));
btn.setUpload(AdempiereWebUI.getUploadSetting());
btn.addEventListener(Events.ON_UPLOAD, this);

View File

@ -341,10 +341,14 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
appendRecordLogInfo(pi.getLogs(), infoResultContent);
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Parameter"));
//devCoffee #6142
if (!ThemeManager.isUseFontIconForImage())
bOK.setImage(ThemeManager.getThemeResource("images/Reset16.png"));
bOK.setDisabled(false);
bCancel.setLabel(Msg.getMsg(Env.getCtx(), "Close"));
//devCoffee #6142
if (!ThemeManager.isUseFontIconForImage())
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
bCancel.setDisabled(false);
@ -458,9 +462,13 @@ public class ProcessDialog extends AbstractProcessDialog implements EventListene
isParameterPage = true;
bOK.setLabel(Msg.getMsg(Env.getCtx(), "Start"));
//devCoffee #6142
if (!ThemeManager.isUseFontIconForImage())
bOK.setImage(ThemeManager.getThemeResource("images/Ok16.png"));
bCancel.setLabel(Util.cleanAmp(Msg.translate(Env.getCtx(), ConfirmPanel.A_CANCEL)));
//devCoffee #6142
if (!ThemeManager.isUseFontIconForImage())
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel16.png"));
//recreate process info

View File

@ -264,6 +264,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
tpgc4.refresh();
tpgc4.setWReportCustomization(this);
tabpanels.appendChild(tpgc4);
tabpanels.setStyle("overflow: auto;");
tpsf5.setMPrintFormat(fm);
tpsf5.setPrintFormatItems(pfi);
@ -285,6 +286,10 @@ public class WReportCustomization implements IFormController,EventListener<Even
btnSave = new Button();
btnSave.setName("btnSave");
btnSave.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Save")));
//devCoffee #6142
if (ThemeManager.isUseFontIconForImage())
btnSave.setIconSclass("z-icon-Save");
else
btnSave.setImage(ThemeManager.getThemeResource("images/Save24.png"));
if(fm.getAD_Client_ID()== 0 || !isChange)
{
@ -297,6 +302,10 @@ public class WReportCustomization implements IFormController,EventListener<Even
if (m_isCanExport)
{
//devCoffee #6142
if (ThemeManager.isUseFontIconForImage())
bExport.setIconSclass("z-icon-Export");
else
bExport.setImage(ThemeManager.getThemeResource("images/Export24.png"));
bExport.setName("btnExport");
bExport.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Export")));
@ -314,6 +323,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
f.appendChild(foot);
grid.appendChild(f);
grid.setStyle("border:none");
form.appendChild(grid);
form.setBorder("normal");
}

View File

@ -155,7 +155,9 @@ public class WSQLProcess extends ADForm implements EventListener<Event>
public static final Button createProcessButton()
{
Button btnProcess = new Button();
if(ThemeManager.isUseFontIconForImage())
btnProcess.setIconSclass("z-icon-Process");
else
btnProcess.setImage(ThemeManager.getThemeResource("images/Process24.png"));
btnProcess.setName(Msg.getMsg(Env.getCtx(), "Process"));

View File

@ -773,9 +773,14 @@ public abstract class WEditor implements EventListener<Event>, PropertyChangeLis
* @param popupMenu
*/
protected void addTextEditorMenu(WEditorPopupMenu popupMenu) {
Menuitem editor = new Menuitem(Msg.getMsg(Env.getCtx(), "Editor"), ThemeManager.getThemeResource("images/Editor16.png"));
Menuitem editor = new Menuitem();
editor.setAttribute("EVENT", WEditorPopupMenu.EDITOR_EVENT);
editor.addEventListener(Events.ON_CLICK, popupMenu);
editor.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Editor")).intern());
if (ThemeManager.isUseFontIconForImage())
editor.setIconSclass("z-icon-Edit");
else
editor.setImage(ThemeManager.getThemeResource("images/Editor16.png"));
editor.addEventListener(Events.ON_CLICK, this);
popupMenu.appendChild(editor);
}

View File

@ -240,6 +240,9 @@ ContextMenuListener, IZoomableEditor
searchMode = new Menuitem();
searchMode.setAttribute(WEditorPopupMenu.EVENT_ATTRIBUTE, SHORT_LIST_EVENT);
searchMode.setLabel(Msg.getMsg(Env.getCtx(), "ShortListSwitchSearchMode"));
if(ThemeManager.isUseFontIconForImage())
searchMode.setIconSclass("z-icon-Lock");
else
searchMode.setImage(ThemeManager.getThemeResource("images/Lock16.png"));
searchMode.addEventListener(Events.ON_CLICK, popupMenu);
popupMenu.appendChild(searchMode);

View File

@ -309,6 +309,16 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
row.appendChild(new Label(""));
row.appendChild(isAcknowledgmentReceipt);
row = new Row();
rows.appendChild(row);
row.appendChild(new Label(""));
row.appendChild(isAcknowledgmentReceipt);
row = new Row();
rows.appendChild(row);
row.appendChild(new Label(""));
row.appendChild(isAcknowledgmentReceipt);
row = new Row();
rows.appendChild(row);
div = new Div();
@ -363,6 +373,9 @@ public class WEMailDialog extends Window implements EventListener<Event>, ValueC
LayoutUtils.addSclass("large-toolbarbutton", btn);
bAddDefaultMailText = new Button();
if(ThemeManager.isUseFontIconForImage())
bAddDefaultMailText.setIconSclass("z-icon-GetMail");
else
bAddDefaultMailText.setImage(ThemeManager.getThemeResource("images/DefaultMailText.png"));
bAddDefaultMailText.addEventListener(Events.ON_CLICK, this);
bAddDefaultMailText.setTooltiptext(Msg.getMsg(Env.getCtx(), "AddDefaultMailTextContent"));

View File

@ -157,15 +157,24 @@ public class WMediaDialog extends Window implements EventListener<Event>
bSave.setEnabled(false);
bSave.setImage(ThemeManager.getThemeResource("images/Export24.png"));
if (ThemeManager.isUseFontIconForImage())
bSave.setIconSclass("z-icon-Export");
else
bSave.setImage(ThemeManager.getThemeResource("images/Download24.png"));
bSave.setTooltiptext(Msg.getMsg(Env.getCtx(), "AttachmentSave"));
bSave.addEventListener(Events.ON_CLICK, this);
bLoad.setImage(ThemeManager.getThemeResource("images/Import24.png"));
if (ThemeManager.isUseFontIconForImage())
bLoad.setIconSclass("z-icon-Import");
else
bLoad.setImage(ThemeManager.getThemeResource("images/Upload24.png"));
bLoad.setTooltiptext(Msg.getMsg(Env.getCtx(), "Load"));
bLoad.addEventListener(Events.ON_UPLOAD, this);
bLoad.setUpload(AdempiereWebUI.getUploadSetting());
if (ThemeManager.isUseFontIconForImage())
bDelete.setIconSclass("z-icon-Delete");
else
bDelete.setImage(ThemeManager.getThemeResource("images/Delete24.png"));
bDelete.setTooltiptext(Msg.getMsg(Env.getCtx(), "Delete"));
bDelete.addEventListener(Events.ON_CLICK, this);
@ -187,9 +196,15 @@ public class WMediaDialog extends Window implements EventListener<Event>
southPane.appendChild(confirmPanel);
ZKUpdateUtil.setHeight(southPane, "30px");
if(ThemeManager.isUseFontIconForImage())
bOk.setIconSclass("z-icon-Ok");
else
bOk.setImage(ThemeManager.getThemeResource("images/Ok24.png"));
bOk.addEventListener(Events.ON_CLICK, this);
if(ThemeManager.isUseFontIconForImage())
bCancel.setIconSclass("z-icon-Cancel");
else
bCancel.setImage(ThemeManager.getThemeResource("images/Cancel24.png"));
bCancel.addEventListener(Events.ON_CLICK, this);

View File

@ -351,6 +351,9 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
cbNewEdit.addEventListener(Events.ON_CHECK, this);
row.appendChild(cbNewEdit);
bSelect.setLabel(Msg.getMsg(Env.getCtx(), "SelectExisting"));
if (ThemeManager.isUseFontIconForImage())
bSelect.setIconSclass("z-icon-PAttribute");
else
bSelect.setImage(ThemeManager.getThemeResource("images/PAttribute16.png"));
bSelect.addEventListener(Events.ON_CLICK, this);
row.appendChild(bSelect);
@ -430,6 +433,11 @@ public class WPAttributeDialog extends Window implements EventListener<Event>
// Popup
// fieldLot.addMouseListener(new VPAttributeDialog_mouseAdapter(this)); // popup
mZoom = new Menuitem(Msg.getMsg(Env.getCtx(), "Zoom"), ThemeManager.getThemeResource("images/Zoom16.png"));
if(ThemeManager.isUseFontIconForImage()) {
mZoom.setIconSclass("z-icon-Zoom");
mZoom.setImage("");
}
mZoom.addEventListener(Events.ON_CLICK, this);
popupMenu.appendChild(mZoom);
this.appendChild(popupMenu);

View File

@ -36,6 +36,7 @@ import org.compiere.util.CLogger;
import org.compiere.util.DB;
import org.compiere.util.Env;
import org.compiere.util.Msg;
import org.zkoss.zk.ui.HtmlBasedComponent;
import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
@ -152,12 +153,28 @@ public class WRecordAccessDialog extends Window implements EventListener<Event>
*/
private void jbInit() throws Exception
{
//devCoffee #6142
if(ThemeManager.isUseFontIconForImage())
bDelete.setIconSclass("z-icon-Delete");
else
bDelete.setImage(ThemeManager.getThemeResource("images/Delete16.png"));
bDelete.setTooltiptext(Msg.getMsg(Env.getCtx(), "Delete"));
//devCoffee #6142
if(ThemeManager.isUseFontIconForImage())
bNew.setIconSclass("z-icon-New");
else
bNew.setImage(ThemeManager.getThemeResource("images/New16.png"));
bNew.setTooltiptext(Msg.getMsg(Env.getCtx(), "New"));
//devCoffee #6142
if(ThemeManager.isUseFontIconForImage())
bUp.setIconSclass("z-icon-Previous");
else
bUp.setImage(ThemeManager.getThemeResource("images/Previous16.png"));
bUp.setTooltiptext(Msg.getMsg(Env.getCtx(), "Previous"));
//devCoffee #6142
if(ThemeManager.isUseFontIconForImage())
bDown.setIconSclass("z-icon-Next");
else
bDown.setImage(ThemeManager.getThemeResource("images/Next16.png"));
bDown.setTooltiptext(Msg.getMsg(Env.getCtx(), "Next"));
@ -186,6 +203,8 @@ public class WRecordAccessDialog extends Window implements EventListener<Event>
rows.appendChild(row);
row.appendChild(roleLabel);
row.appendChild(roleField);
//devCoffee #6142
ZKUpdateUtil.setHflex((HtmlBasedComponent) row.getLastChild(), "1");
row.appendChild(cbActive);
row.appendChild(cbExclude);
row.appendChild(cbReadOnly);

View File

@ -280,4 +280,6 @@
.z-icon-CSVImport:before {
content: "\f0f6";
}
.z-icon-GetMail:before {
content: "\f0e0";
}