summaryrefslogtreecommitdiff
path: root/skins/larry/ui.js
diff options
context:
space:
mode:
authorthomascube <thomas@roundcube.net>2011-12-14 09:35:22 +0000
committerthomascube <thomas@roundcube.net>2011-12-14 09:35:22 +0000
commit28e18c75ef693740edc05e7474cf52452cc76157 (patch)
tree228a2a67f3743c7f51dc48eb83bfac6840594595 /skins/larry/ui.js
parent0ea1f1e4ef4d45e89874f99d48a928ac4252ccb0 (diff)
More CSS styling for Larry
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r--skins/larry/ui.js28
1 files changed, 24 insertions, 4 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index b20b53879..36a68938e 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -38,13 +38,21 @@ 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 });
+ $('#maillistmode').addClass(rcmail.env.threading ? '' : 'selected').click(function(e){ switch_view_mode('list'); return false });
+ $('#mailthreadmode').addClass(rcmail.env.threading ? 'selected' : '').click(function(e){ switch_view_mode('thread'); return false });
if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
- init_messageview();
+ layout_messageview();
}
}
+ else if (rcmail.env.task == 'settings') {
+ var tab = '#settingstabpreferences';
+ if (rcmail.env.action)
+ tab = '#settingstab' + (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action.replace(/\./g, ''));
+
+ $(tab).addClass('selected')
+ .children().first().removeAttr('onclick').click(function() { return false; });
+ }
$(document.body).bind('mouseup', function(e){
var config, obj, target = e.target;
@@ -70,12 +78,24 @@ function rcube_mail_ui()
}
}
});
+
+ $(window).resize(resize);
+ }
+
+ /**
+ * Update UI on window resize
+ */
+ function resize()
+ {
+ if (rcmail.env.task == 'mail' && (rcmail.env.action == 'show' || rcmail.env.action == 'preview')) {
+ layout_messageview();
+ }
}
/**
* Adjust UI objects of the mail view screen
*/
- function init_messageview()
+ function layout_messageview()
{
$('#messagecontent').css('top', ($('#messageheader').outerHeight() + 10) + 'px');
$('#message-objects div a').addClass('button');