diff options
author | thomascube <thomas@roundcube.net> | 2011-12-12 21:43:35 +0000 |
---|---|---|
committer | thomascube <thomas@roundcube.net> | 2011-12-12 21:43:35 +0000 |
commit | a4be516f688d934699dd40f39d7f4f9eaa1ce1eb (patch) | |
tree | 6cd6b3a787de0d90089c9874b95c6ebc9b34870e /skins/larry/ui.js | |
parent | faea23d0b4b0e86955dc5d11afd4311bbeefc052 (diff) |
Larry continued...
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r-- | skins/larry/ui.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js index 274b71b78..b20b53879 100644 --- a/skins/larry/ui.js +++ b/skins/larry/ui.js @@ -38,6 +38,8 @@ function rcube_mail_ui() // rcmail.addEventListener('aftertoggle-editor', 'resize_compose_body_ev', rcmail_ui); rcmail.gui_object('message_dragmenu', 'dragmessagemenu'); $('#mailpreviewtoggle').click(function(e){ toggle_preview_pane(e); return false }); + $('#maillistmode').addClass(rcmail.env.threading ? 'unselected' : 'selected').click(function(e){ switch_view_mode('list'); return false }); + $('#mailthreadmode').addClass(rcmail.env.threading ? 'selected' : 'unselected').click(function(e){ switch_view_mode('thread'); return false }); if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') { init_messageview(); @@ -176,6 +178,16 @@ function rcube_mail_ui() } + function switch_view_mode(mode) + { + if (rcmail.env.threading != (mode == 'thread')) + rcmail.set_list_options(null, undefined, undefined, mode == 'thread' ? 1 : 0); + + $('#maillistmode, #mailthreadmode').removeClass('selected'); + $('#mail'+mode+'mode').addClass('selected'); + } + + /**** popup callbacks ****/ function searchmenu(show) |