ItEr30S15RFVisualizacionMultiplesProxectosItEr29S18: Removing unnecessary edition controller
This commit is contained in:
parent
80ef2015e5
commit
1a37bf6bac
4 changed files with 3 additions and 61 deletions
|
|
@ -40,12 +40,6 @@ import org.zkoss.zk.ui.util.GenericForwardComposer;
|
|||
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
|
||||
public class CompanyPlanningController extends GenericForwardComposer {
|
||||
|
||||
@Autowired
|
||||
private EditTaskController editTaskController;
|
||||
|
||||
public EditTaskController getEditTaskController() {
|
||||
return editTaskController;
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ICompanyPlanningModel model;
|
||||
|
|
@ -64,7 +58,7 @@ public class CompanyPlanningController extends GenericForwardComposer {
|
|||
public void doAfterCompose(org.zkoss.zk.ui.Component comp) throws Exception {
|
||||
super.doAfterCompose(comp);
|
||||
Planner planner = (Planner) comp;
|
||||
model.setConfigurationToPlanner(planner, editTaskController);
|
||||
model.setConfigurationToPlanner(planner);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -105,15 +105,9 @@ public abstract class CompanyPlanningModel implements ICompanyPlanningModel {
|
|||
|
||||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public void setConfigurationToPlanner(Planner planner,
|
||||
EditTaskController editTaskController) {
|
||||
public void setConfigurationToPlanner(Planner planner) {
|
||||
PlannerConfiguration<TaskElement> configuration = createConfiguration();
|
||||
|
||||
configuration.addGlobalCommand(buildSaveCommand());
|
||||
|
||||
configuration
|
||||
.setEditTaskCommand(buildEditTaskCommand(editTaskController));
|
||||
|
||||
Chart chartComponent = new Chart();
|
||||
configuration.setChartComponent(chartComponent);
|
||||
|
||||
|
|
@ -122,19 +116,6 @@ public abstract class CompanyPlanningModel implements ICompanyPlanningModel {
|
|||
setupChart(chartComponent, planner.getTimeTracker());
|
||||
}
|
||||
|
||||
private IEditTaskCommand buildEditTaskCommand(
|
||||
EditTaskController editTaskController) {
|
||||
IEditTaskCommand editTaskCommand = getEditTaskCommand();
|
||||
editTaskCommand.setEditTaskController(editTaskController);
|
||||
return editTaskCommand;
|
||||
}
|
||||
|
||||
private ISaveCommand buildSaveCommand() {
|
||||
ISaveCommand saveCommand = getSaveCommand();
|
||||
saveCommand.setState(planningState);
|
||||
return saveCommand;
|
||||
}
|
||||
|
||||
private void setupChart(Chart chartComponent, TimeTracker timeTracker) {
|
||||
fillChart(chartComponent, timeTracker.getRealInterval(), timeTracker
|
||||
.getHorizontalSize());
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import org.zkoss.ganttz.Planner;
|
|||
*/
|
||||
public interface ICompanyPlanningModel {
|
||||
|
||||
void setConfigurationToPlanner(Planner planner,
|
||||
EditTaskController editTaskController);
|
||||
void setConfigurationToPlanner(Planner planner);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,36 +29,4 @@
|
|||
</planner>
|
||||
|
||||
<div id="idContextMenuTaskAssignment"></div>
|
||||
|
||||
<popup width="300px" apply="${planningController.editTaskController}">
|
||||
<grid>
|
||||
<rows>
|
||||
<row>
|
||||
${i18n:_('Name')}
|
||||
<textbox id="name" />
|
||||
</row>
|
||||
<row>
|
||||
${i18n:_('Start')}
|
||||
<datebox id="startDateBox" compact="true" />
|
||||
</row>
|
||||
<row>
|
||||
${i18n:_('End')}
|
||||
<datebox id="endDateBox" compact="true" />
|
||||
</row>
|
||||
<row>
|
||||
${i18n:_('Notes')}
|
||||
<textbox id="notes" />
|
||||
</row>
|
||||
<row>
|
||||
Hours
|
||||
<intbox id="hours" disabled="true" />
|
||||
</row>
|
||||
<row id="durationRow">
|
||||
Duration (days)
|
||||
<intbox id="duration" />
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<button id="ok" label="${i18n:_('Accept')}" />
|
||||
</popup>
|
||||
</zk>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue