From 43fa235da354c8b53aa69ba745c1d398a758fcaf Mon Sep 17 00:00:00 2001 From: svncommit <devs@roundcube.net> Date: Wed, 26 Oct 2005 05:42:19 -0400 Subject: [PATCH] --- program/js/app.js | 15 ++++++++++++--- 1 files changed, 12 insertions(+), 3 deletions(-) diff --git a/program/js/app.js b/program/js/app.js index 1e70c42..7179898 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1,4 +1,4 @@ -/* +/* +-----------------------------------------------------------------------+ | RoundCube Webmail Client Script | | | @@ -127,7 +127,7 @@ this.enable_command('add-attachment', 'send-attachment', 'send', true); if (this.env.messagecount) - this.enable_command('select-all', 'select-none', true); + this.enable_command('select-all', 'select-none', 'sort', true); this.set_page_buttons(); @@ -441,6 +441,11 @@ this.list_mailbox(props); else if (this.task=='addressbook') this.list_contacts(); + break; + + case 'sort': + // get the type of sorting + this.list_mailbox('', '', props); break; case 'nextpage': @@ -1011,7 +1016,7 @@ // list messages of a specific mailbox - this.list_mailbox = function(mbox, page) + this.list_mailbox = function(mbox, page, sort) { var add_url = ''; var target = window; @@ -1019,6 +1024,10 @@ if (!mbox) mbox = this.env.mailbox; + // add sort to url if set + if (sort) + add_url += '&_sort=' + sort; + // set page=1 if changeing to another mailbox if (!page && mbox != this.env.mailbox) { -- Gitblit v1.9.1