FR [2983757] - Contrib: images for menu in the webui
https://sourceforge.net/tracker/index.php?func=detail&aid=2983757&group_id=176962&atid=955896
This commit is contained in:
parent
97b84e6ef7
commit
a55504a2ec
|
@ -109,10 +109,11 @@ public class DPFavourites extends DashboardPanel implements EventListener {
|
|||
while (en.hasMoreElements())
|
||||
{
|
||||
MTreeNode nd = (MTreeNode)en.nextElement();
|
||||
if (nd.isOnBar()) {
|
||||
if (nd.isOnBar()) {
|
||||
String label = nd.toString().trim();
|
||||
ToolBarButton btnFavItem = new ToolBarButton(String.valueOf(nd.getNode_ID()));
|
||||
btnFavItem.setLabel(label);
|
||||
btnFavItem.setImage(getIconFile(nd));
|
||||
btnFavItem.setDraggable(DELETE_FAV_DROPPABLE);
|
||||
btnFavItem.addEventListener(Events.ON_CLICK, this);
|
||||
btnFavItem.addEventListener(Events.ON_DROP, this);
|
||||
|
@ -248,4 +249,16 @@ public class DPFavourites extends DashboardPanel implements EventListener {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String getIconFile(MTreeNode mt) {
|
||||
if (mt.isWindow())
|
||||
return "images/mWindow.png";
|
||||
if (mt.isReport())
|
||||
return "images/mReport.png";
|
||||
if (mt.isProcess())
|
||||
return "images/mProcess.png";
|
||||
if (mt.isWorkFlow())
|
||||
return "images/mWorkFlow.png";
|
||||
return "images/mWindow.png";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoProduct");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoProduct"));
|
||||
btnViewItem.setImage("/images/InfoProduct16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -61,6 +62,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoBPartner");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoBPartner"));
|
||||
btnViewItem.setImage("/images/InfoBPartner16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -68,6 +70,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoAccount");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoAccount"));
|
||||
btnViewItem.setImage("/images/InfoAccount16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -75,6 +78,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoSchedule");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoSchedule"));
|
||||
btnViewItem.setImage("/images/InfoSchedule16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -83,6 +87,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoOrder");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoOrder"));
|
||||
btnViewItem.setImage("/images/Info16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -90,6 +95,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoInvoice");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoInvoice"));
|
||||
btnViewItem.setImage("/images/Info16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -97,6 +103,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoInOut");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoInOut"));
|
||||
btnViewItem.setImage("/images/Info16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -104,6 +111,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoPayment");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoPayment"));
|
||||
btnViewItem.setImage("/images/Info16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -111,6 +119,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoCashLine");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoCashLine"));
|
||||
btnViewItem.setImage("/images/Info16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -118,6 +127,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoAssignment");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoAssignment"));
|
||||
btnViewItem.setImage("/images/Info16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
@ -125,6 +135,7 @@ public class DPViews extends DashboardPanel implements EventListener {
|
|||
{
|
||||
ToolBarButton btnViewItem = new ToolBarButton("InfoAsset");
|
||||
btnViewItem.setLabel(Msg.getMsg(Env.getCtx(), "InfoAsset"));
|
||||
btnViewItem.setImage("/images/Info16.png");
|
||||
btnViewItem.addEventListener(Events.ON_CLICK, this);
|
||||
vbox.appendChild(btnViewItem);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue