mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-10-12 23:37:15 +00:00
Show current ordering setting in lists
This commit is contained in:
1 parent
71d48dd6b5
commit
12b2ecca72
8 files changed
+112
-32
No files matched your search
@@ -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');
|
||||
|
||||
Reference in new issue
Block a user