Add "Save & continue" button in monthly timesheets

FEA: ItEr76S28UserDashboard
This commit is contained in:
Manuel Rego Casasnovas 2012-05-29 20:34:04 +02:00
parent 712e89ca9b
commit 57a37e6a0a
2 changed files with 10 additions and 0 deletions

View file

@ -359,6 +359,7 @@ public class MonthlyTimesheetController extends GenericForwardComposer
private void initTimesheet(LocalDate date) {
columns = new Columns();
timesheet.getChildren().clear();
timesheet.appendChild(columns);
createColumns(date);
}
@ -418,6 +419,12 @@ public class MonthlyTimesheetController extends GenericForwardComposer
+ monthlyTimesheetModel.getDate());
}
public void saveAndContinue() {
monthlyTimesheetModel.save();
goToCreateOrEditForm(monthlyTimesheetModel.getDate());
Util.reloadBindings(timesheet);
}
public void cancel() {
monthlyTimesheetModel.cancel();
Executions.getCurrent().sendRedirect(

View file

@ -76,6 +76,9 @@
<button onClick="controller.save();"
label="${i18n:_('Save')}"
sclass="save-button global-action" />
<button onClick="controller.saveAndContinue();"
label="${i18n:_('Save &amp; Continue')}"
sclass="saveandcontinue-button global-action" />
<button onClick="controller.cancel();"
label="${i18n:_('Cancel')}"
sclass="cancel-button global-action" />