IDEMPIERE-4122 missing font icons (#231)

Integrate patch from Murilo
This commit is contained in:
hengsin 2020-08-24 18:31:40 +08:00 committed by GitHub
parent 2ad8fdfb3e
commit 64a46577a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
11 changed files with 112 additions and 26 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

@ -221,6 +221,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

@ -285,6 +285,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 +301,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")));

View File

@ -153,7 +153,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

@ -781,8 +781,13 @@ 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.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, popupMenu);
popupMenu.appendChild(editor);
}

View File

@ -241,6 +241,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

@ -363,6 +363,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

@ -152,12 +152,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"));

View File

@ -292,3 +292,6 @@
.z-icon-UnSort:before {
content: "\f074";
}
.z-icon-GetMail:before {
content: "\f0e0";
}