summaryrefslogtreecommitdiff
path: root/skins/larry/ui.js
diff options
context:
space:
mode:
authorThomas Bruederli <thomas@roundcube.net>2012-12-29 16:26:36 +0100
committerThomas Bruederli <thomas@roundcube.net>2012-12-29 16:26:36 +0100
commit6f3c97c5d32f93bb81b157bc4340fef8ee0b60ea (patch)
treeb22f02a15ade46f519c650103362815a2c0ce21c /skins/larry/ui.js
parent49437c123a4435ce98e62edd084442ff20aaef1d (diff)
parentb26171227804a135b8ba4fef605753ee2121be67 (diff)
Merge branch 'master' of github.com:roundcube/roundcubemail
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r--skins/larry/ui.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index da4f2300e..d2faa3611 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -43,6 +43,15 @@ function rcube_mail_ui()
this.hide_header_row = hide_header_row;
+ // set minimal mode on small screens (don't wait for document.ready)
+ if (window.$ && document.body) {
+ var minmode = rcmail.get_cookie('minimalmode');
+ if (parseInt(minmode) || (minmode === null && $(window).height() < 850)) {
+ $(document.body).addClass('minimal');
+ }
+ }
+
+
/**
*
*/
@@ -59,6 +68,17 @@ function rcube_mail_ui()
{
rcmail.addEventListener('message', message_displayed);
+ /*** prepare minmode functions ***/
+ $('#taskbar a').each(function(i,elem){
+ $(elem).append('<span class="tooltip">' + $('.button-inner', this).html() + '</span>')
+ });
+
+ $('#taskbar .minmodetoggle').click(function(e){
+ var ismin = $(document.body).toggleClass('minimal').hasClass('minimal');
+ rcmail.set_cookie('minimalmode', ismin?1:0);
+ $(window).resize();
+ });
+
/*** mail task ***/
if (rcmail.env.task == 'mail') {
rcmail.addEventListener('menu-open', show_listoptions);