Added onClick listener to project names on company view to enter into the planning
This is done using the entry point /planner/index.zul;order=order-code which also helps browser history management to enable bookmarking, refreshing or use the back button. The link to the taks from the project view is not added due to an interaction it has with the system to prevent from leaving the current URL, which would need to be written with anchors to avoid this interaction. FEA: ItEr77S03Community
This commit is contained in:
parent
fc424944d1
commit
e79b532d95
2 changed files with 16 additions and 0 deletions
|
|
@ -41,8 +41,11 @@ import org.zkoss.ganttz.data.Task;
|
|||
import org.zkoss.ganttz.util.ComponentsFinder;
|
||||
import org.zkoss.util.Locales;
|
||||
import org.zkoss.zk.ui.Component;
|
||||
import org.zkoss.zk.ui.Execution;
|
||||
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.event.KeyEvent;
|
||||
import org.zkoss.zk.ui.util.GenericForwardComposer;
|
||||
import org.zkoss.zul.Datebox;
|
||||
|
|
@ -421,6 +424,15 @@ public class LeftTasksTreeRow extends GenericForwardComposer {
|
|||
} else {
|
||||
nameLabel.setValue(task.getName());
|
||||
nameLabel.setTooltiptext(task.getName());
|
||||
nameLabel.setSclass("clickable-rows");
|
||||
nameLabel.addEventListener(Events.ON_CLICK, new EventListener() {
|
||||
@Override
|
||||
public void onEvent(Event arg0) throws Exception {
|
||||
Executions.getCurrent().sendRedirect(
|
||||
"/planner/index.zul;order="
|
||||
+ task.getProjectCode());
|
||||
}
|
||||
});
|
||||
startDateLabel.setValue(asString(task.getBeginDate()
|
||||
.toDayRoundedDate()));
|
||||
endDateLabel.setValue(asString(task.getEndDate()
|
||||
|
|
|
|||
|
|
@ -1326,6 +1326,10 @@ overflow: visible;
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
.clickable-rows:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.clickable-rows tr.z-row:hover .z-row-cnt {
|
||||
color: #000000;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue