Skip to content

Commit

Permalink
(js) Optimize display of event editor
Browse files Browse the repository at this point in the history
  • Loading branch information
cgx committed Oct 2, 2019
1 parent 6d2094b commit 01bda07
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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>
Expand Down
18 changes: 10 additions & 8 deletions UI/WebServerResources/js/Scheduler/ComponentController.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
};

Expand Down

0 comments on commit 01bda07

Please sign in to comment.