summaryrefslogtreecommitdiff
path: root/program/js/app.js
diff options
context:
space:
mode:
authorsvncommit <devs@roundcube.net>2006-04-26 17:05:10 +0000
committersvncommit <devs@roundcube.net>2006-04-26 17:05:10 +0000
commitcbd62d9e75c17b87643cd1c4117e6719329c2399 (patch)
tree33c7207d571dd14231f26a805f4d6ebef87bd266 /program/js/app.js
parent88f9e2f1568b0e8fe87139706b0a6528bc6c5bad (diff)
fix number of bugs and issues with last patch.
1) fixed issue where switching folders would lose keyboard commands 2) fixed issue where you could not delete or move multiple messages 3) now moves to next message regardless of deleting it or moving it 4) moves to previous messsage when deleting or moving last message in list
Diffstat (limited to 'program/js/app.js')
-rw-r--r--program/js/app.js15
1 files changed, 11 insertions, 4 deletions
diff --git a/program/js/app.js b/program/js/app.js
index 32607a8c5..0a5746955 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -1294,9 +1294,9 @@ function rcube_webmail()
}
}
}
- if (this.last_selected > 0) this.set_classname(this.list_rows[this.last_selected].obj, 'focused', false);
- this.set_classname(this.list_rows[id].obj, 'focused', true);
+ if (this.last_selected != 0) { this.set_classname(this.list_rows[this.last_selected].obj, 'focused', false);}
this.last_selected = id;
+ this.set_classname(this.list_rows[id].obj, 'focused', true);
};
this.shift_select = function(id, control) {
@@ -1401,6 +1401,7 @@ function rcube_webmail()
// list messages of a specific mailbox
this.list_mailbox = function(mbox, page, sort)
{
+ this.last_selected = 0;
var add_url = '';
var target = window;
@@ -1538,9 +1539,11 @@ function rcube_webmail()
// 'remove' message row from list (just hide it)
if (this.message_rows[id].obj)
this.message_rows[id].obj.style.display = 'none';
- new_row = this.get_next_row();
- this.select_row(new_row.uid,false,false);
}
+ next_row = this.get_next_row();
+ prev_row = this.get_prev_row();
+ new_row = (next_row) ? next_row : prev_row;
+ this.select_row(new_row.uid,false,false);
}
var lock = false;
@@ -1581,6 +1584,10 @@ function rcube_webmail()
this.message_rows[id].obj.style.display = 'none';
}
}
+ next_row = this.get_next_row();
+ prev_row = this.get_prev_row();
+ new_row = (next_row) ? next_row : prev_row;
+ this.select_row(new_row.uid,false,false);
// send request to server
this.http_request('delete', '_uid='+a_uids.join(',')+'&_mbox='+escape(this.env.mailbox)+'&_from='+(this.env.action ? this.env.action : ''));