mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-04-14 17:58:51 +00:00
(js) Fix Resource conflict error handling
This commit is contained in:
1
NEWS
1
NEWS
@@ -19,6 +19,7 @@ Bug fixes
|
||||
- [web] improved validation of mail account delegators
|
||||
- [web] fixed auto-completion of list members (#3870)
|
||||
- [web] added missing options to subscribed addressbooks (#3850)
|
||||
- [web] fixed resource conflict error handling (403 vs 409 HTTP code)
|
||||
- [eas] improve handling of email folders without a parent
|
||||
- [eas] never send IMIP reply when the "initiator" is Outlook 2013/2016
|
||||
- [core] only consider SMTP addresses for AD's proxyAddresses (#3842)
|
||||
|
||||
@@ -51,8 +51,9 @@
|
||||
}
|
||||
angular.module('SOGo.SchedulerUI')
|
||||
.value('CalendarSettings', {
|
||||
EventDragDayLength: 24 * 4, // hour quarters
|
||||
EventDragHorizontalOffset: 3 // pixels
|
||||
EventDragDayLength: 24 * 4, // hour quarters
|
||||
EventDragHorizontalOffset: 3, // pixels
|
||||
ConflictHTTPErrorCode: 409
|
||||
})
|
||||
.factory('Calendar', Calendar.$factory);
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
CalendarListController.$inject = ['$rootScope', '$scope', '$timeout', '$state', '$mdDialog', 'sgHotkeys', 'sgFocus', 'Dialog', 'Preferences', 'Calendar', 'Component'];
|
||||
function CalendarListController($rootScope, $scope, $timeout, $state, $mdDialog, sgHotkeys, focus, Dialog, Preferences, Calendar, Component) {
|
||||
CalendarListController.$inject = ['$rootScope', '$scope', '$timeout', '$state', '$mdDialog', 'sgHotkeys', 'sgFocus', 'Dialog', 'Preferences', 'CalendarSettings', 'Calendar', 'Component'];
|
||||
function CalendarListController($rootScope, $scope, $timeout, $state, $mdDialog, sgHotkeys, focus, Dialog, Preferences, CalendarSettings, Calendar, Component) {
|
||||
var vm = this, hotkeys = [];
|
||||
|
||||
vm.component = Component;
|
||||
@@ -291,7 +291,7 @@
|
||||
}
|
||||
|
||||
function onComponentAdjustError(response, component, params) {
|
||||
if (response.status == 403 &&
|
||||
if (response.status == CalendarSettings.ConflictHTTPErrorCode &&
|
||||
response.data && response.data.message && angular.isObject(response.data.message)) {
|
||||
$mdDialog.show({
|
||||
parent: angular.element(document.body),
|
||||
|
||||
@@ -209,8 +209,8 @@
|
||||
/**
|
||||
* @ngInject
|
||||
*/
|
||||
ComponentEditorController.$inject = ['$rootScope', '$scope', '$log', '$timeout', '$mdDialog', 'User', 'Calendar', 'Component', 'AddressBook', 'Card', 'Alarm', 'stateComponent'];
|
||||
function ComponentEditorController($rootScope, $scope, $log, $timeout, $mdDialog, User, Calendar, Component, AddressBook, Card, Alarm, stateComponent) {
|
||||
ComponentEditorController.$inject = ['$rootScope', '$scope', '$log', '$timeout', '$mdDialog', 'User', 'CalendarSettings', 'Calendar', 'Component', 'AddressBook', 'Card', 'Alarm', 'stateComponent'];
|
||||
function ComponentEditorController($rootScope, $scope, $log, $timeout, $mdDialog, User, CalendarSettings, Calendar, Component, AddressBook, Card, Alarm, stateComponent) {
|
||||
var vm = this, component, oldStartDate, oldEndDate, oldDueDate;
|
||||
|
||||
vm.service = Calendar;
|
||||
@@ -306,7 +306,7 @@
|
||||
$mdDialog.hide();
|
||||
Alarm.getAlarms();
|
||||
}, function(response) {
|
||||
if (response.status == 403 &&
|
||||
if (response.status == CalendarSettings.ConflictHTTPErrorCode &&
|
||||
response.data && response.data.message &&
|
||||
angular.isObject(response.data.message))
|
||||
vm.attendeeConflictError = response.data.message;
|
||||
|
||||
Reference in New Issue
Block a user