diff --git a/migration/i5.1z/oracle/201711030900_IDEMPIERE-3535.sql b/migration/i5.1z/oracle/201711030900_IDEMPIERE-3535.sql new file mode 100644 index 0000000000..96cc057971 --- /dev/null +++ b/migration/i5.1z/oracle/201711030900_IDEMPIERE-3535.sql @@ -0,0 +1,11 @@ +SET SQLBLANKLINES ON +SET DEFINE OFF + +-- IDEMPIERE-3535 Implement font icon theme +-- Nov 2, 2017 3:27:27 PM GMT+08:00 +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200111,0,0,TO_DATE('2017-11-02 15:27:26','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2017-11-02 15:27:26','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ZK_THEME_USE_FONT_ICON_FOR_IMAGE','N','Y - Use css font icon instead of image for button, toolbar button and menu, N - Use image','D','S','29a0d95d-af05-477a-a047-241c350dc8e3') +; + +SELECT register_migration_script('201711030900_IDEMPIERE-3535.sql') FROM dual +; + diff --git a/migration/i5.1z/postgresql/201711030900_IDEMPIERE-3535.sql b/migration/i5.1z/postgresql/201711030900_IDEMPIERE-3535.sql new file mode 100644 index 0000000000..539a7a509b --- /dev/null +++ b/migration/i5.1z/postgresql/201711030900_IDEMPIERE-3535.sql @@ -0,0 +1,8 @@ +-- IDEMPIERE-3535 Implement font icon theme +-- Nov 2, 2017 3:27:27 PM GMT+08:00 +INSERT INTO AD_SysConfig (AD_SysConfig_ID,AD_Client_ID,AD_Org_ID,Created,Updated,CreatedBy,UpdatedBy,IsActive,Name,Value,Description,EntityType,ConfigurationLevel,AD_SysConfig_UU) VALUES (200111,0,0,TO_TIMESTAMP('2017-11-02 15:27:26','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2017-11-02 15:27:26','YYYY-MM-DD HH24:MI:SS'),100,100,'Y','ZK_THEME_USE_FONT_ICON_FOR_IMAGE','N','Y - Use css font icon instead of image for button, toolbar button and menu, N - Use image','D','S','29a0d95d-af05-477a-a047-241c350dc8e3') +; + +SELECT register_migration_script('201711030900_IDEMPIERE-3535.sql') FROM dual +; + diff --git a/org.adempiere.base/src/org/compiere/model/MSysConfig.java b/org.adempiere.base/src/org/compiere/model/MSysConfig.java index bb5164bd9a..f2d33fa30a 100644 --- a/org.adempiere.base/src/org/compiere/model/MSysConfig.java +++ b/org.adempiere.base/src/org/compiere/model/MSysConfig.java @@ -177,6 +177,7 @@ public class MSysConfig extends X_AD_SysConfig public static final String ZK_SEQ_DEFAULT_VALUE_PANEL = "ZK_SEQ_DEFAULT_VALUE_PANEL"; public static final String ZK_SESSION_TIMEOUT_IN_SECONDS = "ZK_SESSION_TIMEOUT_IN_SECONDS"; public static final String ZK_THEME = "ZK_THEME"; + public static final String ZK_THEME_USE_FONT_ICON_FOR_IMAGE = "ZK_THEME_USE_FONT_ICON_FOR_IMAGE"; /** * Standard Constructor diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java index 35746720a7..c3f3c00ef9 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/AdempiereWebUI.java @@ -126,7 +126,7 @@ public class AdempiereWebUI extends Window implements EventListener, IWeb m_URLParameters = new ConcurrentHashMap(Executions.getCurrent().getParameterMap()); } - public void onCreate() + public void onCreate() { this.getPage().setTitle(ThemeManager.getBrowserTitle()); @@ -483,7 +483,6 @@ public class AdempiereWebUI extends Window implements EventListener, IWeb loginDesktop.createPart(this.getPage()); loginDesktop.changeRole(locale, properties); loginDesktop.getComponent().getRoot().addEventListener(Events.ON_CLIENT_INFO, this); - } /** diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java index 49e45a1197..ccb5a1a0c0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/WRequest.java @@ -103,7 +103,10 @@ public class WRequest implements EventListener private void getRequests (Component invoker) { m_new = new Menuitem(Msg.getMsg(Env.getCtx(), "RequestNew")); - m_new.setImage(ThemeManager.getThemeResource("images/New16.png")); + if (ThemeManager.isUseFontIconForImage()) + m_new.setIconSclass("z-icon-New"); + else + m_new.setImage(ThemeManager.getThemeResource("images/New16.png")); m_new.addEventListener(Events.ON_CLICK, this); m_popup.appendChild(m_new); // diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java index 970be8a714..4517e39723 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/ADWindowToolbar.java @@ -297,18 +297,27 @@ public class ADWindowToolbar extends FToolbar implements EventListener btn.setId(btn.getName()); if (image != null) { - Executions.createComponents(ThemeManager.getPreference(), this, null); - String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size"); - String suffix = "24.png"; - if (!Util.isEmpty(size)) + if (ThemeManager.isUseFontIconForImage()) { - suffix = size + ".png"; + String iconSclass = "z-icon-" + image; + btn.setIconSclass(iconSclass); + LayoutUtils.addSclass("font-icon-toolbar-button", btn); + } + else + { + Executions.createComponents(ThemeManager.getPreference(), this, null); + String size = Env.getContext(Env.getCtx(), "#ZK_Toolbar_Button_Size"); + String suffix = "24.png"; + if (!Util.isEmpty(size)) + { + suffix = size + ".png"; + } + btn.setImage(ThemeManager.getThemeResource("images/"+image + suffix)); } - btn.setImage(ThemeManager.getThemeResource("images/"+image + suffix)); } btn.setTooltiptext(Msg.getMsg(Env.getCtx(),tooltip)); - btn.setSclass("toolbar-button"); - + LayoutUtils.addSclass("toolbar-button", btn); + buttons.put(name, btn); //make toolbar button last to receive focus btn.setTabindex(0); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java index a13afca44b..c22cf32fc7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/BreadCrumb.java @@ -387,7 +387,10 @@ public class BreadCrumb extends Div implements EventListener { { suffix = size + ".png"; } - btn.setImage(ThemeManager.getThemeResource("images/"+image + suffix)); + if (ThemeManager.isUseFontIconForImage()) + btn.setIconSclass("z-icon-"+image+"Record"); + else + btn.setImage(ThemeManager.getThemeResource("images/"+image + suffix)); btn.setTooltiptext(Msg.getMsg(Env.getCtx(),tooltip)); btn.setSclass("breadcrumb-toolbar-button"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java index 92cd52f72f..78c95f99ed 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/DetailPane.java @@ -273,8 +273,11 @@ public class DetailPane extends Panel implements EventListener, IdSpace { tp.setSclass("adwindow-detailpane-tabpanel"); ToolBar toolbar = new ToolBar(); tp.appendChild(toolbar); - btnNew = new ToolBarButton(); - btnNew.setImage(ThemeManager.getThemeResource(NEW_IMAGE)); + btnNew = new ToolBarButton(); + if (ThemeManager.isUseFontIconForImage()) + btnNew.setIconSclass("z-icon-New"); + else + btnNew.setImage(ThemeManager.getThemeResource(NEW_IMAGE)); btnNew.setId(BTN_NEW_ID); btnNew.addEventListener(Events.ON_CLICK, new EventListener() { @Override @@ -288,7 +291,10 @@ public class DetailPane extends Panel implements EventListener, IdSpace { ToolBarButton button = new ToolBarButton(); button = new ToolBarButton(); - button.setImage(ThemeManager.getThemeResource(EDIT_IMAGE)); + if (ThemeManager.isUseFontIconForImage()) + button.setIconSclass("z-icon-Edit"); + else + button.setImage(ThemeManager.getThemeResource(EDIT_IMAGE)); button.setId(BTN_EDIT_ID); button.addEventListener(Events.ON_CLICK, new EventListener() { @Override @@ -300,7 +306,10 @@ public class DetailPane extends Panel implements EventListener, IdSpace { buttons.put(BTN_EDIT_ID.substring(3, BTN_EDIT_ID.length()), button); button = new ToolBarButton(); - button.setImage(ThemeManager.getThemeResource(DELETE_IMAGE)); + if (ThemeManager.isUseFontIconForImage()) + button.setIconSclass("z-icon-Delete"); + else + button.setImage(ThemeManager.getThemeResource(DELETE_IMAGE)); button.setId(BTN_DELETE_ID); button.addEventListener(Events.ON_CLICK, new EventListener() { @Override @@ -313,7 +322,10 @@ public class DetailPane extends Panel implements EventListener, IdSpace { buttons.put(BTN_DELETE_ID.substring(3, BTN_DELETE_ID.length()), button); button = new ToolBarButton(); - button.setImage(ThemeManager.getThemeResource(SAVE_IMAGE)); + if (ThemeManager.isUseFontIconForImage()) + button.setIconSclass("z-icon-Save"); + else + button.setImage(ThemeManager.getThemeResource(SAVE_IMAGE)); button.setId(BTN_SAVE_ID); button.addEventListener(Events.ON_CLICK, new EventListener() { @Override @@ -328,7 +340,10 @@ public class DetailPane extends Panel implements EventListener, IdSpace { if (!tabPanel.getGridTab().isSortTab()) { button = new ToolBarButton(); - button.setImage(ThemeManager.getThemeResource(PROCESS_IMAGE)); + if (ThemeManager.isUseFontIconForImage()) + button.setIconSclass("z-icon-Process"); + else + button.setImage(ThemeManager.getThemeResource(PROCESS_IMAGE)); button.setId(BTN_PROCESS_ID); button.addEventListener(Events.ON_CLICK, new EventListener() { @Override diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java index b3c582f6f3..ac120bb43b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/adwindow/GridTabRowRenderer.java @@ -480,6 +480,9 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt cell.addEventListener(Events.ON_CLICK, this); cell.setStyle("border: none;"); cell.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "EditRecord"))); + if (ThemeManager.isUseFontIconForImage()) + cell.appendChild(new Label()); + cell.setValign("middle"); row.appendChild(cell); @@ -592,12 +595,21 @@ public class GridTabRowRenderer implements RowRenderer, RowRendererExt Cell cell = (Cell) currentRow.getChildren().get(1); if (cell != null) { cell.setSclass("row-indicator"); + if (cell.getFirstChild() != null) + ((Label)cell.getFirstChild()).setSclass(""); } } currentRow = row; Cell cell = (Cell) currentRow.getChildren().get(1); if (cell != null) { - cell.setSclass("row-indicator-selected"); + if (ThemeManager.isUseFontIconForImage()) +// cell.setSclass("row-indicator-selected z-icon-Edit"); + { + Label l = (Label) cell.getFirstChild(); + l.setSclass("row-indicator-selected z-icon-Edit"); + } + else + cell.setSclass("row-indicator-selected"); } currentRowIndex = gridTab.getCurrentRow(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/MenuSearchController.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/MenuSearchController.java index 9f9b4c5933..e205dccf86 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/MenuSearchController.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/MenuSearchController.java @@ -177,7 +177,10 @@ public class MenuSearchController implements EventListener{ treeItem.getTreerow().getFirstChild().getFirstChild() instanceof LabelImageElement) { LabelImageElement element = (LabelImageElement) treeItem.getTreerow().getFirstChild().getFirstChild(); - image = element.getImage(); + if (ThemeManager.isUseFontIconForImage() && element.getIconSclass() != null) + image = element.getIconSclass(); + else + image = element.getImage(); } } return image != null ? image.intern() : null; @@ -205,10 +208,12 @@ public class MenuSearchController implements EventListener{ listhead.appendChild(listheader); listheader = new Listheader(); listheader.setAlign("center"); + listheader.setValign("middle"); ZKUpdateUtil.setWidth(listheader, "28px"); listhead.appendChild(listheader); listheader = new Listheader(); listheader.setAlign("center"); + listheader.setValign("middle"); ZKUpdateUtil.setWidth(listheader, "28px"); listhead.appendChild(listheader); @@ -507,17 +512,25 @@ public class MenuSearchController implements EventListener{ public void render(Listitem item, MenuItem data, int index) throws Exception { Listcell cell = new Listcell(data.getLabel(), data.getImage()); + if (ThemeManager.isUseFontIconForImage() && data.getImage() != null && data.getImage().startsWith("z-icon")) { + cell.setImage(null); + cell.setIconSclass(data.getImage()); + } item.appendChild(cell); cell.setTooltip(data.getDescription()); item.setValue(data); item.addEventListener(Events.ON_CLICK, MenuSearchController.this); cell = new Listcell(); + cell.setSclass("menu-search-list-toolbar-cell"); item.appendChild(cell); boolean isWindow = data.getType() != null && data.getType().equals("window"); if (isWindow) { ToolBarButton newBtn = new ToolBarButton(); - newBtn.setImage(ThemeManager.getThemeResource("images/New16.png")); + if (ThemeManager.isUseFontIconForImage()) + newBtn.setIconSclass("z-icon-New"); + else + newBtn.setImage(ThemeManager.getThemeResource("images/New16.png")); newBtn.addEventListener(Events.ON_CLICK, MenuSearchController.this); newBtn.setSclass("fav-new-btn"); newBtn.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), NEW_BUTTON_NAME))); @@ -526,6 +539,7 @@ public class MenuSearchController implements EventListener{ } cell = new Listcell(); + cell.setSclass("menu-search-list-toolbar-cell"); item.appendChild(cell); MTreeNode node = null; if (data.getData() instanceof MTreeNode) { @@ -550,6 +564,7 @@ public class MenuSearchController implements EventListener{ } cell.appendChild(starBtn); starBtn.addEventListener(Events.ON_CLICK, MenuSearchController.this); + starBtn.setSclass("fav-new-btn"); } } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java index ecd698b0ad..a27998a350 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WArchiveViewer.java @@ -28,6 +28,7 @@ import java.util.logging.Level; import org.adempiere.util.Callback; import org.adempiere.webui.ClientInfo; +import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Checkbox; import org.adempiere.webui.component.Column; @@ -271,25 +272,42 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis createdByQField.setMold("select"); createdByQField.setRows(1); - updateArchive.setImage(ThemeManager.getThemeResource("images/Ok24.png")); + if (ThemeManager.isUseFontIconForImage()) + updateArchive.setIconSclass("z-icon-Ok"); + else + updateArchive.setImage(ThemeManager.getThemeResource("images/Ok24.png")); updateArchive.setTooltiptext(Msg.getMsg(Env.getCtx(), "Update")); updateArchive.addEventListener(Events.ON_CLICK, this); - deleteArchive.setImage(ThemeManager.getThemeResource("images/Delete24.png")); + if (ThemeManager.isUseFontIconForImage()) + deleteArchive.setIconSclass("z-icon-Delete"); + else + deleteArchive.setImage(ThemeManager.getThemeResource("images/Delete24.png")); deleteArchive.setTooltiptext(Msg.getMsg(Env.getCtx(), "Delete")); deleteArchive.addEventListener(Events.ON_CLICK, this); - bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh24.png")); + if (ThemeManager.isUseFontIconForImage()) + bRefresh.setIconSclass("z-icon-Refresh"); + else + bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh24.png")); bRefresh.setTooltiptext(Msg.getMsg(Env.getCtx(), "Refresh")); bRefresh.addEventListener(Events.ON_CLICK, this); - bBack.setImage(ThemeManager.getThemeResource("images/wfBack24.png")); + if (ThemeManager.isUseFontIconForImage()) + bBack.setIconSclass("z-icon-Previous"); + else + bBack.setImage(ThemeManager.getThemeResource("images/wfBack24.png")); bBack.setTooltiptext(Msg.getMsg(Env.getCtx(), "Previous")); bBack.addEventListener(Events.ON_CLICK, this); + LayoutUtils.addSclass("btn-medium", bBack); - bNext.setImage(ThemeManager.getThemeResource("images/wfNext24.png")); + if (ThemeManager.isUseFontIconForImage()) + bNext.setIconSclass("z-icon-Next"); + else + bNext.setImage(ThemeManager.getThemeResource("images/wfNext24.png")); bNext.setTooltiptext(Msg.getMsg(Env.getCtx(), "Next")); bNext.addEventListener(Events.ON_CLICK, this); + LayoutUtils.addSclass("btn-medium", bNext); nameField.addEventListener(Events.ON_CHANGE, this); descriptionField.addEventListener(Events.ON_CHANGE, this); @@ -517,7 +535,10 @@ public class WArchiveViewer extends Archive implements IFormController, EventLis cell = new Cell(); ZKUpdateUtil.setHflex(cell, "min"); ToolBarButton more = new ToolBarButton(); - more.setImage(ThemeManager.getThemeResource("images/expand-header.png")); + if (ThemeManager.isUseFontIconForImage()) + more.setIconSclass("z-icon-Expand"); + else + more.setImage(ThemeManager.getThemeResource("images/expand-header.png")); cell.appendChild(more); boxViewSeparator.appendChild(cell); Popup sidePopup = new Popup(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java index 812e64e8db..22ec7f358e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WSetupWizard.java @@ -358,19 +358,31 @@ public class WSetupWizard extends SetupWizard implements IFormController, EventL ZKUpdateUtil.setHeight(mainLayout, "100%"); mainLayout.setStyle("position: absolute"); - bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh16.png")); + if (ThemeManager.isUseFontIconForImage()) + bRefresh.setIconSclass("z-icon-Refresh"); + else + bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh16.png")); bRefresh.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "Refresh")); bRefresh.addEventListener(Events.ON_CLICK, this); - bOK.setImage(ThemeManager.getThemeResource("images/Ok16.png")); + if (ThemeManager.isUseFontIconForImage()) + bOK.setIconSclass("z-icon-Ok"); + else + bOK.setImage(ThemeManager.getThemeResource("images/Ok16.png")); bOK.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "Update")); bOK.addEventListener(Events.ON_CLICK, this); - bNext.setImage(ThemeManager.getThemeResource("images/Next16.png")); + if (ThemeManager.isUseFontIconForImage()) + bNext.setIconSclass("z-icon-Next"); + else + bNext.setImage(ThemeManager.getThemeResource("images/Next16.png")); bNext.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "Next")); bNext.addEventListener(Events.ON_CLICK, this); - bZoom.setImage(ThemeManager.getThemeResource("images/Zoom16.png")); + if (ThemeManager.isUseFontIconForImage()) + bZoom.setIconSclass("z-icon-Zoom"); + else + bZoom.setImage(ThemeManager.getThemeResource("images/Zoom16.png")); bZoom.setTooltiptext(Msg.getCleanMsg(Env.getCtx(), "Zoom")); bZoom.addEventListener(Events.ON_CLICK, this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java index e54166e24f..5f22c92c8e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WTreeMaintenance.java @@ -195,7 +195,10 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController searchBox.addEventListener(Events.ON_CLICK, this); searchBox.getTextbox().addEventListener(Events.ON_OK, this); - searchBox.getButton().setImage(ThemeManager.getThemeResource("images/Find16.png")); + if (ThemeManager.isUseFontIconForImage()) + searchBox.getButton().setIconSclass("z-icon-Search"); + else + searchBox.getButton().setImage(ThemeManager.getThemeResource("images/Find16.png")); searchBox.setToolTipText(Msg.getCleanMsg(Env.getCtx(), "TreeSearch")); if (ClientInfo.maxWidth(ClientInfo.SMALL_WIDTH-1)) ZKUpdateUtil.setHflex(searchBox, "1"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFEditor.java index 4e4e2c8233..95902d0d32 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WFEditor.java @@ -88,7 +88,7 @@ public class WFEditor extends ADForm { protected void initForm() { ZKUpdateUtil.setHeight(this, "100%"); Borderlayout layout = new Borderlayout(); - layout.setStyle("width: 100%; height: 100%; position: absolute;"); + layout.setStyle("width: 100%; height: 100%; position: relative;"); appendChild(layout); String sql; boolean isBaseLanguage = Env.isBaseLanguage(Env.getCtx(), "AD_Workflow"); @@ -113,22 +113,30 @@ public class WFEditor extends ADForm { ToolBar toolbar = new ToolBar(); north.appendChild(toolbar); toolbar.appendChild(workflowList); - workflowList.setStyle("margin-left: 10px; margin-top: 5px; margin-right:5px;"); // Zoom zoomButton = new Toolbarbutton(); - zoomButton.setImage(ThemeManager.getThemeResource("images/Zoom16.png")); + if (ThemeManager.isUseFontIconForImage()) + zoomButton.setIconSclass("z-icon-Zoom"); + else + zoomButton.setImage(ThemeManager.getThemeResource("images/Zoom16.png")); toolbar.appendChild(zoomButton); zoomButton.addEventListener(Events.ON_CLICK, this); zoomButton.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Zoom"))); // New Node newButton = new Toolbarbutton(); - newButton.setImage(ThemeManager.getThemeResource("images/New16.png")); + if (ThemeManager.isUseFontIconForImage()) + newButton.setIconSclass("z-icon-New"); + else + newButton.setImage(ThemeManager.getThemeResource("images/New16.png")); toolbar.appendChild(newButton); newButton.addEventListener(Events.ON_CLICK, this); newButton.setTooltiptext(Msg.getMsg(Env.getCtx(), "CreateNewNode")); // Refresh refreshButton = new Toolbarbutton(); - refreshButton.setImage(ThemeManager.getThemeResource("images/Refresh16.png")); + if (ThemeManager.isUseFontIconForImage()) + refreshButton.setIconSclass("z-icon-Refresh"); + else + refreshButton.setImage(ThemeManager.getThemeResource("images/Refresh16.png")); toolbar.appendChild(refreshButton); refreshButton.addEventListener(Events.ON_CLICK, this); refreshButton.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh"))); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java index 8d1f8d8d78..0acc8b057d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/wf/WWFActivity.java @@ -133,8 +133,14 @@ public class WWFActivity extends ADForm implements EventListener fAnswerList.setMold("select"); - bZoom.setImage(ThemeManager.getThemeResource("images/Zoom16.png")); - bOK.setImage(ThemeManager.getThemeResource("images/Ok24.png")); + if (ThemeManager.isUseFontIconForImage()) + bZoom.setIconSclass("z-icon-Zoom"); + else + bZoom.setImage(ThemeManager.getThemeResource("images/Zoom16.png")); + if (ThemeManager.isUseFontIconForImage()) + bOK.setIconSclass("z-icon-Ok"); + else + bOK.setImage(ThemeManager.getThemeResource("images/Ok16.png")); MLookup lookup = MLookupFactory.get(Env.getCtx(), m_WindowNo, 0, 10443, DisplayType.Search); @@ -471,7 +477,10 @@ public class WWFActivity extends ADForm implements EventListener fAnswerText.setVisible(false); fAnswerList.setVisible(false); fAnswerButton.setVisible(false); - fAnswerButton.setImage(ThemeManager.getThemeResource("images/mWindow.png")); + if (ThemeManager.isUseFontIconForImage()) + fAnswerButton.setIconSclass("z-icon-Window"); + else + fAnswerButton.setImage(ThemeManager.getThemeResource("images/mWindow.png")); fTextMsg.setReadonly(!(selIndex >= 0)); bZoom.setEnabled(selIndex >= 0); bOK.setEnabled(selIndex >= 0); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java index 525a6b34e9..8addd94c68 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/Messagebox.java @@ -185,12 +185,35 @@ public class Messagebox extends Window implements EventListener Hbox pnlImage = new Hbox(); - img.setSrc(imgSrc); + String iconSclass = null; + Label label = null; + if (ThemeManager.isUseFontIconForImage()) + { + if (imgSrc.equals(QUESTION)) + iconSclass = "z-icon-QuestionMessageBox"; + else if (imgSrc.equals(EXCLAMATION)) + iconSclass = "z-icon-ExclamationMessageBox"; + else if (imgSrc.equals(INFORMATION)) + iconSclass = "z-icon-InformationMessageBox"; + else if (imgSrc.equals(ERROR)) + iconSclass = "z-icon-ErrorMessageBox"; + } + + if (ThemeManager.isUseFontIconForImage() && iconSclass != null) + { + label = new Label(); + label.setSclass(iconSclass); + } + else + img.setSrc(imgSrc); ZKUpdateUtil.setWidth(pnlImage, "72px"); pnlImage.setAlign("center"); pnlImage.setPack("center"); - pnlImage.appendChild(img); + if (ThemeManager.isUseFontIconForImage() && iconSclass != null) + pnlImage.appendChild(label); + else + pnlImage.appendChild(img); Hbox north = new Hbox(); north.setAlign("center"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java index f44a66d4b9..5a2a377261 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/component/NumberBox.java @@ -123,7 +123,10 @@ public class NumberBox extends Div appendChild(decimalBox); btn = new Button(); - btn.setImage(ThemeManager.getThemeResource("images/Calculator16.png")); + if (ThemeManager.isUseFontIconForImage()) + btn.setIconSclass("z-icon-Calculator"); + else + btn.setImage(ThemeManager.getThemeResource("images/Calculator16.png")); btn.setTabindex(-1); ZKUpdateUtil.setHflex(btn, "0"); btn.setWidgetListener("onClick", "try{var id=this.getPopup(); zk.Widget.$(id.substring(5, id.length - 1)).focus_(100);" + diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java index af41196248..05e87ad3e1 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPFavourites.java @@ -95,12 +95,24 @@ public class DPFavourites extends DashboardPanel implements EventListener this.appendChild(favToolbar); // Elaine 2008/07/24 - Image img = new Image(ThemeManager.getThemeResource("images/Delete24.png")); - favToolbar.appendChild(img); - img.setStyle("text-align: right; width:24px; height:24px;"); - img.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Delete"))); - img.setDroppable(DELETE_FAV_DROPPABLE); - img.addEventListener(Events.ON_DROP, this); + if (ThemeManager.isUseFontIconForImage()) + { + Label deleteLabel = new Label(); + favToolbar.appendChild(deleteLabel); + deleteLabel.setSclass("z-icon-Trash trash-font-icon"); + deleteLabel.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Delete"))); + deleteLabel.setDroppable(DELETE_FAV_DROPPABLE); + deleteLabel.addEventListener(Events.ON_DROP, this); + } + else + { + Image img = new Image(ThemeManager.getThemeResource("images/Delete24.png")); + favToolbar.appendChild(img); + img.setStyle("text-align: right; width:24px; height:24px;"); + img.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Delete"))); + img.setDroppable(DELETE_FAV_DROPPABLE); + img.addEventListener(Events.ON_DROP, this); + } // favContent.setDroppable(FAVOURITE_DROPPABLE); @@ -150,9 +162,10 @@ public class DPFavourites extends DashboardPanel implements EventListener } protected void addNode(int nodeId, String label, String description, String imageSrc, boolean addNewBtn) { - Layout hbox = new Hlayout(); + Hlayout hbox = new Hlayout(); hbox.setSclass("favourites-item"); hbox.setSpacing("0px"); + hbox.setValign("middle"); bxFav.appendChild(hbox); A btnFavItem = new A(); @@ -160,7 +173,9 @@ public class DPFavourites extends DashboardPanel implements EventListener hbox.appendChild(btnFavItem); btnFavItem.setLabel(label); btnFavItem.setTooltiptext(description); - if (imageSrc.startsWith(ITheme.THEME_PATH_PREFIX)) + if (ThemeManager.isUseFontIconForImage()) + btnFavItem.setIconSclass(imageSrc); + else if (imageSrc.startsWith(ITheme.THEME_PATH_PREFIX)) btnFavItem.setImage(imageSrc); else btnFavItem.setImage(ThemeManager.getThemeResource(imageSrc)); @@ -172,6 +187,11 @@ public class DPFavourites extends DashboardPanel implements EventListener if (addNewBtn) { Toolbarbutton newBtn = new Toolbarbutton(null, ThemeManager.getThemeResource("images/New16.png")); + if (ThemeManager.isUseFontIconForImage()) + { + newBtn.setImage(null); + newBtn.setIconSclass("z-icon-New"); + } newBtn.setAttribute(NODE_ID_ATTR, String.valueOf(nodeId)); hbox.appendChild(newBtn); newBtn.addEventListener(Events.ON_CLICK, this); @@ -206,7 +226,7 @@ public class DPFavourites extends DashboardPanel implements EventListener addItem(treeitem); } } - else if(comp instanceof Image) + else if(comp instanceof Image || comp instanceof Label) { if(dragged instanceof A) { @@ -331,7 +351,10 @@ public class DPFavourites extends DashboardPanel implements EventListener { A link = (A) treeitem.getTreerow().getFirstChild().getFirstChild(); label = link.getLabel(); - image = link.getImage(); + if (ThemeManager.isUseFontIconForImage() && link.getIconSclass() != null) + image = link.getIconSclass(); + else + image = link.getImage(); } addNode(Node_ID, label, treeitem.getTooltiptext(), image, isWindow); @@ -343,6 +366,9 @@ public class DPFavourites extends DashboardPanel implements EventListener } private String getIconFile(MTreeNode mt) { + if (ThemeManager.isUseFontIconForImage()) { + return getIconSclass(mt); + } if (mt.isWindow()) return "images/mWindow.png"; if (mt.isReport()) @@ -351,6 +377,26 @@ public class DPFavourites extends DashboardPanel implements EventListener return "images/mProcess.png"; if (mt.isWorkFlow()) return "images/mWorkFlow.png"; + if (mt.isForm()) + return "images/mForm.png"; + if (mt.isInfo()) + return "images/mInfo.png"; return "images/mWindow.png"; } + + private String getIconSclass(MTreeNode mt) { + if (mt.isWindow()) + return "z-icon-Window"; + if (mt.isReport()) + return "z-icon-Report"; + if (mt.isProcess() || mt.isTask()) + return "z-icon-Task"; + if (mt.isWorkFlow()) + return "z-icon-WorkFlow"; + if (mt.isForm()) + return "z-icon-Form"; + if (mt.isInfo()) + return "z-icon-Info"; + return "z-icon-Window"; + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java index 0345856c2f..aaf9f43a66 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/dashboard/DPRecentItems.java @@ -19,6 +19,7 @@ import java.util.Properties; import org.adempiere.base.Service; import org.adempiere.base.event.EventManager; +import org.adempiere.webui.component.ToolBarButton; import org.adempiere.webui.session.SessionManager; import org.adempiere.webui.theme.ThemeManager; import org.adempiere.webui.util.ServerPushTemplate; @@ -46,6 +47,7 @@ import org.zkoss.zk.ui.util.DesktopCleanup; import org.zkoss.zul.A; import org.zkoss.zul.Box; import org.zkoss.zul.Image; +import org.zkoss.zul.Label; import org.zkoss.zul.Panel; import org.zkoss.zul.Panelchildren; import org.zkoss.zul.Toolbar; @@ -101,19 +103,43 @@ public class DPRecentItems extends DashboardPanel implements EventListener { ToolBarButton btnViewItem = new ToolBarButton("InfoAccount"); btnViewItem.setSclass("link"); btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoAccount"))); - btnViewItem.setImage(ThemeManager.getThemeResource("images/InfoAccount16.png")); + if (ThemeManager.isUseFontIconForImage()) + btnViewItem.setIconSclass("z-icon-InfoAccount"); + else + btnViewItem.setImage(ThemeManager.getThemeResource("images/InfoAccount16.png")); btnViewItem.addEventListener(Events.ON_CLICK, this); vbox.appendChild(btnViewItem); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton toolbarbutton-with-text", btnViewItem); } if (MSysConfig.getBooleanValue(MSysConfig.DPVIEWS_SHOWINFOSCHEDULE, true, Env.getAD_Client_ID(Env.getCtx())) && MRole.getDefault().isAllow_Info_Schedule()) @@ -74,9 +80,14 @@ public class DPViews extends DashboardPanel implements EventListener { ToolBarButton btnViewItem = new ToolBarButton("InfoSchedule"); btnViewItem.setSclass("link"); btnViewItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "InfoSchedule"))); - btnViewItem.setImage(ThemeManager.getThemeResource("images/InfoSchedule16.png")); + if (ThemeManager.isUseFontIconForImage()) + btnViewItem.setIconSclass("z-icon-InfoSchedule"); + else + btnViewItem.setImage(ThemeManager.getThemeResource("images/InfoSchedule16.png")); btnViewItem.addEventListener(Events.ON_CLICK, this); vbox.appendChild(btnViewItem); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton toolbarbutton-with-text", btnViewItem); } List list = new Query(Env.getCtx(), MInfoWindow.Table_Name, "IsValid='Y' AND IsShowInDashboard='Y'", null) @@ -94,9 +105,20 @@ public class DPViews extends DashboardPanel implements EventListener { ToolBarButton btnViewItem = new ToolBarButton(info.getName()); btnViewItem.setSclass("link"); btnViewItem.setLabel(info.get_Translation("Name")); - btnViewItem.setImage(ThemeManager.getThemeResource("images/" + (Util.isEmpty(info.getImageURL()) ? "Info16.png" : info.getImageURL()))); + String image = (Util.isEmpty(info.getImageURL()) ? "Info16.png" : info.getImageURL()); + if (ThemeManager.isUseFontIconForImage()) + { + image = image.replace("16.png", ""); + btnViewItem.setIconSclass("z-icon-"+image); + } + else + { + btnViewItem.setImage(ThemeManager.getThemeResource("images/" + image)); + } btnViewItem.addEventListener(Events.ON_CLICK, this); vbox.appendChild(btnViewItem); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton toolbarbutton-with-text", btnViewItem); } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java index 8858e7ad9b..225dbfa033 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/desktop/DefaultDesktop.java @@ -420,7 +420,6 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria showHeader.setImage(ThemeManager.getThemeResource(IMAGES_THREELINE_MENU_PNG)); showHeader.addEventListener(Events.ON_CLICK, this); showHeader.setSclass("window-container-toolbar-btn"); - showHeader.setStyle("cursor: pointer; border: 1px solid transparent; padding: 2px;"); showHeader.setVisible(false); max = new ToolBarButton(); @@ -428,15 +427,16 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria max.setImage(ThemeManager.getThemeResource(IMAGES_UPARROW_PNG)); max.addEventListener(Events.ON_CLICK, this); max.setSclass("window-container-toolbar-btn"); - max.setStyle("cursor: pointer; border: 1px solid transparent; padding: 2px;"); } contextHelp = new ToolBarButton(); toolbar.appendChild(contextHelp); - contextHelp.setImage(ThemeManager.getThemeResource(IMAGES_CONTEXT_HELP_PNG)); + if (ThemeManager.isUseFontIconForImage()) + contextHelp.setIconSclass("z-icon-Help"); + else + contextHelp.setImage(ThemeManager.getThemeResource(IMAGES_CONTEXT_HELP_PNG)); contextHelp.addEventListener(Events.ON_CLICK, this); contextHelp.setSclass("window-container-toolbar-btn context-help-btn"); - contextHelp.setStyle("cursor: pointer; border: 1px solid transparent; padding: 2px;"); contextHelp.setTooltiptext(Util.cleanAmp(Msg.getElement(Env.getCtx(), "AD_CtxHelp_ID"))); contextHelp.setVisible(!e.isVisible()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAccountEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAccountEditor.java index df35e6344f..02c832e111 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAccountEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAccountEditor.java @@ -55,7 +55,10 @@ public class WAccountEditor extends WEditor implements ContextMenuListener public WAccountEditor(GridField gridField) { super(new Combinationbox(), gridField); - getComponent().setButtonImage(ThemeManager.getThemeResource("images/Account16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-Account"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/Account16.png")); m_mAccount = new MAccountLookup (gridField.getVO().ctx, gridField.getWindowNo()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAssignmentEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAssignmentEditor.java index 7b312dbb05..6aa65ab5b2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAssignmentEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WAssignmentEditor.java @@ -56,7 +56,10 @@ public class WAssignmentEditor extends WEditor implements ContextMenuListener { private void initComponents() { getComponent().getTextbox().setReadonly(true); - getComponent().setButtonImage(ThemeManager.getThemeResource("images/Assignment16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-Assignment"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/Assignment16.png")); popupMenu = new WEditorPopupMenu(true, false, false); popupMenu.addMenuListener(this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WButtonEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WButtonEditor.java index 671ef443da..b5fb98477f 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WButtonEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WButtonEditor.java @@ -118,26 +118,41 @@ public class WButtonEditor extends WEditor implements IProcessButton if (columnName.equals("PaymentRule")) { readReference(REFERENCE_PAYMENTRULE); - getComponent().setImage(ThemeManager.getThemeResource("images/Payment16.png")); // 29*14 + if (ThemeManager.isUseFontIconForImage()) + getComponent().setIconSclass("z-icon-Payment"); + else + getComponent().setImage(ThemeManager.getThemeResource("images/Payment16.png")); // 29*14 } else if (columnName.equals("DocAction")) { readReference(REFERENCE_DOCUMENTACTION); - getComponent().setImage(ThemeManager.getThemeResource("images/Process16.png")); // 16*16 + if (ThemeManager.isUseFontIconForImage()) + getComponent().setIconSclass("z-icon-Process"); + else + getComponent().setImage(ThemeManager.getThemeResource("images/Process16.png")); // 16*16 } else if (columnName.equals("CreateFrom")) { - getComponent().setImage(ThemeManager.getThemeResource("images/Copy16.png")); // 16*16 + if (ThemeManager.isUseFontIconForImage()) + getComponent().setIconSclass("z-icon-CreateFrom"); + else + getComponent().setImage(ThemeManager.getThemeResource("images/Copy16.png")); // 16*16 } else if (columnName.equals("Record_ID")) { - getComponent().setImage(ThemeManager.getThemeResource("images/Zoom16.png")); // 16*16 + if (ThemeManager.isUseFontIconForImage()) + getComponent().setIconSclass("z-icon-Zoom"); + else + getComponent().setImage(ThemeManager.getThemeResource("images/Zoom16.png")); // 16*16 getComponent().setLabel(Msg.getMsg(Env.getCtx(), "ZoomDocument")); } else if (columnName.equals("Posted")) { readReference(REFERENCE_POSTED); - getComponent().setImage(ThemeManager.getThemeResource("images/InfoAccount16.png")); // 16*16 + if (ThemeManager.isUseFontIconForImage()) + getComponent().setIconSclass("z-icon-InfoAccount"); + else + getComponent().setImage(ThemeManager.getThemeResource("images/InfoAccount16.png")); // 16*16 } if (gridField.getColumnName().endsWith("_ID") && !gridField.getColumnName().equals("Record_ID")) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditorPopupMenu.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditorPopupMenu.java index 9457e4117a..beced98320 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditorPopupMenu.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WEditorPopupMenu.java @@ -180,7 +180,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener zoomItem = new Menuitem(); zoomItem.setAttribute(EVENT_ATTRIBUTE, ZOOM_EVENT); zoomItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Zoom")).intern()); - zoomItem.setImage(ThemeManager.getThemeResource("images/Zoom16.png")); + if (ThemeManager.isUseFontIconForImage()) + zoomItem.setIconSclass("z-icon-Zoom"); + else + zoomItem.setImage(ThemeManager.getThemeResource("images/Zoom16.png")); zoomItem.addEventListener(Events.ON_CLICK, this); this.appendChild(zoomItem); @@ -191,7 +194,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener requeryItem = new Menuitem(); requeryItem.setAttribute(EVENT_ATTRIBUTE, REQUERY_EVENT); requeryItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh")).intern()); - requeryItem.setImage(ThemeManager.getThemeResource("images/Refresh16.png")); + if (ThemeManager.isUseFontIconForImage()) + requeryItem.setIconSclass("z-icon-Refresh"); + else + requeryItem.setImage(ThemeManager.getThemeResource("images/Refresh16.png")); requeryItem.addEventListener(Events.ON_CLICK, this); this.appendChild(requeryItem); } @@ -201,7 +207,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener prefItem = new Menuitem(); prefItem.setAttribute(EVENT_ATTRIBUTE, PREFERENCE_EVENT); prefItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "ValuePreference")).intern()); - prefItem.setImage(ThemeManager.getThemeResource("images/VPreference16.png")); + if (ThemeManager.isUseFontIconForImage()) + prefItem.setIconSclass("z-icon-VPreference"); + else + prefItem.setImage(ThemeManager.getThemeResource("images/VPreference16.png")); prefItem.addEventListener(Events.ON_CLICK, this); this.appendChild(prefItem); } @@ -211,7 +220,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener newItem = new Menuitem(); newItem.setAttribute(EVENT_ATTRIBUTE, NEW_EVENT); newItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "New")).intern()); - newItem.setImage(ThemeManager.getThemeResource("images/New16.png")); + if (ThemeManager.isUseFontIconForImage()) + newItem.setIconSclass("z-icon-New"); + else + newItem.setImage(ThemeManager.getThemeResource("images/New16.png")); newItem.addEventListener(Events.ON_CLICK, this); this.appendChild(newItem); } @@ -222,7 +234,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener updateItem = new Menuitem(); updateItem.setAttribute(EVENT_ATTRIBUTE, UPDATE_EVENT); updateItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Update")).intern()); - updateItem.setImage(ThemeManager.getThemeResource("images/InfoBPartner16.png")); + if (ThemeManager.isUseFontIconForImage()) + updateItem.setIconSclass("z-icon-InfoBPartner"); + else + updateItem.setImage(ThemeManager.getThemeResource("images/InfoBPartner16.png")); updateItem.addEventListener(Events.ON_CLICK, this); this.appendChild(updateItem); } @@ -232,7 +247,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener showLocationItem = new Menuitem(); showLocationItem.setAttribute(EVENT_ATTRIBUTE, SHOWLOCATION_EVENT); showLocationItem.setLabel(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "ShowLocation")).intern()); - showLocationItem.setImage(ThemeManager.getThemeResource("images/InfoBPartner16.png")); + if (ThemeManager.isUseFontIconForImage()) + showLocationItem.setIconSclass("z-icon-InfoBPartner"); + else + showLocationItem.setImage(ThemeManager.getThemeResource("images/InfoBPartner16.png")); showLocationItem.addEventListener(Events.ON_CLICK, this); this.appendChild(showLocationItem); } @@ -264,6 +282,8 @@ public class WEditorPopupMenu extends Menupopup implements EventListener public void addSuggestion(final GridField field) { Menuitem editor = new Menuitem(Msg.getElement(Env.getCtx(), "AD_FieldSuggestion_ID")); + if (ThemeManager.isUseFontIconForImage()) + editor.setIconSclass("z-icon-FieldSuggestion"); editor.addEventListener(Events.ON_CLICK, new EventListener() { @Override public void onEvent(Event event) throws Exception { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WFileDirectoryEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WFileDirectoryEditor.java index 831425b897..d602244011 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WFileDirectoryEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WFileDirectoryEditor.java @@ -42,7 +42,10 @@ public class WFileDirectoryEditor extends WEditor public WFileDirectoryEditor(GridField gridField) { super(new FilenameBox(), gridField); - getComponent().setButtonImage(ThemeManager.getThemeResource("images/Open16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-Open"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/Open16.png")); getComponent().getButton().setUpload("false"); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WFilenameEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WFilenameEditor.java index cbf0bdd61d..187fe11da7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WFilenameEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WFilenameEditor.java @@ -48,7 +48,10 @@ public class WFilenameEditor extends WEditor public WFilenameEditor(GridField gridField) { super(new FilenameBox(), gridField); - getComponent().setButtonImage(ThemeManager.getThemeResource("images/Open16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-Open"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/Open16.png")); getComponent().addEventListener(Events.ON_UPLOAD, this); getComponent().getButton().setUpload(AdempiereWebUI.getUploadSetting()); getComponent().getButton().setAttribute("org.zkoss.zul.image.preload", Boolean.TRUE); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java index e9a116ecb3..5eaefa01a8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocationEditor.java @@ -88,7 +88,10 @@ public class WLocationEditor extends WEditor implements EventListener, Pr private void init() { - getComponent().setButtonImage(ThemeManager.getThemeResource("images/Location16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-Location"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/Location16.png")); popupMenu = new WEditorPopupMenu(false, false, isShowPreference()); popupMenu.addMenuListener(this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java index 0071db9dce..82e633b3fd 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WLocatorEditor.java @@ -96,7 +96,10 @@ public class WLocatorEditor extends WEditor implements EventListener, Pro setColumnName(columnName); m_mLocator = mLocator; - getComponent().setButtonImage(ThemeManager.getThemeResource("images/Locator16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-Locator"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/Locator16.png")); getComponent().getTextbox().setReadonly(true); m_WindowNo = windowNo; //Yvonne: move it b4 setDefault_Locator_ID() @@ -110,7 +113,10 @@ public class WLocatorEditor extends WEditor implements EventListener, Pro super(new EditorBox(), gridField); m_mLocator = (MLocatorLookup)gridField.getLookup(); - getComponent().setButtonImage(ThemeManager.getThemeResource("images/Locator16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-Locator"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/Locator16.png")); getComponent().getTextbox().setReadonly(true); setDefault_Locator_ID(); // set default locator, teo_sarca [ 1661546 ] diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java index 961af4c52c..90c30831d6 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPAttributeEditor.java @@ -69,7 +69,10 @@ public class WPAttributeEditor extends WEditor implements ContextMenuListener } private void initComponents() { - getComponent().setButtonImage(ThemeManager.getThemeResource("images/PAttribute16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-PAttribute"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/PAttribute16.png")); // getComponent().addEventListener(Events.ON_CLICK, this); // IDEMPIERE-426 - dup listener, already set at WEditor m_WindowNo = gridField.getWindowNo(); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java index 048132e961..b7d30d9fc0 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WPaymentEditor.java @@ -69,7 +69,10 @@ public class WPaymentEditor extends WEditor implements ListDataListener, Context getComponent().getCombobox().setAutocomplete(true); getComponent().getCombobox().setAutodrop(true); getComponent().getCombobox().addEventListener(Events.ON_BLUR, this); - getComponent().setButtonImage(ThemeManager.getThemeResource("images/Payment16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-Payment"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/Payment16.png")); getComponent().getButton().addActionListener(this); if (lookup != null) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java index 9a3ad5cbb1..56704c4a49 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WSearchEditor.java @@ -173,19 +173,31 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value if (columnName.equals("C_BPartner_ID")) { popupMenu = new WEditorPopupMenu(true, true, isShowPreference(), true, true, false, lookup); - imageUrl = ThemeManager.getThemeResource("images/BPartner16.png"); + if (ThemeManager.isUseFontIconForImage()) + imageUrl = "z-icon-BPartner"; + else + imageUrl = ThemeManager.getThemeResource("images/BPartner16.png"); } else if (columnName.equals("M_Product_ID")) { popupMenu = new WEditorPopupMenu(true, true, isShowPreference(), false, false, false, lookup); - imageUrl = ThemeManager.getThemeResource("images/Product16.png"); + if (ThemeManager.isUseFontIconForImage()) + imageUrl = "z-icon-Product"; + else + imageUrl = ThemeManager.getThemeResource("images/Product16.png"); } else { popupMenu = new WEditorPopupMenu(true, true, isShowPreference(), false, false, false, lookup); - imageUrl = ThemeManager.getThemeResource("images/PickOpen16.png"); + if (ThemeManager.isUseFontIconForImage()) + imageUrl = "z-icon-More"; + else + imageUrl = ThemeManager.getThemeResource("images/PickOpen16.png"); } - getComponent().getButton().setImage(imageUrl); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass(imageUrl); + else + getComponent().getButton().setImage(imageUrl); addChangeLogMenu(popupMenu); @@ -402,7 +414,10 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value private void resetButtonState() { getComponent().getButton().setEnabled(true); - getComponent().getButton().setImage(imageUrl); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass(imageUrl); + else + getComponent().getButton().setImage(imageUrl); getComponent().invalidate(); } @@ -943,9 +958,15 @@ public class WSearchEditor extends WEditor implements ContextMenuListener, Value super.onPageAttached(newpage, oldpage); if (newpage != null) { String w = "try{var btn=jq('#'+this.parent.uuid+' @button').zk.$();}catch(err){}"; - getTextbox().setWidgetListener("onChange", "try{"+w+"btn.setImage(\"" + if (ThemeManager.isUseFontIconForImage()) { + String sclass = "z-icon-spinner z-icon-spin"; + getTextbox().setWidgetListener("onChange", "try{"+w+"btn.setIconSclass('" + sclass + "');" + + "btn.setDisabled(true, {adbs: false, skip: false});}catch(err){}"); + } else { + getTextbox().setWidgetListener("onChange", "try{"+w+"btn.setImage(\"" + Executions.getCurrent().encodeURL(IN_PROGRESS_IMAGE)+"\");" + "btn.setDisabled(true, {adbs: false, skip: false});}catch(err){}"); + } } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WUrlEditor.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WUrlEditor.java index 46d86ac6b8..90f48a07e8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WUrlEditor.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/editor/WUrlEditor.java @@ -36,7 +36,10 @@ public class WUrlEditor extends WEditor implements ContextMenuListener public WUrlEditor(GridField gridField) { super(new Urlbox(), gridField); - getComponent().setButtonImage(ThemeManager.getThemeResource("images/Online16.png")); + if (ThemeManager.isUseFontIconForImage()) + getComponent().getButton().setIconSclass("z-icon-Online"); + else + getComponent().setButtonImage(ThemeManager.getThemeResource("images/Online16.png")); popupMenu = new WEditorPopupMenu(false, false, isShowPreference()); popupMenu.addMenuListener(this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/factory/ButtonFactory.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/factory/ButtonFactory.java index 3ed12cf91f..fc90992b08 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/factory/ButtonFactory.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/factory/ButtonFactory.java @@ -74,21 +74,30 @@ public class ButtonFactory { button.setLabel(text); if (withImage) { - button.setImage(ThemeManager.getThemeResource("images/"+name+"16.png")); + if (ThemeManager.isUseFontIconForImage()) + button.setIconSclass("z-icon-"+name); + else + button.setImage(ThemeManager.getThemeResource("images/"+name+"16.png")); } LayoutUtils.addSclass("txt-btn", button); } else { - button.setImage(ThemeManager.getThemeResource("images/"+name+"24.png")); + if (ThemeManager.isUseFontIconForImage()) + button.setIconSclass("z-icon-"+name); + else + button.setImage(ThemeManager.getThemeResource("images/"+name+"24.png")); + if (text != null) button.setTooltiptext(text); LayoutUtils.addSclass("img-btn", button); } - + //add named class for further customization option String className = "btn-" + name.toLowerCase(); LayoutUtils.addSclass(className, button); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("font-icon-button", button); return button; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java index 78eaa93aec..43cb1ea25e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/AbstractMenuPanel.java @@ -168,32 +168,50 @@ public abstract class AbstractMenuPanel extends Panel implements EventListener, Vbox box = new Vbox(); Checkbox report = new Checkbox(); - report.setImage(ThemeManager.getThemeResource("images/mReport.png")); + if (ThemeManager.isUseFontIconForImage()) + report.setIconSclass("z-icon-Report"); + else + report.setImage(ThemeManager.getThemeResource("images/mReport.png")); report.setChecked(true); report.setId("report"); report.addEventListener(Events.ON_CHECK, this); box.appendChild(report); Checkbox process = new Checkbox(); - process.setImage(ThemeManager.getThemeResource("images/mProcess.png")); + if (ThemeManager.isUseFontIconForImage()) + process.setIconSclass("z-icon-Process"); + else + process.setImage(ThemeManager.getThemeResource("images/mProcess.png")); process.setChecked(true); process.setId("process"); process.addEventListener(Events.ON_CHECK, this); box.appendChild(process); Checkbox workflow = new Checkbox(); - workflow.setImage(ThemeManager.getThemeResource("images/mWorkFlow.png")); + if (ThemeManager.isUseFontIconForImage()) + workflow.setIconSclass("z-icon-WorkFlow"); + else + workflow.setImage(ThemeManager.getThemeResource("images/mWorkFlow.png")); workflow.setChecked(true); workflow.setId("workflow"); workflow.addEventListener(Events.ON_CHECK, this); box.appendChild(workflow); Checkbox window = new Checkbox(); - window.setImage(ThemeManager.getThemeResource("images/mWindow.png")); + if (ThemeManager.isUseFontIconForImage()) + window.setIconSclass("z-icon-Window"); + else + window.setImage(ThemeManager.getThemeResource("images/mWindow.png")); window.setChecked(true); window.setId("window"); window.addEventListener(Events.ON_CHECK, this); box.appendChild(window); + + Checkbox form = new Checkbox(); + if (ThemeManager.isUseFontIconForImage()) + form.setIconSclass("z-icon-Form"); + else + form.setImage(ThemeManager.getThemeResource("images/mForm.png")); + form.setChecked(true); + form.setId("form"); + form.addEventListener(Events.ON_CHECK, this); + box.appendChild(form); Checkbox single = new Checkbox(); single.setLabel(Msg.getMsg(Env.getCtx(), "FlatView")); @@ -161,8 +183,6 @@ public class MenuTreeFilterPanel extends Popup implements EventListener, if (treeItem.getAttribute("menu.type") != null) { String menuType = (String) treeItem.getAttribute("menu.type"); - if (menuType.equals("form")) - menuType = "window"; // treat forms as windows on filtering the menu if (chk.isChecked()) { if (chk.getId().equals(menuType)) diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreePanel.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreePanel.java index ec7ff60abd..de252883e2 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreePanel.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/MenuTreePanel.java @@ -106,7 +106,10 @@ public class MenuTreePanel extends AbstractMenuPanel pc.appendChild(filterPanel); filterBtn = new Toolbarbutton(); - filterBtn.setImage(ThemeManager.getThemeResource("images/Preference16.png")); + if (ThemeManager.isUseFontIconForImage()) + filterBtn.setIconSclass("z-icon-Preference"); + else + filterBtn.setImage(ThemeManager.getThemeResource("images/Preference16.png")); filterBtn.addEventListener(Events.ON_CLICK, this); toolbar.appendChild(filterBtn); } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java index 81f52ead0c..0c38b31066 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/panel/WAttachment.java @@ -274,11 +274,17 @@ public class WAttachment extends Window implements EventListener bSave.setEnabled(false); bSave.setSclass("img-btn"); - bSave.setImage(ThemeManager.getThemeResource("images/Export24.png")); + if (ThemeManager.isUseFontIconForImage()) + bSave.setIconSclass("z-icon-Export"); + else + bSave.setImage(ThemeManager.getThemeResource("images/Export24.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/Import24.png")); bLoad.setSclass("img-btn"); bLoad.setId("bLoad"); // bLoad.setAttribute("org.zkoss.zul.image.preload", Boolean.TRUE); @@ -309,7 +315,10 @@ public class WAttachment extends Window implements EventListener bCancel.addEventListener(Events.ON_CLICK, this); bOk.addEventListener(Events.ON_CLICK, this); - bDeleteAll.setImage(ThemeManager.getThemeResource("images/Delete24.png")); + if (ThemeManager.isUseFontIconForImage()) + bDeleteAll.setIconSclass("z-icon-Delete"); + else + bDeleteAll.setImage(ThemeManager.getThemeResource("images/Delete24.png")); bDeleteAll.setSclass("img-btn"); bDeleteAll.addEventListener(Events.ON_CLICK, this); bDeleteAll.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "DeleteAll"))); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java index 0477fd0f16..f6e695ad2e 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/part/WindowContainer.java @@ -125,17 +125,28 @@ public class WindowContainer extends AbstractUIPart implements EventListener setSelectedTab(tabbox.getTabpanel(0).getLinkedTab())); toolbar.appendChild(homeButton); tabListBtn = new ToolBarButton(); - tabListBtn.setImage(ThemeManager.getThemeResource("images/expand-header.png")); + if (ThemeManager.isUseFontIconForImage()) + { + tabListBtn.setIconSclass("z-icon-Expand"); + } + else + { + tabListBtn.setImage(ThemeManager.getThemeResource("images/expand-header.png")); + } tabListBtn.setSclass("window-container-toolbar-btn"); tabListBtn.addEventListener(Events.ON_CLICK, evt -> showTabList()); tabListBtn.setVisible(false); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java index a0f04e182e..4795ed3050 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ITheme.java @@ -52,4 +52,6 @@ public interface ITheme { public static final String THEME_PREFERENCE = "/preference.zul"; public static final String USE_CSS_FOR_WINDOW_SIZE = "#THEME_USE_CSS_FOR_WINDOW_SIZE"; + + public static final String USE_FONT_ICON_FOR_IMAGE = "#THEME_USE_FONT_ICON_FOR_IMAGE"; } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java index 88b1977f6c..947173c6c8 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/theme/ThemeManager.java @@ -150,4 +150,8 @@ public final class ThemeManager { public static boolean isUseCSSForWindowSize() { return "Y".equals(Env.getContext(Env.getCtx(), ITheme.USE_CSS_FOR_WINDOW_SIZE)); } + + public static boolean isUseFontIconForImage() { + return "Y".equals(Env.getContext(Env.getCtx(), ITheme.USE_FONT_ICON_FOR_IMAGE)); + } } diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java index efdabf830b..92fce7496b 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/FindWindow.java @@ -425,13 +425,19 @@ public class FindWindow extends Window implements EventListener, ValueCha private void initAdvanced() { ToolBarButton btnNew = new ToolBarButton(); - btnNew.setImage(ThemeManager.getThemeResource("images/New24.png")); + if (ThemeManager.isUseFontIconForImage()) + btnNew.setIconSclass("z-icon-New"); + else + btnNew.setImage(ThemeManager.getThemeResource("images/New24.png")); btnNew.setAttribute("name", "btnNewAdv"); btnNew.addEventListener(Events.ON_CLICK, this); ToolBarButton btnDelete = new ToolBarButton(); btnDelete.setAttribute("name","btnDeleteAdv"); - btnDelete.setImage(ThemeManager.getThemeResource("images/Delete24.png")); + if (ThemeManager.isUseFontIconForImage()) + btnDelete.setIconSclass("z-icon-Delete"); + else + btnDelete.setImage(ThemeManager.getThemeResource("images/Delete24.png")); btnDelete.addEventListener(Events.ON_CLICK, this); Button btnOk = ButtonFactory.createNamedButton(ConfirmPanel.A_OK); @@ -559,10 +565,15 @@ public class FindWindow extends Window implements EventListener, ValueCha btnSave = new ToolBarButton(); btnSave.setAttribute("name","btnSaveAdv"); - btnSave.setImage(ThemeManager.getThemeResource("images/Save24.png")); + if (ThemeManager.isUseFontIconForImage()) + btnSave.setIconSclass("z-icon-Save"); + else + btnSave.setImage(ThemeManager.getThemeResource("images/Save24.png")); btnSave.addEventListener(Events.ON_CLICK, this); btnSave.setId("btnSave"); btnSave.setStyle("vertical-align: middle;"); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("large-toolbarbutton", btnSave); fQueryName = new Combobox(); fQueryName.setTooltiptext(Msg.getMsg(Env.getCtx(),"QueryName")); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/LoginWindow.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/LoginWindow.java index dbd925db7b..fd89c8c463 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/LoginWindow.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/LoginWindow.java @@ -32,6 +32,7 @@ import org.adempiere.webui.panel.ChangePasswordPanel; import org.adempiere.webui.panel.LoginPanel; import org.adempiere.webui.panel.ResetPasswordPanel; import org.adempiere.webui.panel.RolePanel; +import org.adempiere.webui.theme.ThemeManager; import org.compiere.model.MSysConfig; import org.compiere.model.MUser; import org.compiere.util.Env; @@ -39,9 +40,11 @@ import org.compiere.util.KeyNamePair; import org.compiere.util.Login; import org.zkoss.util.Locales; import org.zkoss.web.Attributes; +import org.zkoss.zk.ui.Executions; import org.zkoss.zk.ui.event.Event; import org.zkoss.zk.ui.event.EventListener; import org.zkoss.zk.ui.event.Events; +import org.zkoss.zk.ui.metainfo.PageDefinition; import org.zkoss.zk.ui.util.Clients; /** @@ -180,6 +183,11 @@ public class LoginWindow extends FWindow implements EventListener public void changeRole(Locale locale, Properties ctx) { Env.setCtx(ctx); + + //reload theme preference + PageDefinition pageDefintion = Executions.getCurrent().getPageDefinition(ThemeManager.getThemeResource("preference.zul")); + Executions.createComponents(pageDefintion, this, null); + getDesktop().getSession().setAttribute(Attributes.PREFERRED_LOCALE, locale); Locales.setThreadLocal(locale); Login login = new Login(Env.getCtx()); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java index 92c49e520b..3ba2df914d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WAccountDialog.java @@ -25,6 +25,7 @@ import java.util.logging.Level; import org.adempiere.util.Callback; import org.adempiere.webui.ClientInfo; +import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.adwindow.ADTabpanel; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.component.ConfirmPanel; @@ -221,15 +222,30 @@ public final class WAccountDialog extends Window toolBar.setStyle("border: none; padding: 5px"); ZKUpdateUtil.setHflex(toolBar, "min"); - bSave.setImage(ThemeManager.getThemeResource("images/Save24.png")); + if (ThemeManager.isUseFontIconForImage()) + bSave.setIconSclass("z-icon-Save"); + else + bSave.setImage(ThemeManager.getThemeResource("images/Save24.png")); bSave.setTooltiptext(Msg.getMsg(Env.getCtx(),"AccountNewUpdate")); bSave.addEventListener(Events.ON_CLICK, this); - bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh24.png")); + if (ThemeManager.isUseFontIconForImage()) + bRefresh.setIconSclass("z-icon-Refresh"); + else + bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh24.png")); bRefresh.setTooltiptext(Msg.getMsg(Env.getCtx(),"Refresh")); bRefresh.addEventListener(Events.ON_CLICK, this); - bIgnore.setImage(ThemeManager.getThemeResource("images/Ignore24.png")); + if (ThemeManager.isUseFontIconForImage()) + bIgnore.setIconSclass("z-icon-Ignore"); + else + bIgnore.setImage(ThemeManager.getThemeResource("images/Ignore24.png")); bIgnore.setTooltiptext(Msg.getMsg(Env.getCtx(),"Ignore")); bIgnore.addEventListener(Events.ON_CLICK, this); + if (ThemeManager.isUseFontIconForImage()) + { + LayoutUtils.addSclass("medium-toolbarbutton", bSave); + LayoutUtils.addSclass("medium-toolbarbutton", bRefresh); + LayoutUtils.addSclass("medium-toolbarbutton", bIgnore); + } // toolBar.appendChild(bRefresh); toolBar.appendChild(bIgnore); @@ -286,6 +302,7 @@ public final class WAccountDialog extends Window this.setClosable(false); this.setSizable(true); + this.setMaximizable(true); this.setSclass("account-dialog"); if (ClientInfo.isMobile()) { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java index 276d742547..ce65b771ee 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WEMailDialog.java @@ -34,6 +34,7 @@ import javax.activation.DataSource; import org.adempiere.webui.AdempiereWebUI; import org.adempiere.webui.ClientInfo; +import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.component.AttachmentItem; import org.adempiere.webui.component.Button; import org.adempiere.webui.component.Checkbox; @@ -345,11 +346,16 @@ public class WEMailDialog extends Window implements EventListener, ValueC confirmPanel.addActionListener(this); Button btn = new Button(); - btn.setImage(ThemeManager.getThemeResource("images/Attachment24.png")); + 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); btn.setTooltiptext(Msg.getMsg(Env.getCtx(), "Attachment")); confirmPanel.addComponentsLeft(btn); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("large-toolbarbutton", btn); bAddDefaultMailText = new Button(); bAddDefaultMailText.setImage(ThemeManager.getThemeResource("images/DefaultMailText.png")); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldRecordInfo.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldRecordInfo.java index f138924091..92c7ff6c10 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldRecordInfo.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WFieldRecordInfo.java @@ -383,7 +383,10 @@ public class WFieldRecordInfo extends Window implements EventListener public static void addMenu(WEditorPopupMenu popupMenu) { Menuitem changeLogItem = new Menuitem(); changeLogItem.setLabel(Msg.getElement(Env.getCtx(), "AD_ChangeLog_ID")); - changeLogItem.setImage(ThemeManager.getThemeResource("images/ChangeLog16.png")); + if (ThemeManager.isUseFontIconForImage()) + changeLogItem.setIconSclass("z-icon-ChangeLog"); + else + changeLogItem.setImage(ThemeManager.getThemeResource("images/ChangeLog16.png")); changeLogItem.setAttribute(WEditorPopupMenu.EVENT_ATTRIBUTE, WEditorPopupMenu.CHANGE_LOG_EVENT); changeLogItem.addEventListener(Events.ON_CLICK, popupMenu); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java index 94ab9b2a06..ac9993ac8d 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/WPreference.java @@ -16,6 +16,7 @@ package org.adempiere.webui.window; import java.util.logging.Level; import org.adempiere.webui.ClientInfo; +import org.adempiere.webui.LayoutUtils; import org.adempiere.webui.apps.AEnv; import org.adempiere.webui.component.ToolBar; import org.adempiere.webui.component.ToolBarButton; @@ -129,11 +130,16 @@ public class WPreference extends WQuickEntry implements EventListener { this.appendChild(toolbar); ToolBarButton btn = new ToolBarButton(""); btn.setName("btnSave"); - btn.setImage(ThemeManager.getThemeResource("images/Save24.png")); + if (ThemeManager.isUseFontIconForImage()) + btn.setIconSclass("z-icon-Save"); + else + btn.setImage(ThemeManager.getThemeResource("images/Save24.png")); btn.setTooltiptext(Msg.getMsg(Env.getCtx(),"Save")); btn.addEventListener(Events.ON_CLICK, this); toolbar.appendChild(btn); toolbar.setStyle("border: none"); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("large-toolbarbutton", btn); div = new Div(); div.setStyle("background-color: transparent !important; border: none; margin: 5px;"); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java index f95bbdd4c9..376cf2614c 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkJRViewer.java @@ -191,7 +191,10 @@ public class ZkJRViewer extends Window implements EventListener, ITabOnCl // Added BY Martin - Ntier Software Services 09/10/2013 toolbar.appendChild(new Separator("vertical")); bSendMail.setName("SendMail"); // ?? Msg - bSendMail.setImage(ThemeManager.getThemeResource("images/SendMail24.png")); + if (ThemeManager.isUseFontIconForImage()) + bSendMail.setIconSclass("z-icon-SendMail"); + else + bSendMail.setImage(ThemeManager.getThemeResource("images/SendMail24.png")); bSendMail.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "SendMail"))); toolbar.appendChild(bSendMail); bSendMail.addEventListener(Events.ON_CLICK, this); diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java index bc181177e8..53c0fdcdfa 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/window/ZkReportViewer.java @@ -122,7 +122,6 @@ import org.zkoss.zul.Vlayout; import org.zkoss.zul.impl.Utils; import org.zkoss.zul.impl.XulElement; - /** * Print View Frame * @@ -393,7 +392,10 @@ public class ZkReportViewer extends Window implements EventListener, ITab } bCustomize.setName("Customize"); - bCustomize.setImage(ThemeManager.getThemeResource("images/Preference24.png")); + if (ThemeManager.isUseFontIconForImage()) + bCustomize.setIconSclass("z-icon-Preference"); + else + bCustomize.setImage(ThemeManager.getThemeResource("images/Preference24.png")); bCustomize.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "PrintCustomize"))); if (toolbarPopup != null) { @@ -403,11 +405,14 @@ public class ZkReportViewer extends Window implements EventListener, ITab else toolBar.appendChild(bCustomize); bCustomize.addEventListener(Events.ON_CLICK, this); - - + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton", bCustomize); bFind.setName("Find"); - bFind.setImage(ThemeManager.getThemeResource("images/Find24.png")); + if (ThemeManager.isUseFontIconForImage()) + bFind.setIconSclass("z-icon-Find"); + else + bFind.setImage(ThemeManager.getThemeResource("images/Find24.png")); bFind.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Find"))); bFind.addEventListener(Events.ON_CLICK, this); if (getAD_Tab_ID(m_reportEngine.getPrintFormat().getAD_Table_ID()) <= 0) { @@ -424,9 +429,14 @@ public class ZkReportViewer extends Window implements EventListener, ITab toolBar.appendChild(bFind); toolBar.appendChild(new Separator("vertical")); } + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton", bFind); bSendMail.setName("SendMail"); - bSendMail.setImage(ThemeManager.getThemeResource("images/SendMail24.png")); + if (ThemeManager.isUseFontIconForImage()) + bSendMail.setIconSclass("z-icon-SendMail"); + else + bSendMail.setImage(ThemeManager.getThemeResource("images/SendMail24.png")); bSendMail.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "SendMail"))); if (toolbarPopup != null) { @@ -436,9 +446,14 @@ public class ZkReportViewer extends Window implements EventListener, ITab else toolBar.appendChild(bSendMail); bSendMail.addEventListener(Events.ON_CLICK, this); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton", bSendMail); bArchive.setName("Archive"); - bArchive.setImage(ThemeManager.getThemeResource("images/Archive24.png")); + if (ThemeManager.isUseFontIconForImage()) + bArchive.setIconSclass("z-icon-Archive"); + else + bArchive.setImage(ThemeManager.getThemeResource("images/Archive24.png")); bArchive.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Archive"))); if (toolbarPopup != null) { @@ -448,11 +463,16 @@ public class ZkReportViewer extends Window implements EventListener, ITab else toolBar.appendChild(bArchive); bArchive.addEventListener(Events.ON_CLICK, this); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton", bArchive); if ( m_isCanExport ) { bExport.setName("Export"); - bExport.setImage(ThemeManager.getThemeResource("images/Export24.png")); + if (ThemeManager.isUseFontIconForImage()) + bExport.setIconSclass("z-icon-Export"); + else + bExport.setImage(ThemeManager.getThemeResource("images/Export24.png")); bExport.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Export"))); if (toolbarPopup != null) { @@ -462,13 +482,18 @@ public class ZkReportViewer extends Window implements EventListener, ITab else toolBar.appendChild(bExport); bExport.addEventListener(Events.ON_CLICK, this); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton", bExport); } if (toolbarPopup == null) toolBar.appendChild(new Separator("vertical")); bRefresh.setName("Refresh"); - bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh24.png")); + if (ThemeManager.isUseFontIconForImage()) + bRefresh.setIconSclass("z-icon-Refresh"); + else + bRefresh.setImage(ThemeManager.getThemeResource("images/Refresh24.png")); bRefresh.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Refresh"))); if (toolbarPopup != null) { @@ -478,8 +503,13 @@ public class ZkReportViewer extends Window implements EventListener, ITab else toolBar.appendChild(bRefresh); bRefresh.addEventListener(Events.ON_CLICK, this); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton", bRefresh); - bWizard.setImage(ThemeManager.getThemeResource("images/Wizard24.png")); + if (ThemeManager.isUseFontIconForImage()) + bWizard.setIconSclass("z-icon-Wizard"); + else + bWizard.setImage(ThemeManager.getThemeResource("images/Wizard24.png")); bWizard.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "PrintWizard"))); if (toolbarPopup != null) { @@ -489,13 +519,19 @@ public class ZkReportViewer extends Window implements EventListener, ITab else toolBar.appendChild(bWizard); bWizard.addEventListener(Events.ON_CLICK, this); + if (ThemeManager.isUseFontIconForImage()) + LayoutUtils.addSclass("medium-toolbarbutton", bWizard); if (toolbarPopup != null) { ToolBarButton more = new ToolBarButton(); - more.setImage(ThemeManager.getThemeResource("images/expand-header.png")); - more.setStyle("float: right;"); + if (ThemeManager.isUseFontIconForImage()) + more.setIconSclass("z-icon-Expand"); + else + more.setImage(ThemeManager.getThemeResource("images/expand-header.png")); +// more.setStyle("float: right;"); toolBar.appendChild(more); + LayoutUtils.addSclass("space-between-content", toolBar); more.addEventListener(Events.ON_CLICK, evt -> { toolbarPopup.open(more, "before_end"); }); diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/adwindow.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/adwindow.css.dsp index aec6d32acd..09c799ea7c 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/adwindow.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/adwindow.css.dsp @@ -3,8 +3,6 @@ <%-- breadcrumb --%> .breadcrumb-toolbar-button { background-color: transparent; - display:inline-block; - width: 22px; height: 22px; } .breadcrumb-toolbar-button img { @@ -14,6 +12,10 @@ .breadcrumb-record-info { font-size: 12px; } +.breadcrumb-toolbar-button [class^="z-icon-"] { + padding-left: 4px; + padding-right: 4px; +} .adwindow-form > .z-grid-body { background-color: #F9F9F9; @@ -77,7 +79,7 @@ .adwindow-toolbar { border: 0px; padding: 2px 4px; - height: 30px; + height: 36px; background-image: none; background-color: #fff; } diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/application-menu.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/application-menu.css.dsp index 6219bc9647..f64d464ad3 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/application-menu.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/application-menu.css.dsp @@ -149,3 +149,32 @@ } } +.menu-href [class^="z-icon-"] { + font-size: larger; + color: #333; + padding-right: 4px; + text-align: center; +} +.menu-href [class^="z-icon-"]:before { + width: 14px; +} +.menu-href-newbtn.z-toolbarbutton [class^="z-icon-"] { + font-size: smaller; + color: #333; +} +.menu-href-newbtn.z-toolbarbutton, +.menu-href-newbtn.z-toolbarbutton .z-toolbarbutton-content { + justify-content: center; + align-items: center; + display: inline-flex; +} + +.menu-search-list-toolbar-cell.z-listcell > div.z-listcell-content { + display: inline-flex; + align-items: center; + justify-content: center; +} +.menu-search-list-toolbar-cell.z-listcell .fav-new-btn.z-toolbarbutton [class^="z-icon-"] { + font-size: larger; +} + diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/button.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/button.css.dsp index 2e8d143cc8..5cf2102cfd 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/button.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/button.css.dsp @@ -109,3 +109,33 @@ border: solid 1px #bbb; text-shadow: 0px 1px 2px #888; } + +.z-button [class^="z-icon-"], +.z-button-os [class^="z-icon-"]{ + font-size: larger; + color: #333; + padding-left: 2px; + padding-right: 2px; +} +.z-button.xlarge-toolbarbutton [class^="z-icon-"] { + font-size: 24px; +} +.z-button.large-toolbarbutton [class^="z-icon-"] { + font-size: 20px; +} +.z-button.medium-toolbarbutton [class^="z-icon-"] { + font-size: 16px; +} +.z-button.small-toolbarbutton [class^="z-icon-"] { + font-size: 12px; +} +.z-button { + vertical-align: middle; + text-align: center; +} +.btn-ok.z-button [class^="z-icon-"]:before { + color: green; +} +.btn-cancel.z-button [class^="z-icon-"]:before { + color: red; +} \ No newline at end of file diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/desktop.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/desktop.css.dsp index aab47071bc..117cb7266b 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/desktop.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/desktop.css.dsp @@ -234,9 +234,21 @@ } <%-- window container --%> -.window-container-toolbar-btn .z-toolbarbutton-content img { +.window-container-toolbar-btn.z-toolbarbutton .z-toolbarbutton-content img { width: 16px; height: 16px; padding: 3px 3px; } - +.window-container-toolbar-btn.z-toolbarbutton .z-toolbarbutton-content [class^="z-icon"] { + width: 22px; + height: 22px; + padding: 3px 3px; +} +.window-container-toolbar > .z-toolbar-content, +.window-container-toolbar-btn.z-toolbarbutton, +.window-container-toolbar-btn.z-toolbarbutton .z-toolbarbutton-content, +.window-container-toolbar-btn.z-toolbarbutton .z-toolbarbutton-content [class^="z-icon"] { + display:inline-flex; + align-items: center; + justify-content: center; +} diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/font-icons.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/font-icons.css.dsp new file mode 100644 index 0000000000..72ef762637 --- /dev/null +++ b/org.adempiere.ui.zk/theme/default/css/fragment/font-icons.css.dsp @@ -0,0 +1,281 @@ +.z-icon-Account:before { + content: "\f12e"; +} +.z-icon-Archive:before { + content: "\f187"; +} +.z-icon-Assignment:before { + content: "\f0cb"; +} +.z-icon-Attachment:before { + content: "\f0c6"; +} +.z-icon-BPartner:before { + content: "\f007"; +} +.z-icon-Calculator:before { + content: "\f1ec"; +} +.z-icon-Cancel:before { + content: "\f00d"; +} +.z-icon-ChangeLog:before { + content: "\f017"; + font-weight: bold; +} +.z-icon-Chat:before { + content: "\f0e6"; +} +.z-icon-Copy:before { + content: "\f0c5"; +} +.z-icon-Customize:before { + content: "\f0db"; +} +.z-icon-Delete:before { + font-weight: bold; + content: "\f068"; +} +.z-icon-Detail:before { + content: "\f0d7"; +} +.z-icon-Edit:before { + content: "\f044"; +} +.z-icon-ErrorMessageBox:before { + content: "\f057"; + font-size: 32px; + color: red; + font-family: FontAwesome; +} +.z-icon-ExclamationMessageBox:before { + content: "\f06a"; + font-size: 32px; + color: yellow; + font-family: FontAwesome; +} +.z-icon-Expand:before { + content: "\f0d7"; +} +.z-icon-Export:before { + content: "\f0ed"; +} +.z-icon-FieldSuggestion:before { + content: "\f0e5"; +} +.z-icon-FileImport:before { + content: "\f0ee"; +} +.z-icon-Find:before { + content: "\f002"; +} +.z-icon-FirstRecord:before { + content: "\f048"; +} +.z-icon-Folder:before { + content: "\f07c"; +} +.z-icon-Form:before { + content: "\f00b"; +} +.z-icon-Help:before { + content: "\f059"; +} +.z-icon-History:before { + content: "\f1da"; +} +.z-icon-Home:before { + content: "\f015"; +} +.z-icon-Ignore:before { + content: "\f0e2"; +} +.z-icon-Import:before { + content: "\f0ee"; +} +.z-icon-Info:before { + content: "\f0eb"; +} +.z-icon-InfoAccount:before { + content: "\f02d"; +} +.z-icon-InfoAsset:before { + content: "\f0b1"; +} +.z-icon-InfoBPartner:before { + content: "\f0c0"; +} +.z-icon-InfoMessageBox:before { + content: "\f05a"; + font-size: 32px; + color: blue; + font-family: FontAwesome; +} +.z-icon-InfoInOut:before { + content: "\f0d1"; +} +.z-icon-InfoInvoice:before { + content: "\f14b"; +} +.z-icon-InfoOrder:before { + content: "\f0c9"; +} +.z-icon-InfoPayment:before { + content: "\f0d6"; +} +.z-icon-InfoProduct:before { + content: "\f07a"; +} +.z-icon-InfoResource:before { + content: "\f0eb"; +} +.z-icon-InfoSchedule:before { + content: "\f017"; +} +.z-icon-LastRecord:before { + content: "\f051"; +} +.z-icon-Location:before { + content: "\f036"; +} +.z-icon-Locator:before { + content: "\f233"; +} +.z-icon-Lock:before { + content: "\f13e"; +} +.z-icon-LockX:before { + content: "\f023"; +} +.z-icon-More:before { + content: "\f142"; +} +.z-icon-MoveDown:before { + content: "\f0d7"; +} +.z-icon-MoveLeft:before { + content: "\f0d9"; +} +.z-icon-MoveRight:before { + content: "\f0da"; +} +.z-icon-MoveUp:before { + content: "\f0d8"; +} +.z-icon-Multi:before { + content: "\f0ce"; +} +.z-icon-New:before { + content: "\f067"; +} +.z-icon-Next:before { + content: "\f0da"; +} +.z-icon-NextRecord:before { + content: "\f061"; +} +.z-icon-Notice:before { + font-weight: bold; + content: "\f01c"; +} +.z-icon-Ok:before { + content: "\f00c"; +} +.z-icon-Online:before { + content: "\f0ac"; +} +.z-icon-Open:before { + content: "\f016"; +} +.z-icon-Parent:before { + content: "\f0d8"; +} +.z-icon-PAttribute:before { + content: "\f02b"; +} +.z-icon-Payment:before { + content: "\f0d6"; +} +.z-icon-PostIt:before { + content: "\f15c"; +} +.z-icon-Preference:before { + content: "\f085"; +} +.z-icon-Previous:before { + content: "\f0d9"; +} +.z-icon-PreviousRecord:before { + content: "\f060"; +} +.z-icon-Print:before { + content: "\f02f"; +} +.z-icon-Process:before { + content: "\f013"; +} +.z-icon-Product:before { + content: "\f07a"; +} +.z-icon-QuestionMessageBox:before { + content: "\f059"; + font-size: 32px; + color: green; + font-family: FontAwesome; +} +.z-icon-Request:before { + content: "\f046"; +} +.z-icon-Refresh:before { + content: "\f021"; +} +.z-icon-Report:before { + content: "\f1ea"; +} +.z-icon-Reset:before { + content: "\f0e2"; +} +.z-icon-Save:before { + content: "\f0c7"; +} +.z-icon-SaveCreate:before { + content: "\f0fe"; +} +.z-icon-Search:before { + content: "\f002"; +} +.z-icon-SendMail:before { + content: "\f003"; +} +.z-icon-Single:before { + content: "\f044"; +} +.z-icon-Task:before { + content: "\f0ae"; +} +.z-icon-Trash:before { + content: "\f014"; +} +.z-icon-UnprocessedDoc:before { + content: "\f044"; +} +.z-icon-VPreference:before { + content: "\f039"; +} +.z-icon-Window:before { + content: "\f022"; +} +.z-icon-WorkFlow:before { + content: "\f126"; +} +.z-icon-Zoom:before { + content: "\f14c"; +} + +.z-icon-Request:before { + content: "\f046"; +} + +.z-icon-WorkFlow:before { + content: "\f126"; +} diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/gadget.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/gadget.css.dsp index 65b4494ea9..3ea0549bde 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/gadget.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/gadget.css.dsp @@ -94,6 +94,10 @@ .favourites-box .z-toolbar-start { float: right; } +.favourites-box .trash-font-icon { + font-family: FontAwesome; + font-size: 20px; +} .recentitems-box { width: 100%; @@ -109,6 +113,20 @@ .recentitems-box .z-toolbar-start { float: right; } +.recentitems-box A.trash-toolbarbutton { + display: inline-block; +} +.recentitems-box .z-toolbar .z-toolbar-content { + display: inline-flex; + align-items: center; +} +.recentitems-box .trash-toolbarbutton .z-toolbarbutton-content { + font-size: 16px; +} +.recentitems-box .trash-font-icon { + font-family: FontAwesome; + font-size: 20px; +} .views-box { width: 100%; @@ -129,6 +147,12 @@ height: 16px; width: 16px; } +.views-box .z-toolbarbutton [class^="z-icon"] { + text-align: center; +} +.views-box .z-toolbarbutton [class^="z-icon"]:before { + width: 14px; +} .activities-box { width: 100%; @@ -194,3 +218,10 @@ font-size: 11px; font-weight: normal; } + +.fav-new-btn.z-toolbarbutton [class^="z-icon-"] { + font-size: smaller; + color: #333; + padding-left: 4px; + padding-right: 4px; +} diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/grid.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/grid.css.dsp index ed1e464db6..6dbe7ededb 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/grid.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/grid.css.dsp @@ -13,6 +13,12 @@ background-size: 16px 16px; cursor: pointer; } +.z-grid tbody tr.grid-inactive-row span.row-indicator-selected.z-icon-Edit, +.z-grid tbody tr.highlight span.row-indicator-selected.z-icon-Edit { + font-family: FontAwesome; + font-size: larger; + color: #333; +} .z-grid tbody tr.highlight td.z-cell { background-color: #FFFFCC !important; @@ -43,6 +49,7 @@ div.z-column-cnt, div.z-grid-header div.z-auxheader-cnt { text-overflow: ellipsis; display: inline-block; width: 100%; + vertical-align: middle; } .z-listcell > div.z-listcell-content { diff --git a/org.adempiere.ui.zk/theme/default/css/fragment/toolbar.css.dsp b/org.adempiere.ui.zk/theme/default/css/fragment/toolbar.css.dsp index 53f0edf36e..bf7c01f100 100644 --- a/org.adempiere.ui.zk/theme/default/css/fragment/toolbar.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/fragment/toolbar.css.dsp @@ -7,12 +7,11 @@ } .z-toolbarbutton-content { - padding: 0px; + padding: 0px 3px; } .toolbar-button { - background-color: transparent; - display:inline-block; + background-color: transparent; margin-left: 1px; margin-right: 1px; width: 28px; @@ -24,8 +23,7 @@ width: 24px; height: 24px; padding: 1px; - border: none; - display: inline-block; + border: none; } .depressed img { @@ -44,3 +42,53 @@ .z-toolbar-start{ width:100%; } + +.z-toolbarbutton [class^="z-icon-"] { + font-size: larger; + color: inherit; +} +.z-toolbarbutton.toolbarbutton-with-text [class^="z-icon-"] { + padding-right: 4px; +} +.z-toolbarbutton.xlarge-toolbarbutton [class^="z-icon-"] { + font-size: 24px; +} +.z-toolbarbutton.large-toolbarbutton [class^="z-icon-"] { + font-size: 20px; +} +.z-toolbarbutton.medium-toolbarbutton [class^="z-icon-"] { + font-size: 16px; +} +.z-toolbarbutton.small-toolbarbutton [class^="z-icon-"] { + font-size: 12px; +} +.z-toolbarbutton, .z-toolbarbutton .z-toolbarbutton-content { + display:inline-flex; + align-items: center; +} +.z-toolbar-content { + display:flex; + align-items: center; +} +.z-toolbar.space-between-content .z-toolbar-content { + justify-content: space-between; +} + +.font-icon-toolbar-button.toolbar-button [class^="z-icon-"] { + font-size: 18px; + color: inherit; +} +.font-icon-toolbar-button.toolbar-button { + color :#333; +} +.font-icon-toolbar-button.toolbar-button, .font-icon-toolbar-button.toolbar-button .z-toolbarbutton-content { + display:inline-flex; + align-items: center; + justify-content: center; +} +.font-icon-toolbar-button:active, .font-icon-toolbar-button:hover { + color: #3949AB; +} +.font-icon-toolbar-button .z-toolbarbutton-content { + color: inherit; +} diff --git a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp index 520033a618..9ba9dd0525 100644 --- a/org.adempiere.ui.zk/theme/default/css/theme.css.dsp +++ b/org.adempiere.ui.zk/theme/default/css/theme.css.dsp @@ -89,3 +89,5 @@ table.z-vbox > tbody > tr > td > table { + + diff --git a/org.adempiere.ui.zk/theme/default/preference.zul b/org.adempiere.ui.zk/theme/default/preference.zul index 64393dbb7e..19eb44e2e0 100644 --- a/org.adempiere.ui.zk/theme/default/preference.zul +++ b/org.adempiere.ui.zk/theme/default/preference.zul @@ -9,11 +9,13 @@ diff --git a/org.adempiere.ui.zk/theme/default/zul/calendar/calendar.css b/org.adempiere.ui.zk/theme/default/zul/calendar/calendar.css index 97fa12f460..99dd284023 100644 --- a/org.adempiere.ui.zk/theme/default/zul/calendar/calendar.css +++ b/org.adempiere.ui.zk/theme/default/zul/calendar/calendar.css @@ -113,9 +113,8 @@ border-width: 5px; height: 0; width: 0; - top: 4px; - left: 5px; position: absolute; + left: 0px; font-size: 0; line-height: 0; } @@ -125,8 +124,6 @@ border-width: 5px; height: 0; width: 0; - top: 4px; - left: 11px; position: absolute; font-size: 0; line-height: 0; diff --git a/org.adempiere.ui.zk/theme/default/zul/calendar/calendar_mini.zul b/org.adempiere.ui.zk/theme/default/zul/calendar/calendar_mini.zul index a35314457c..e747e4f244 100644 --- a/org.adempiere.ui.zk/theme/default/zul/calendar/calendar_mini.zul +++ b/org.adempiere.ui.zk/theme/default/zul/calendar/calendar_mini.zul @@ -13,7 +13,7 @@
- +