parent
8c9bb8bfa9
commit
6246c699f2
|
@ -24,6 +24,7 @@ import org.compiere.model.MRole;
|
||||||
import org.compiere.util.CLogger;
|
import org.compiere.util.CLogger;
|
||||||
import org.compiere.util.DB;
|
import org.compiere.util.DB;
|
||||||
import org.compiere.util.Env;
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
import org.zkoss.zk.ui.Component;
|
import org.zkoss.zk.ui.Component;
|
||||||
import org.zkoss.zk.ui.event.Event;
|
import org.zkoss.zk.ui.event.Event;
|
||||||
import org.zkoss.zk.ui.event.EventListener;
|
import org.zkoss.zk.ui.event.EventListener;
|
||||||
|
@ -62,8 +63,8 @@ public class DPActivities extends DashboardPanel implements EventListener {
|
||||||
|
|
||||||
btnNotice = new Button();
|
btnNotice = new Button();
|
||||||
vbox.appendChild(btnNotice);
|
vbox.appendChild(btnNotice);
|
||||||
btnNotice.setLabel("Notice : 0");
|
btnNotice.setLabel(Msg.translate(Env.getCtx(), "AD_Note_ID") + " : 0");
|
||||||
btnNotice.setTooltiptext("Notice");
|
btnNotice.setTooltiptext(Msg.translate(Env.getCtx(), "AD_Note_ID"));
|
||||||
btnNotice.setImage("/images/GetMail16.png");
|
btnNotice.setImage("/images/GetMail16.png");
|
||||||
int AD_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = 'Notice' AND IsSummary = 'N'");
|
int AD_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = 'Notice' AND IsSummary = 'N'");
|
||||||
btnNotice.setName(String.valueOf(AD_Menu_ID));
|
btnNotice.setName(String.valueOf(AD_Menu_ID));
|
||||||
|
@ -71,8 +72,8 @@ public class DPActivities extends DashboardPanel implements EventListener {
|
||||||
|
|
||||||
btnRequest = new Button();
|
btnRequest = new Button();
|
||||||
vbox.appendChild(btnRequest);
|
vbox.appendChild(btnRequest);
|
||||||
btnRequest.setLabel("Request : 0");
|
btnRequest.setLabel(Msg.translate(Env.getCtx(), "R_Request_ID") + " : 0");
|
||||||
btnRequest.setTooltiptext("Request");
|
btnRequest.setTooltiptext(Msg.translate(Env.getCtx(), "R_Request_ID"));
|
||||||
btnRequest.setImage("/images/Request16.png");
|
btnRequest.setImage("/images/Request16.png");
|
||||||
AD_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = 'Request' AND IsSummary = 'N'");
|
AD_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = 'Request' AND IsSummary = 'N'");
|
||||||
btnRequest.setName(String.valueOf(AD_Menu_ID));
|
btnRequest.setName(String.valueOf(AD_Menu_ID));
|
||||||
|
@ -80,8 +81,8 @@ public class DPActivities extends DashboardPanel implements EventListener {
|
||||||
|
|
||||||
btnWorkflow = new Button();
|
btnWorkflow = new Button();
|
||||||
vbox.appendChild(btnWorkflow);
|
vbox.appendChild(btnWorkflow);
|
||||||
btnWorkflow.setLabel("Workflow Activities : 0");
|
btnWorkflow.setLabel(Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : 0");
|
||||||
btnWorkflow.setTooltiptext("Workflow Activities");
|
btnWorkflow.setTooltiptext(Msg.getMsg (Env.getCtx(), "WorkflowActivities"));
|
||||||
btnWorkflow.setImage("/images/Assignment16.png");
|
btnWorkflow.setImage("/images/Assignment16.png");
|
||||||
AD_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = 'Workflow Activities' AND IsSummary = 'N'");
|
AD_Menu_ID = DB.getSQLValue(null, "SELECT AD_Menu_ID FROM AD_Menu WHERE Name = 'Workflow Activities' AND IsSummary = 'N'");
|
||||||
btnWorkflow.setName(String.valueOf(AD_Menu_ID));
|
btnWorkflow.setName(String.valueOf(AD_Menu_ID));
|
||||||
|
@ -189,9 +190,9 @@ public class DPActivities extends DashboardPanel implements EventListener {
|
||||||
return;
|
return;
|
||||||
c = c.getParent();
|
c = c.getParent();
|
||||||
}
|
}
|
||||||
btnNotice.setLabel("Notice : " + noOfNotice);
|
btnNotice.setLabel(Msg.translate(Env.getCtx(), "AD_Note_ID") + " : " + noOfNotice);
|
||||||
btnRequest.setLabel("Request : " + noOfRequest);
|
btnRequest.setLabel(Msg.translate(Env.getCtx(), "R_Request_ID") + " : " + noOfRequest);
|
||||||
btnWorkflow.setLabel("Workflow Activities : " + noOfWorkflow);
|
btnWorkflow.setLabel(Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEvent(Event event)
|
public void onEvent(Event event)
|
||||||
|
|
|
@ -393,7 +393,10 @@ public class DefaultDesktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
|
|
||||||
public void updateUI() {
|
public void updateUI() {
|
||||||
int total = noOfNotice + noOfRequest + noOfWorkflow;
|
int total = noOfNotice + noOfRequest + noOfWorkflow;
|
||||||
windowContainer.setTabTitle(0, "Home (" + total + ")",
|
windowContainer.setTabTitle(0, Msg.getMsg(Env.getCtx(), "Home").replaceAll("&", "")
|
||||||
"Notice : " + noOfNotice + ", Request : " + noOfRequest + ", Workflow Activities : " + noOfWorkflow);
|
+ " (" + total + ")",
|
||||||
|
Msg.translate(Env.getCtx(), "AD_Note_ID") + " : " + noOfNotice
|
||||||
|
+ ", " + Msg.translate(Env.getCtx(), "R_Request_ID") + " : " + noOfRequest
|
||||||
|
+ ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -434,6 +434,8 @@ public class NavBar2Desktop extends TabbedDesktop implements MenuListener, Seria
|
||||||
public void updateUI() {
|
public void updateUI() {
|
||||||
int total = noOfNotice + noOfRequest + noOfWorkflow;
|
int total = noOfNotice + noOfRequest + noOfWorkflow;
|
||||||
shortcutPanel.setLabel(1, "Activities (" + total + ")");
|
shortcutPanel.setLabel(1, "Activities (" + total + ")");
|
||||||
shortcutPanel.setTooltiptext(1, "Notice : " + noOfNotice + ", Request : " + noOfRequest + ", Workflow Activities : " + noOfWorkflow);
|
shortcutPanel.setTooltiptext(1, Msg.translate(Env.getCtx(), "AD_Note_ID") + " : " + noOfNotice
|
||||||
|
+ ", " + Msg.translate(Env.getCtx(), "R_Request_ID") + " : " + noOfRequest
|
||||||
|
+ ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -162,7 +162,7 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial
|
||||||
|
|
||||||
div = new Div();
|
div = new Div();
|
||||||
Executions.createComponents(VIEWS_PATH, div, null);
|
Executions.createComponents(VIEWS_PATH, div, null);
|
||||||
navigationPanel.add(div, "Views");
|
navigationPanel.add(div, Msg.getMsg(Env.getCtx(), "View").replaceAll("&", ""));
|
||||||
|
|
||||||
navigationPanel.setSelectedIndex(0);
|
navigationPanel.setSelectedIndex(0);
|
||||||
|
|
||||||
|
@ -450,6 +450,8 @@ public class NavBarDesktop extends TabbedDesktop implements MenuListener, Serial
|
||||||
public void updateUI() {
|
public void updateUI() {
|
||||||
int total = noOfNotice + noOfRequest + noOfWorkflow;
|
int total = noOfNotice + noOfRequest + noOfWorkflow;
|
||||||
navigationPanel.setLabel(2, "Activities (" + total + ")");
|
navigationPanel.setLabel(2, "Activities (" + total + ")");
|
||||||
navigationPanel.setTooltiptext(2, "Notice : " + noOfNotice + ", Request : " + noOfRequest + ", Workflow Activities : " + noOfWorkflow);
|
navigationPanel.setTooltiptext(2, Msg.translate(Env.getCtx(), "AD_Note_ID") + " : " + noOfNotice
|
||||||
|
+ ", " + Msg.translate(Env.getCtx(), "R_Request_ID") + " : " + noOfRequest
|
||||||
|
+ ", " + Msg.getMsg (Env.getCtx(), "WorkflowActivities") + " : " + noOfWorkflow);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue