(js) Optimize display of event editor
parent
6d2094bf83
commit
01bda0783c
|
@ -208,12 +208,12 @@
|
|||
</md-button>
|
||||
</div>
|
||||
<div flex-offset="5"
|
||||
ng-show="editor.showRecurrenceEditor">
|
||||
ng-if="editor.showRecurrenceEditor">
|
||||
<var:component className="UIxRecurrenceEditor" />
|
||||
</div>
|
||||
<!-- end repeat -->
|
||||
<div layout="row"
|
||||
ng-show="editor.component.repeat.frequency != 'never'">
|
||||
ng-if="editor.component.repeat.frequency != 'never'">
|
||||
<md-input-container class="md-block" flex="50" flex-xs="100">
|
||||
<label><var:string label:value="End Repeat"/></label>
|
||||
<md-select ng-model="editor.component.repeat.end"
|
||||
|
@ -299,7 +299,7 @@
|
|||
<var:string label:value="Reminder"/>
|
||||
</md-checkbox>
|
||||
<div flex-offset="5"
|
||||
ng-show="editor.component.$hasAlarm">
|
||||
ng-if="editor.component.$hasAlarm">
|
||||
<var:component className="UIxReminderEditor" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -388,14 +388,16 @@
|
|||
};
|
||||
|
||||
this.changeAlarmRelation = function (form) {
|
||||
if (this.component.type == 'task' && this.component.$hasAlarm &&
|
||||
(this.component.start || this.component.due) &&
|
||||
((!this.component.start && this.component.alarm.relation == 'START') ||
|
||||
(!this.component.due && this.component.alarm.relation == 'END'))) {
|
||||
form.alarmRelation.$setValidity('alarm', false);
|
||||
}
|
||||
else {
|
||||
form.alarmRelation.$setValidity('alarm', true);
|
||||
if (form.alarmRelation) {
|
||||
if (this.component.type == 'task' && this.component.$hasAlarm &&
|
||||
(this.component.start || this.component.due) &&
|
||||
((!this.component.start && this.component.alarm.relation == 'START') ||
|
||||
(!this.component.due && this.component.alarm.relation == 'END'))) {
|
||||
form.alarmRelation.$setValidity('alarm', false);
|
||||
}
|
||||
else {
|
||||
form.alarmRelation.$setValidity('alarm', true);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue