From ab8fdaa604b8caecfb9192ea7c6c77417bfbdd47 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Tue, 31 Jul 2012 10:27:37 +0200 Subject: Small code improvement --- program/js/app.js | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'program/js/app.js') diff --git a/program/js/app.js b/program/js/app.js index 01d38fa3d..e0f3b230d 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -5360,13 +5360,6 @@ function rcube_webmail() } }; - // enable/disable buttons for page shifting - this.set_page_buttons = function() - { - this.enable_command('nextpage', 'lastpage', (this.env.pagecount > this.env.current_page)); - this.enable_command('previouspage', 'firstpage', (this.env.current_page > 1)); - }; - // set event handlers on registered buttons this.init_buttons = function() { @@ -5374,7 +5367,7 @@ function rcube_webmail() if (typeof cmd !== 'string') continue; - for (var i=0; i< this.buttons[cmd].length; i++) { + for (var i=0; i this.env.current_page)); + this.enable_command('previouspage', 'firstpage', (this.env.current_page > 1)); + }; + // mark a mailbox as selected and set environment variable this.select_folder = function(name, prefix, encode) { -- cgit v1.2.3