IDEMPIERE-3535 Implement font icon theme

This commit is contained in:
Heng Sin Low 2017-11-03 06:56:57 +08:00
parent 0da7db834f
commit c0e13c7321
62 changed files with 1133 additions and 167 deletions

View File

@ -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
;

View File

@ -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
;

View File

@ -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

View File

@ -126,7 +126,7 @@ public class AdempiereWebUI extends Window implements EventListener<Event>, IWeb
m_URLParameters = new ConcurrentHashMap<String, String[]>(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<Event>, IWeb
loginDesktop.createPart(this.getPage());
loginDesktop.changeRole(locale, properties);
loginDesktop.getComponent().getRoot().addEventListener(Events.ON_CLIENT_INFO, this);
}
/**

View File

@ -103,7 +103,10 @@ public class WRequest implements EventListener<Event>
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);
//

View File

@ -297,18 +297,27 @@ public class ADWindowToolbar extends FToolbar implements EventListener<Event>
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);

View File

@ -387,7 +387,10 @@ public class BreadCrumb extends Div implements EventListener<Event> {
{
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");

View File

@ -273,8 +273,11 @@ public class DetailPane extends Panel implements EventListener<Event>, 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<Event>() {
@Override
@ -288,7 +291,10 @@ public class DetailPane extends Panel implements EventListener<Event>, 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<Event>() {
@Override
@ -300,7 +306,10 @@ public class DetailPane extends Panel implements EventListener<Event>, 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<Event>() {
@Override
@ -313,7 +322,10 @@ public class DetailPane extends Panel implements EventListener<Event>, 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<Event>() {
@Override
@ -328,7 +340,10 @@ public class DetailPane extends Panel implements EventListener<Event>, 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<Event>() {
@Override

View File

@ -480,6 +480,9 @@ public class GridTabRowRenderer implements RowRenderer<Object[]>, 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<Object[]>, 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();

View File

@ -177,7 +177,10 @@ public class MenuSearchController implements EventListener<Event>{
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<Event>{
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<Event>{
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<Event>{
}
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<Event>{
}
cell.appendChild(starBtn);
starBtn.addEventListener(Events.ON_CLICK, MenuSearchController.this);
starBtn.setSclass("fav-new-btn");
}
}
}

View File

@ -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();

View File

@ -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);

View File

@ -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");

View File

@ -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")));

View File

@ -133,8 +133,14 @@ public class WWFActivity extends ADForm implements EventListener<Event>
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<Event>
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);

View File

@ -185,12 +185,35 @@ public class Messagebox extends Window implements EventListener<Event>
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");

View File

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

View File

@ -95,12 +95,24 @@ public class DPFavourites extends DashboardPanel implements EventListener<Event>
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<Event>
}
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<Event>
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<Event>
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<Event>
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<Event>
{
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<Event>
}
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<Event>
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";
}
}

View File

@ -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<Event
Toolbar recentItemsToolbar = new Toolbar();
this.appendChild(recentItemsToolbar);
Image imgr = new Image(ThemeManager.getThemeResource("images/Refresh24.png"));
recentItemsToolbar.appendChild(imgr);
imgr.setStyle("text-align: right; cursor: pointer; width:24px; height:24px;");
imgr.setTooltiptext(Util.cleanAmp(Msg.getMsg(ctx, "Refresh")));
imgr.addEventListener(Events.ON_CLICK, this);
if (ThemeManager.isUseFontIconForImage())
{
ToolBarButton btn = new ToolBarButton();
btn.setIconSclass("z-icon-Refresh");
btn.setSclass("trash-toolbarbutton");
recentItemsToolbar.appendChild(btn);
btn.setTooltiptext(Util.cleanAmp(Msg.getMsg(ctx, "Refresh")));
btn.addEventListener(Events.ON_CLICK, this);
}
else
{
Image imgr = new Image(ThemeManager.getThemeResource("images/Refresh24.png"));
recentItemsToolbar.appendChild(imgr);
imgr.setStyle("text-align: right; cursor: pointer; width:24px; height:24px;");
imgr.setTooltiptext(Util.cleanAmp(Msg.getMsg(ctx, "Refresh")));
imgr.addEventListener(Events.ON_CLICK, this);
}
//
Image img = new Image(ThemeManager.getThemeResource("images/Delete24.png"));
recentItemsToolbar.appendChild(img);
img.setStyle("text-align: right; width:24px; height:24px;");
img.setDroppable(DELETE_RECENTITEMS_DROPPABLE);
img.setTooltiptext(Util.cleanAmp(Msg.getMsg(ctx, "Delete")));
img.addEventListener(Events.ON_DROP, this);
if (ThemeManager.isUseFontIconForImage())
{
Label deleteLabel = new Label();
recentItemsToolbar.appendChild(deleteLabel);
deleteLabel.setSclass("z-icon-Trash trash-font-icon");
deleteLabel.setTooltiptext(Util.cleanAmp(Msg.getMsg(Env.getCtx(), "Delete")));
deleteLabel.setDroppable(DELETE_RECENTITEMS_DROPPABLE);
deleteLabel.addEventListener(Events.ON_DROP, this);
}
else
{
Image img = new Image(ThemeManager.getThemeResource("images/Delete24.png"));
recentItemsToolbar.appendChild(img);
img.setStyle("text-align: right; width:24px; height:24px;");
img.setDroppable(DELETE_RECENTITEMS_DROPPABLE);
img.setTooltiptext(Util.cleanAmp(Msg.getMsg(ctx, "Delete")));
img.addEventListener(Events.ON_DROP, this);
}
//
createTopicSubscriber();
@ -171,7 +197,7 @@ public class DPRecentItems extends DashboardPanel implements EventListener<Event
DropEvent de = (DropEvent) event;
Component dragged = de.getDragged();
if(comp instanceof Image)
if(comp instanceof Image || comp instanceof Label)
{
if(dragged instanceof A)
{
@ -203,7 +229,7 @@ public class DPRecentItems extends DashboardPanel implements EventListener<Event
SessionManager.getAppDesktop().openWindow(ri.getAD_Window_ID(), query, null);
}
}
if (comp instanceof Image) // Refresh button
if (comp instanceof Image || comp instanceof ToolBarButton) // Refresh button
{
refresh();
}
@ -241,7 +267,10 @@ public class DPRecentItems extends DashboardPanel implements EventListener<Event
btnrecentItem.setAttribute(AD_RECENT_ITEM_ID_ATTR, String.valueOf(ri.getAD_RecentItem_ID()));
bxRecentItems.appendChild(btnrecentItem);
btnrecentItem.setLabel(label);
btnrecentItem.setImage(ThemeManager.getThemeResource(getIconFile()));
if (ThemeManager.isUseFontIconForImage())
btnrecentItem.setIconSclass(getIconFile());
else
btnrecentItem.setImage(ThemeManager.getThemeResource(getIconFile()));
btnrecentItem.setDraggable(DELETE_RECENTITEMS_DROPPABLE);
btnrecentItem.addEventListener(Events.ON_CLICK, this);
btnrecentItem.addEventListener(Events.ON_DROP, this);
@ -268,7 +297,10 @@ public class DPRecentItems extends DashboardPanel implements EventListener<Event
}
private String getIconFile() {
return "images/mWindow.png";
if (ThemeManager.isUseFontIconForImage())
return "z-icon-Window";
else
return "images/mWindow.png";
}
@Override

View File

@ -21,6 +21,7 @@ import java.util.Properties;
import org.adempiere.base.Service;
import org.adempiere.base.event.EventManager;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.theme.ThemeManager;
import org.adempiere.webui.util.ServerPushTemplate;
import org.adempiere.webui.util.ZKUpdateUtil;
@ -91,12 +92,24 @@ public class DPRunningJobs extends DashboardPanel implements EventListener<Event
Toolbar jobsToolbar = new Toolbar();
this.appendChild(jobsToolbar);
Image imgr = new Image(ThemeManager.getThemeResource("images/Refresh24.png"));
jobsToolbar.appendChild(imgr);
imgr.setStyle("text-align: right; cursor: pointer; width:24px; height:24px;");
imgr.setTooltiptext(Util.cleanAmp(Msg.getMsg(ctx, "Refresh")));
imgr.addEventListener(Events.ON_CLICK, this);
if (ThemeManager.isUseFontIconForImage())
{
ToolBarButton btn = new ToolBarButton();
btn.setIconSclass("z-icon-Refresh");
btn.setSclass("trash-toolbarbutton");
jobsToolbar.appendChild(btn);
btn.setTooltiptext(Util.cleanAmp(Msg.getMsg(ctx, "Refresh")));
btn.addEventListener(Events.ON_CLICK, this);
}
else
{
Image imgr = new Image(ThemeManager.getThemeResource("images/Refresh24.png"));
jobsToolbar.appendChild(imgr);
imgr.setStyle("text-align: right; cursor: pointer; width:24px; height:24px;");
imgr.setTooltiptext(Util.cleanAmp(Msg.getMsg(ctx, "Refresh")));
imgr.addEventListener(Events.ON_CLICK, this);
}
createTopicSubscriber();
@ -159,7 +172,7 @@ public class DPRunningJobs extends DashboardPanel implements EventListener<Event
AEnv.zoom(MPInstance.Table_ID, AD_PInstance_ID);
}
if (comp instanceof Image) // Refresh button
if (comp instanceof Image || comp instanceof ToolBarButton) // Refresh button
{
refresh();
}

View File

@ -15,6 +15,7 @@ package org.adempiere.webui.dashboard;
import java.util.List;
import org.adempiere.webui.LayoutUtils;
import org.adempiere.webui.apps.AEnv;
import org.adempiere.webui.component.ToolBarButton;
import org.adempiere.webui.component.Window;
@ -64,9 +65,14 @@ public class DPViews extends DashboardPanel implements EventListener<Event> {
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<Event> {
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<MInfoWindow> 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<Event> {
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);
}
}

View File

@ -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());

View File

@ -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());

View File

@ -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);

View File

@ -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"))

View File

@ -180,7 +180,10 @@ public class WEditorPopupMenu extends Menupopup implements EventListener<Event>
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<Event>
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<Event>
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<Event>
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<Event>
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<Event>
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<Event>
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<Event>() {
@Override
public void onEvent(Event event) throws Exception {

View File

@ -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");
}

View File

@ -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);

View File

@ -88,7 +88,10 @@ public class WLocationEditor extends WEditor implements EventListener<Event>, 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);

View File

@ -96,7 +96,10 @@ public class WLocatorEditor extends WEditor implements EventListener<Event>, 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<Event>, 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 ]

View File

@ -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();

View File

@ -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)

View File

@ -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){}");
}
}
}

View File

@ -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);

View File

@ -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;
}

View File

@ -168,32 +168,50 @@ public abstract class AbstractMenuPanel extends Panel implements EventListener<E
if (mChildNode.isReport())
{
link.setImage(ThemeManager.getThemeResource("images/mReport.png"));
if (ThemeManager.isUseFontIconForImage())
link.setIconSclass("z-icon-Report");
else
link.setImage(ThemeManager.getThemeResource("images/mReport.png"));
treeitem.setAttribute("menu.type", "report");
}
else if (mChildNode.isProcess() || mChildNode.isTask())
{
link.setImage(ThemeManager.getThemeResource("images/mProcess.png"));
if (ThemeManager.isUseFontIconForImage())
link.setIconSclass("z-icon-Process");
else
link.setImage(ThemeManager.getThemeResource("images/mProcess.png"));
treeitem.setAttribute("menu.type", "process");
}
else if (mChildNode.isWorkFlow())
{
link.setImage(ThemeManager.getThemeResource("images/mWorkFlow.png"));
if (ThemeManager.isUseFontIconForImage())
link.setIconSclass("z-icon-Workflow");
else
link.setImage(ThemeManager.getThemeResource("images/mWorkFlow.png"));
treeitem.setAttribute("menu.type", "workflow");
}
else if (mChildNode.isForm())
{
link.setImage(ThemeManager.getThemeResource("images/mForm.png"));
if (ThemeManager.isUseFontIconForImage())
link.setIconSclass("z-icon-Form");
else
link.setImage(ThemeManager.getThemeResource("images/mForm.png"));
treeitem.setAttribute("menu.type", "form");
}
else if (mChildNode.isInfo())
{
link.setImage(ThemeManager.getThemeResource("images/mInfo.png"));
if (ThemeManager.isUseFontIconForImage())
link.setIconSclass("z-icon-Info");
else
link.setImage(ThemeManager.getThemeResource("images/mInfo.png"));
treeitem.setAttribute("menu.type", "info");
}
else // Window
{
link.setImage(ThemeManager.getThemeResource("images/mWindow.png"));
if (ThemeManager.isUseFontIconForImage())
link.setIconSclass("z-icon-Window");
else
link.setImage(ThemeManager.getThemeResource("images/mWindow.png"));
treeitem.setAttribute("menu.type", "window");
Toolbarbutton newBtn = createNewButton();
@ -214,6 +232,11 @@ public abstract class AbstractMenuPanel extends Panel implements EventListener<E
public Toolbarbutton createNewButton()
{
Toolbarbutton newBtn = new Toolbarbutton(null, ThemeManager.getThemeResource("images/New10.png"));
if (ThemeManager.isUseFontIconForImage())
{
newBtn.setImage(null);
newBtn.setIconSclass("z-icon-New");
}
newBtn.setSclass("menu-href-newbtn");
return newBtn;
}

View File

@ -35,32 +35,54 @@ public class MenuTreeFilterPanel extends Popup implements EventListener<Event>,
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<Event>,
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))

View File

@ -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);
}

View File

@ -274,11 +274,17 @@ public class WAttachment extends Window implements EventListener<Event>
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<Event>
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")));

View File

@ -125,17 +125,28 @@ public class WindowContainer extends AbstractUIPart implements EventListener<Eve
tabbox.setPage(page);
toolbar = new ToolBar();
toolbar.setSclass("window-container-toolbar");
tabbox.appendChild(toolbar);
if (isMobile())
{
ToolBarButton homeButton = new ToolBarButton();
homeButton.setImage(ThemeManager.getThemeResource("images/Home16.png"));
if (ThemeManager.isUseFontIconForImage())
homeButton.setIconSclass("z-icon-Home");
else
homeButton.setImage(ThemeManager.getThemeResource("images/Home16.png"));
homeButton.setSclass("window-container-toolbar-btn");
homeButton.addEventListener(Events.ON_CLICK, evt -> 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);

View File

@ -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";
}

View File

@ -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));
}
}

View File

@ -425,13 +425,19 @@ public class FindWindow extends Window implements EventListener<Event>, 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<Event>, 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"));

View File

@ -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<Event>
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());

View File

@ -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()) {

View File

@ -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<Event>, 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"));

View File

@ -383,7 +383,10 @@ public class WFieldRecordInfo extends Window implements EventListener<Event>
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);

View File

@ -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<Event> {
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;");

View File

@ -191,7 +191,10 @@ public class ZkJRViewer extends Window implements EventListener<Event>, 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);

View File

@ -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<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, 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<Event>, 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");
});

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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";
}

View File

@ -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;
}

View File

@ -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 {

View File

@ -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;
}

View File

@ -89,3 +89,5 @@ table.z-vbox > tbody > tr > td > table {
<c:include page="fragment/parameter-process.css.dsp" />
<c:include page="fragment/window-size.css.dsp" />
<c:include page="fragment/font-icons.css.dsp" />

View File

@ -9,11 +9,13 @@
<![CDATA[
import org.compiere.util.Env;
import org.adempiere.webui.theme.ITheme;
import org.compiere.model.MSysConfig;
Env.setContext(Env.getCtx(), "#ZK_Toolbar_Button_Size", "24");
/* Set the next variable if you want to control browser title in theme */
/* Env.setContext(Env.getCtx(), "#ZK_BROWSER_TITLE", "iDempiere"); */
Env.setContext(Env.getCtx(), ITheme.USE_CSS_FOR_WINDOW_SIZE, "Y");
Env.setContext(Env.getCtx(), ITheme.USE_FONT_ICON_FOR_IMAGE, MSysConfig.getBooleanValue(MSysConfig.ZK_THEME_USE_FONT_ICON_FOR_IMAGE, false));
]]>
</zscript>
</zk>

View File

@ -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;

View File

@ -13,7 +13,7 @@
<calendars firstDayOfWeek="Monday" mold="month" id="cal" xmlns:w="client" w:onBind="try{_overrideMsgCal(); var me=this; setTimeout(function(){me.onSize();},50); }catch(error){} ">
<toolbar sclass="calendar-toolbar">
<div class="float-left">
<hbox>
<hbox align="center">
<divarrow id="divArrowLeft" type="arrow-left"/>
<divarrow id="divArrowRight" type="arrow-right"/>
<div>