mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-23 13:59:32 +00:00
fix(calendar): don't allow RDATE unless already defined
Since RDATE are not properly supported in EAS, hide the possibility to specify recurring dates unless the component being edited already contains RDATE(s).
This commit is contained in:
@@ -205,8 +205,8 @@
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
ComponentEditorController.$inject = ['$rootScope', '$scope', '$log', '$timeout', '$element', '$mdDialog', 'sgFocus', 'User', 'CalendarSettings', 'Calendar', 'Component', 'Attendees', 'AddressBook', 'Card', 'Alarm', 'Preferences', 'stateComponent'];
|
||||
function ComponentEditorController($rootScope, $scope, $log, $timeout, $element, $mdDialog, focus, User, CalendarSettings, Calendar, Component, Attendees, AddressBook, Card, Alarm, Preferences, stateComponent) {
|
||||
ComponentEditorController.$inject = ['$rootScope', '$scope', '$log', '$timeout', '$window', '$element', '$mdDialog', 'sgFocus', 'User', 'CalendarSettings', 'Calendar', 'Component', 'Attendees', 'AddressBook', 'Card', 'Alarm', 'Preferences', 'stateComponent'];
|
||||
function ComponentEditorController($rootScope, $scope, $log, $timeout, $window, $element, $mdDialog, focus, User, CalendarSettings, Calendar, Component, Attendees, AddressBook, Card, Alarm, Preferences, stateComponent) {
|
||||
var vm = this, component, oldStartDate, oldEndDate, oldDueDate, dayStartTime, dayEndTime;
|
||||
|
||||
this.$onInit = function () {
|
||||
@@ -264,6 +264,12 @@
|
||||
this.component.repeat.month.type == 'bymonthday';
|
||||
};
|
||||
|
||||
this.frequencies = function () {
|
||||
return _.filter($window.repeatFrequencies, function (frequency) {
|
||||
return frequency[0] != 'custom' || vm.component.repeat.frequency == 'custom';
|
||||
});
|
||||
};
|
||||
|
||||
this.changeFrequency = function () {
|
||||
if (this.component.repeat.frequency == 'custom')
|
||||
this.showRecurrenceEditor = true;
|
||||
|
||||
Reference in New Issue
Block a user