Fix support for recurrent tasks (cont'd)

Fixes #3864
This commit is contained in:
Francis Lachapelle
2016-11-01 14:52:18 -04:00
parent 188dd986d2
commit 1ee7693432
6 changed files with 78 additions and 10 deletions
@@ -181,7 +181,69 @@
<div flex="50" class="sg-padded--left">{{editor.component.percentComplete}} <var:string label:value="% complete"/></div>
</div>
</div>
<!-- repeat -->
<div class="sg-form-section"
ng-show="editor.component.start">
<div layout="row" layout-align="start center">
<md-input-container class="md-block md-flex">
<label><var:string label:value="Repeat"/></label>
<md-select ng-model="editor.component.repeat.frequency" ng-disabled="editor.component.occurrenceId">
<var:foreach list="repeatList" item="item">
<md-option var:value="item"><var:string var:value="itemRepeatText"/></md-option>
</var:foreach>
</md-select>
</md-input-container>
<md-button type="button" class="sg-icon-button"
label:aria-label="repeat_CUSTOM"
ng-disabled="editor.component.occurrenceId"
ng-show="editor.component.repeat.frequency != 'never'"
ng-click="editor.toggleRecurrenceEditor()">
<md-icon ng-class="{'md-rotate-45': editor.showRecurrenceEditor}">add</md-icon>
</md-button>
</div>
<div ng-show="editor.showRecurrenceEditor" flex-offset="5">
<var:component className="UIxRecurrenceEditor" />
</div>
<!-- end repeat -->
<div layout="row">
<md-input-container class="md-block" flex="50" flex-xs="100"
ng-show="editor.component.repeat.frequency != 'never'">
<label><var:string label:value="End Repeat"/></label>
<md-select ng-model="editor.component.repeat.end"
ng-disabled="editor.component.occurrenceId">
<md-option value="never"><var:string label:value="Never"/></md-option>
<md-option value="count"><var:string label:value="After"/></md-option>
<md-option value="until"><var:string label:value="On Date"/></md-option>
</md-select>
</md-input-container>
<md-input-container class="md-block md-input-number"
ng-show="editor.component.repeat.end == 'count'">
<label><var:string label:value="times"/></label>
<input type="number" label:aria-label="times" ng-model="editor.component.repeat.count"/>
</md-input-container>
<md-input-container ng-show="editor.component.repeat.end == 'until'">
<md-datepicker name="repeat_until"
ng-model="editor.component.repeat.until"
md-min-date="editor.component.end"
label:md-placeholder="On Date"><!-- date picker --></md-datepicker>
<div ng-messages="eventForm.repeat_until.$error">
<div ng-message="mindate"><var:string label:value="validate_untilbeforeend"/></div>
</div>
</md-input-container>
</div>
</div>
<div class="sg-form-section"
ng-show="editor.component.start">
<!-- reminder -->
<md-checkbox ng-model="editor.component.$hasAlarm"
label:aria-label="Reminder">
<var:string label:value="Reminder"/>
</md-checkbox>
<div flex-offset="5"
ng-show="editor.component.$hasAlarm">
<var:component className="UIxReminderEditor" />
</div>
</div>
</md-dialog-content>
<!-- cancel/reset/save -->
<md-dialog-actions>