ItEr17S07RFComportamentoGraficoPlanificadorItEr16S09: TaskContainer style changes when it is expanded or closed
This commit is contained in:
parent
7a105ea79a
commit
1f7f35d000
6 changed files with 56 additions and 23 deletions
|
|
@ -143,6 +143,15 @@ public class Task extends Div implements AfterCompose {
|
||||||
setId(UUID.randomUUID().toString());
|
setId(UUID.randomUUID().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String calculateClass() {
|
||||||
|
return "box";
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void updateClass() {
|
||||||
|
response(null, new AuInvoke(this, "setClass",
|
||||||
|
new Object[] { calculateClass() }));
|
||||||
|
}
|
||||||
|
|
||||||
public void afterCompose() {
|
public void afterCompose() {
|
||||||
updateProperties();
|
updateProperties();
|
||||||
if (propertiesListener == null) {
|
if (propertiesListener == null) {
|
||||||
|
|
@ -158,6 +167,7 @@ public class Task extends Div implements AfterCompose {
|
||||||
}
|
}
|
||||||
this.taskBean
|
this.taskBean
|
||||||
.addFundamentalPropertiesChangeListener(propertiesListener);
|
.addFundamentalPropertiesChangeListener(propertiesListener);
|
||||||
|
updateClass();
|
||||||
}
|
}
|
||||||
|
|
||||||
private String _color;
|
private String _color;
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ public class TaskContainer extends Task implements AfterCompose {
|
||||||
} else {
|
} else {
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
updateClass();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
taskContainerBean.addExpandListener(expandListener);
|
taskContainerBean.addExpandListener(expandListener);
|
||||||
|
|
@ -71,6 +72,14 @@ public class TaskContainer extends Task implements AfterCompose {
|
||||||
return (TaskContainerBean) getTaskBean();
|
return (TaskContainerBean) getTaskBean();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected String calculateClass() {
|
||||||
|
return super.calculateClass() +" "+ (getTaskContainerBean().isExpanded()?
|
||||||
|
"expanded":"closed");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
private void close() {
|
private void close() {
|
||||||
for (Task subtask : subtasks) {
|
for (Task subtask : subtasks) {
|
||||||
if (subtask instanceof TaskContainer) {
|
if (subtask instanceof TaskContainer) {
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<div id="row${self.uuid}" class="row" z.valor="boxid="${self.uuid}">
|
<div id="row${self.uuid}" class="row" z.valor="boxid="${self.uuid}">
|
||||||
<div id="${self.uuid}" z.type="ganttz.task.Task" idTask="${self.id}"
|
<div id="${self.uuid}" z.type="ganttz.task.Task" idTask="${self.id}"
|
||||||
z.autoz="true"${self.outerAttrs}" class="box">
|
z.autoz="true"${self.outerAttrs}">
|
||||||
<div id="completion${self.uuid}" class="completion"></div>
|
<div id="completion${self.uuid}" class="completion"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,11 @@ YAHOO.util.Event.on(document.body, 'mousemove', function(e) {
|
||||||
zkTask.yMouse = arrPos[1];
|
zkTask.yMouse = arrPos[1];
|
||||||
});
|
});
|
||||||
|
|
||||||
|
zkTask.setClass = function(cmp, newclass) {
|
||||||
|
cmp.className = newclass;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
zkTask.setAttr = function(cmp, nm, val) {
|
zkTask.setAttr = function(cmp, nm, val) {
|
||||||
|
|
||||||
switch (nm) {
|
switch (nm) {
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,9 @@ zkTaskContainer.getElementsByAttribute = function(oElm, strTagName, strAttribute
|
||||||
zkTask.getElementsByAttribute(oElm, strTagName, strAttributeName, strAttributeValue);
|
zkTask.getElementsByAttribute(oElm, strTagName, strAttributeName, strAttributeValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
zkTaskContainer.setClass = function(cmp, newclass) {
|
||||||
|
cmp.className = newclass;
|
||||||
|
};
|
||||||
|
|
||||||
/* We will not allow taskcontainer move or resize untill its behaviour its
|
/* We will not allow taskcontainer move or resize untill its behaviour its
|
||||||
* clearly specified
|
* clearly specified
|
||||||
|
|
|
||||||
|
|
@ -117,28 +117,6 @@ zkTasklist.GANTT_PANEL_LEFT = 300
|
||||||
width: 10000px; /* Defined to be larger than the maximum scroll_inner_x */
|
width: 10000px; /* Defined to be larger than the maximum scroll_inner_x */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -------------- TaskGroup -------------- */
|
|
||||||
.taskgroup_start {
|
|
||||||
background-image: url("/navalplanner-webapp/zkau/web/ganttz/img/group_left.png");
|
|
||||||
height: 10px;
|
|
||||||
width: 10px;
|
|
||||||
float:left;
|
|
||||||
}
|
|
||||||
|
|
||||||
.taskgroup_end {
|
|
||||||
background-image: url("/navalplanner-webapp/zkau/web/ganttz/img/group_right.png");
|
|
||||||
height: 10px;
|
|
||||||
width: 10px;
|
|
||||||
float:right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.taskgroup {
|
|
||||||
border-top: solid black 2px;
|
|
||||||
border-bottom: 0px;
|
|
||||||
border-left: 0px;
|
|
||||||
border-right: 0px;
|
|
||||||
background-color: transparent !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* -------------- Dependencies -------------- */
|
/* -------------- Dependencies -------------- */
|
||||||
#listdependencies {
|
#listdependencies {
|
||||||
|
|
@ -185,6 +163,34 @@ zkTasklist.GANTT_PANEL_LEFT = 300
|
||||||
white-space:nowrap;
|
white-space:nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* -------------- TaskGroup -------------- */
|
||||||
|
.taskgroup_start {
|
||||||
|
background-image: url("/navalplanner-webapp/zkau/web/ganttz/img/group_left.png");
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
float:left;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taskgroup_end {
|
||||||
|
background-image: url("/navalplanner-webapp/zkau/web/ganttz/img/group_right.png");
|
||||||
|
height: 10px;
|
||||||
|
width: 10px;
|
||||||
|
float:right;
|
||||||
|
}
|
||||||
|
|
||||||
|
.taskgroup, .row .expanded {
|
||||||
|
border-top: solid black 2px;
|
||||||
|
border-bottom: 0px;
|
||||||
|
border-left: 0px;
|
||||||
|
border-right: 0px;
|
||||||
|
background-color: transparent !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.row .closed {
|
||||||
|
border-top: solid black 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.zk #ganttpanel .z-button-cm {
|
.zk #ganttpanel .z-button-cm {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue