summaryrefslogtreecommitdiff
path: root/skins/larry/ui.js
diff options
context:
space:
mode:
authorPaweł Słowik <pawel.slowik@iq.pl>2012-09-13 14:24:01 +0200
committerPaweł Słowik <pawel.slowik@iq.pl>2012-09-13 14:24:01 +0200
commit2cdaa79dce689b2dc9ef5c7bf3dcbd9446d86c21 (patch)
tree7482d3bd9a71a9913f4e28392b09e11c519987de /skins/larry/ui.js
parent92a030d928246cfc5f3c0b1f2538dc1bfb4777e3 (diff)
parentd7439260770eb1f70cdc5abf5df13e6c62ff3991 (diff)
Merge branch 'master' of https://github.com/roundcube/roundcubemail
Diffstat (limited to 'skins/larry/ui.js')
-rw-r--r--skins/larry/ui.js42
1 files changed, 32 insertions, 10 deletions
diff --git a/skins/larry/ui.js b/skins/larry/ui.js
index 474c480e8..c221b8681 100644
--- a/skins/larry/ui.js
+++ b/skins/larry/ui.js
@@ -74,9 +74,8 @@ function rcube_mail_ui()
if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
layout_messageview();
- rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); });
- rcmail.addEventListener('afterhide-headers', function() { layout_messageview(); });
- $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false });
+ $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false; });
+ $('#headerstoggleall').click(function(e){ toggle_all_headers(this); return false; });
}
else if (rcmail.env.action == 'compose') {
rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 200); });
@@ -145,7 +144,7 @@ function rcube_mail_ui()
new rcube_splitter({ id:'identviewsplitter', p1:'#identitieslist', p2:'#identity-details',
orientation:'v', relative:true, start:266, min:180, size:12 }).init();
}
- else if (rcmail.env.action == 'preferences') {
+ else if (rcmail.env.action == 'preferences' || !rcmail.env.action) {
new rcube_splitter({ id:'prefviewsplitter', p1:'#sectionslist', p2:'#preferences-box',
orientation:'v', relative:true, start:266, min:180, size:12 }).init();
}
@@ -164,6 +163,12 @@ function rcube_mail_ui()
}
}
+ // set min-width to show all toolbar buttons
+ var screen = $('.minwidth');
+ if (screen.length) {
+ screen.css('min-width', $('.toolbar').width() + $('#quicksearchbar').parent().width() + 20);
+ }
+
// turn a group of fieldsets into tabs
$('.tabbed').each(function(idx, elem){ init_tabs(elem); })
@@ -315,7 +320,6 @@ function rcube_mail_ui()
*/
function layout_messageview()
{
- $('#messagecontent').css('top', ($('#messageheader').outerHeight() + 10) + 'px');
$('#message-objects div a').addClass('button');
if (!$('#attachment-list li').length) {
@@ -508,13 +512,31 @@ function rcube_mail_ui()
{
$('#preview-shortheaders').toggle();
var full = $('#preview-allheaders').toggle(),
- button = $('a#previewheaderstoggle');
+ button = $('#previewheaderstoggle');
+
+ if (!$('#headerstoggleall').length)
+ $('#all-headers').toggle();
// add toggle button to full headers table
- if (full.is(':visible'))
- button.attr('href', '#hide').removeClass('add').addClass('remove')
- else
- button.attr('href', '#details').removeClass('remove').addClass('add')
+ if (full.is(':visible')) {
+ button.attr('href', '#hide').removeClass('add').addClass('remove');
+ }
+ else {
+ button.attr('href', '#details').removeClass('remove').addClass('add');
+ }
+ }
+
+
+ /**
+ * Show/hide all message headers
+ */
+ function toggle_all_headers(button)
+ {
+ rcmail.command('show-headers', '', button);
+ $(button).remove();
+ $('#previewheaderstoggle span').css({bottom: '5px'});
+
+ return false;
}