parent
4b2b3693c5
commit
d0e0d5300a
1
NEWS
1
NEWS
|
@ -11,6 +11,7 @@ Bug fixes
|
||||||
- [web] fixed confusion between owner and active user in ACLs management of Administration module
|
- [web] fixed confusion between owner and active user in ACLs management of Administration module
|
||||||
- [web] fixed JavaScript exception after renaming an address book
|
- [web] fixed JavaScript exception after renaming an address book
|
||||||
- [web] fixed Sieve folder encoding support (#3904)
|
- [web] fixed Sieve folder encoding support (#3904)
|
||||||
|
- [web] fixed ordering of calendars when renaming or adding a calendar (#3931)
|
||||||
|
|
||||||
3.2.4 (2016-12-01)
|
3.2.4 (2016-12-01)
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -84,7 +84,7 @@
|
||||||
*/
|
*/
|
||||||
Calendar.$add = function(calendar) {
|
Calendar.$add = function(calendar) {
|
||||||
// Insert new calendar at proper index
|
// Insert new calendar at proper index
|
||||||
var list, sibling, i;
|
var list, sibling;
|
||||||
|
|
||||||
if (calendar.isWebCalendar)
|
if (calendar.isWebCalendar)
|
||||||
list = this.$webcalendars;
|
list = this.$webcalendars;
|
||||||
|
@ -93,13 +93,15 @@
|
||||||
else
|
else
|
||||||
list = this.$calendars;
|
list = this.$calendars;
|
||||||
|
|
||||||
sibling = _.find(list, function(o) {
|
sibling = _.findIndex(list, function(o, i) {
|
||||||
|
console.debug(i + ': "' + o.id + '".localeCompare("' + calendar.name + '") = ' + o.name.localeCompare(calendar.name));
|
||||||
return (calendar.id == 'personal' ||
|
return (calendar.id == 'personal' ||
|
||||||
(o.id != 'personal' &&
|
(o.id != 'personal' && o.name.localeCompare(calendar.name) > 0));
|
||||||
o.name.localeCompare(calendar.name) === 1));
|
|
||||||
});
|
});
|
||||||
i = sibling ? _.indexOf(_.map(list, 'id'), sibling.id) : 1;
|
if (sibling < 0)
|
||||||
list.splice(i, 0, calendar);
|
list.push(calendar);
|
||||||
|
else
|
||||||
|
list.splice(sibling, 0, calendar);
|
||||||
|
|
||||||
this.$Preferences.ready().then(function() {
|
this.$Preferences.ready().then(function() {
|
||||||
if (Calendar.$Preferences.settings.Calendar.FoldersOrder)
|
if (Calendar.$Preferences.settings.Calendar.FoldersOrder)
|
||||||
|
|
Loading…
Reference in New Issue