Simplified the code in TaskPropertiesController merging two listeners into a single one.
FEA: ItEr66OTS04XestionRecursosEstratexicosItEr65OTS07
This commit is contained in:
parent
0d7761ef7a
commit
6107e1b3bc
1 changed files with 9 additions and 19 deletions
|
|
@ -229,17 +229,6 @@ public class TaskPropertiesController extends GenericForwardComposer {
|
|||
startConstraintDate.setDisabled(disabled);
|
||||
lbResourceAllocationType.setDisabled(disabled);
|
||||
|
||||
lbResourceAllocationType.addEventListener(Events.ON_SELECT,
|
||||
new EventListener() {
|
||||
@Override
|
||||
public void onEvent(Event event) throws Exception {
|
||||
|
||||
editTaskController
|
||||
.selectAssignmentTab(lbResourceAllocationType
|
||||
.getSelectedIndex() + 1);
|
||||
}
|
||||
});
|
||||
|
||||
if (context != null) {
|
||||
taskEditFormComposer.init(context.getRelativeTo(), context.getTask());
|
||||
}
|
||||
|
|
@ -404,14 +393,15 @@ public class TaskPropertiesController extends GenericForwardComposer {
|
|||
|
||||
final ResourceAllocationTypeEnum oldState = getOldState();
|
||||
ResourceAllocationTypeEnum newState = getSelectedValue(new ArrayList(se.getSelectedItems()));
|
||||
if (thereIsTransition(newState)) {
|
||||
if (isConsolidatedTask()) {
|
||||
restoreOldState();
|
||||
editTaskController
|
||||
.showNonPermitChangeResourceAllocationType();
|
||||
} else {
|
||||
changeResourceAllocationType(oldState, newState);
|
||||
}
|
||||
if (thereIsTransition(newState)) {
|
||||
if (isConsolidatedTask()) {
|
||||
restoreOldState();
|
||||
editTaskController.showNonPermitChangeResourceAllocationType();
|
||||
} else {
|
||||
changeResourceAllocationType(oldState, newState);
|
||||
editTaskController.selectAssignmentTab(lbResourceAllocationType
|
||||
.getSelectedIndex() + 1);
|
||||
}
|
||||
}
|
||||
if (oldState == null) {
|
||||
setOldState(newState);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue