diff options
| author | robin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-11-21 08:02:48 +0000 |
|---|---|---|
| committer | robin <robin@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2006-11-21 08:02:48 +0000 |
| commit | 5905dbf8f92af7b1837c4d9c0bf5893ebaaa6c9c (patch) | |
| tree | 611d8aaf77d26bea172c6fa0b87b466a343d60ac /roundcubemail/program/js | |
| parent | 694c9abde7b33656a83d571fe05d815bb56537d9 (diff) | |
Add first and last buttons.
git-svn-id: https://svn.roundcube.net/trunk@374 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program/js')
| -rw-r--r-- | roundcubemail/program/js/app.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/roundcubemail/program/js/app.js b/roundcubemail/program/js/app.js index ae68ea816..6485a98d7 100644 --- a/roundcubemail/program/js/app.js +++ b/roundcubemail/program/js/app.js @@ -141,9 +141,15 @@ function rcube_webmail() { this.enable_command('show', 'reply', 'reply-all', 'forward', 'moveto', 'delete', 'viewsource', 'print', 'load-attachment', true); if (this.env.next_uid) + { this.enable_command('nextmessage', true); + this.enable_command('lastmessage', true); + } if (this.env.prev_uid) + { this.enable_command('previousmessage', true); + this.enable_command('firstmessage', true); + } } if (this.env.action=='show' && this.env.blockedobjects) @@ -478,10 +484,18 @@ function rcube_webmail() this.list_page('next'); break; + case 'lastpage': + this.list_page('last'); + break; + case 'previouspage': this.list_page('prev'); break; + case 'firstpage': + this.list_page('first'); + break; + case 'expunge': if (this.env.messagecount) this.expunge_mailbox(this.env.mailbox); @@ -656,10 +670,20 @@ function rcube_webmail() this.show_message(this.env.next_uid); break; + case 'lastmessage': + if (this.env.last_uid) + this.show_message(this.env.last_uid); + break; + case 'previousmessage': if (this.env.prev_uid) this.show_message(this.env.prev_uid); break; + + case 'firstmessage': + if (this.env.first_uid) + this.show_message(this.env.first_uid); + break; case 'checkmail': this.check_for_recent(); @@ -1095,8 +1119,12 @@ function rcube_webmail() { if (page=='next') page = this.env.current_page+1; + if (page=='last') + page = this.env.pagecount; if (page=='prev' && this.env.current_page>1) page = this.env.current_page-1; + if (page=='first' && this.env.current_page>1) + page = 1; if (page > 0 && page <= this.env.pagecount) { @@ -2634,7 +2662,9 @@ function rcube_webmail() this.set_page_buttons = function() { this.enable_command('nextpage', (this.env.pagecount > this.env.current_page)); + this.enable_command('lastpage', (this.env.pagecount > this.env.current_page)); this.enable_command('previouspage', (this.env.current_page > 1)); + this.enable_command('firstpage', (this.env.current_page > 1)); } |
