diff --git a/NEWS b/NEWS index fd27a57f8..c106c4604 100644 --- a/NEWS +++ b/NEWS @@ -3,6 +3,7 @@ Enhancements - [web] now possible to show events/task for the current year + - [web] show current ordering setting in lists Bug fixes - [core] properly update the last-modified attribute (#4313) diff --git a/UI/Templates/ContactsUI/UIxContactFoldersView.wox b/UI/Templates/ContactsUI/UIxContactFoldersView.wox index 58edda349..0bd114f1c 100644 --- a/UI/Templates/ContactsUI/UIxContactFoldersView.wox +++ b/UI/Templates/ContactsUI/UIxContactFoldersView.wox @@ -280,15 +280,13 @@ - + - + @@ -446,10 +444,13 @@ - + - {{addressbook.selectedFolder.$cards.length}} - + + {{addressbook.selectedFolder.$cards.length}} + sort + + @@ -459,7 +460,10 @@ - {{addressbook.selectedFolder.$cards.length}} + + {{addressbook.selectedFolder.$cards.length}} + sort + diff --git a/UI/Templates/MailerUI/UIxMailFolderTemplate.wox b/UI/Templates/MailerUI/UIxMailFolderTemplate.wox index ebd03dc96..6399c785d 100644 --- a/UI/Templates/MailerUI/UIxMailFolderTemplate.wox +++ b/UI/Templates/MailerUI/UIxMailFolderTemplate.wox @@ -280,11 +280,14 @@ - - - - - + + + + + + + sort + - + - + - + - + - + @@ -386,7 +386,10 @@ - + + + sort + - {{list.filterpopup() | loc}} + + + sort + diff --git a/UI/WebServerResources/js/Contacts/AddressBookController.js b/UI/WebServerResources/js/Contacts/AddressBookController.js index b12a91a22..79b7f9a9f 100644 --- a/UI/WebServerResources/js/Contacts/AddressBookController.js +++ b/UI/WebServerResources/js/Contacts/AddressBookController.js @@ -8,7 +8,17 @@ */ AddressBookController.$inject = ['$scope', '$q', '$window', '$state', '$timeout', '$mdDialog', '$mdToast', 'Account', 'Card', 'AddressBook', 'sgFocus', 'Dialog', 'sgSettings', 'sgHotkeys', 'stateAddressbooks', 'stateAddressbook']; function AddressBookController($scope, $q, $window, $state, $timeout, $mdDialog, $mdToast, Account, Card, AddressBook, focus, Dialog, Settings, sgHotkeys, stateAddressbooks, stateAddressbook) { - var vm = this, hotkeys = []; + var vm = this, hotkeys = [], sortLabels; + + sortLabels = { + c_cn: 'Name', + c_sn: 'Lastname', + c_givenname: 'Firstname', + c_mail: 'Email', + c_screenname: 'Screen Name', + c_o: 'Organization', + c_telephonenumber: 'Preferred Phone' + }; this.$onInit = function() { AddressBook.selectedFolder = stateAddressbook; @@ -296,13 +306,22 @@ }; this.sort = function(field) { - this.selectedFolder.$filter('', { sort: field }); + if (field) { + this.selectedFolder.$filter('', { sort: field }); + } + else { + return sortLabels[AddressBook.$query.sort]; + } }; this.sortedBy = function(field) { return AddressBook.$query.sort == field; }; + this.ascending = function() { + return AddressBook.$query.asc; + }; + this.searchMode = function() { vm.mode.search = true; focus('search'); diff --git a/UI/WebServerResources/js/Mailer/MailboxController.js b/UI/WebServerResources/js/Mailer/MailboxController.js index c953ebab8..844644a5d 100644 --- a/UI/WebServerResources/js/Mailer/MailboxController.js +++ b/UI/WebServerResources/js/Mailer/MailboxController.js @@ -10,7 +10,16 @@ function MailboxController($window, $scope, $timeout, $q, $state, $mdDialog, $mdToast, stateAccounts, stateAccount, stateMailbox, sgHotkeys, encodeUriFilter, sgSettings, focus, Dialog, Preferences, Account, Mailbox) { var vm = this, defaultWindowTitle = angular.element($window.document).find('title').attr('sg-default') || "SOGo", - hotkeys = []; + hotkeys = [], + sortLabels; + + sortLabels = { + subject: 'Subject', + from: 'From', + date: 'Date', + size: 'Size', + arrival: 'Order Received' + }; this.$onInit = function() { // Expose controller for eventual popup windows @@ -123,13 +132,22 @@ }; this.sort = function(field) { - vm.selectedFolder.$filter({ sort: field }); + if (field) { + vm.selectedFolder.$filter({ sort: field }); + } + else { + return sortLabels[vm.service.$query.sort]; + } }; this.sortedBy = function(field) { return Mailbox.$query.sort == field; }; + this.ascending = function() { + return Mailbox.$query.asc; + }; + this.searchMode = function() { vm.mode.search = true; focus('search'); diff --git a/UI/WebServerResources/js/Scheduler/CalendarListController.js b/UI/WebServerResources/js/Scheduler/CalendarListController.js index c4a73b263..536da919e 100644 --- a/UI/WebServerResources/js/Scheduler/CalendarListController.js +++ b/UI/WebServerResources/js/Scheduler/CalendarListController.js @@ -8,7 +8,23 @@ */ CalendarListController.$inject = ['$rootScope', '$scope', '$q', '$timeout', '$state', '$mdDialog', 'sgHotkeys', 'sgFocus', 'Dialog', 'Preferences', 'CalendarSettings', 'Calendar', 'Component', 'Alarm']; function CalendarListController($rootScope, $scope, $q, $timeout, $state, $mdDialog, sgHotkeys, focus, Dialog, Preferences, CalendarSettings, Calendar, Component, Alarm) { - var vm = this, hotkeys = [], type; + var vm = this, hotkeys = [], type, sortLabels; + + sortLabels = { + title: 'Title', + location: 'Location', + calendarName: 'Calendar', + start: 'Start', + priority: 'Priority', + category: 'Category', + status: 'Status', + events: { + end: 'End' + }, + tasks: { + end: 'Due Date' + } + }; vm.component = Component; vm.componentType = 'events'; @@ -22,7 +38,6 @@ vm.openEvent = openEvent; vm.openTask = openTask; vm.newComponent = newComponent; - vm.filterpopup = filterpopup; vm.filter = filter; vm.filteredBy = filteredBy; vm.sort = sort; @@ -350,12 +365,13 @@ } } - function filterpopup() { - return Component['$query' + vm.componentType.capitalize()].filterpopup; - } - function filter(filterpopup) { - Component.$filter(vm.componentType, { filterpopup: filterpopup }); + if (filterpopup) { + Component.$filter(vm.componentType, { filterpopup: filterpopup }); + } + else { + return Component['$query' + vm.componentType.capitalize()].filterpopup; + } } function filteredBy(filterpopup) { @@ -363,13 +379,23 @@ } function sort(field) { - Component.$filter(vm.componentType, { sort: field }); + if (field) { + Component.$filter(vm.componentType, { sort: field }); + } + else { + var sort = Component['$query' + vm.componentType.capitalize()].sort; + return sortLabels[sort] || sortLabels[vm.componentType][sort]; + } } function sortedBy(field) { return Component['$query' + vm.componentType.capitalize()].sort == field; } + this.ascending = function() { + return Component['$query' + vm.componentType.capitalize()].asc; + }; + function reload() { Calendar.reloadWebCalendars().finally(function() { $rootScope.$emit('calendars:list'); diff --git a/UI/WebServerResources/scss/components/icon/icon.scss b/UI/WebServerResources/scss/components/icon/icon.scss index 5a637e836..c58f1b04f 100644 --- a/UI/WebServerResources/scss/components/icon/icon.scss +++ b/UI/WebServerResources/scss/components/icon/icon.scss @@ -84,6 +84,9 @@ md-icon { &.md-rotate-180-ccw { transform: rotate(-180deg); } + &.md-flip { + transform: scaleY(-1); + } // &.icon-add:before { // content: "\e317"; // }