Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Revert "Add full headers view in message preview window (#1488538)"

This reverts commit af276f2.

Conflicts:

	CHANGELOG
	skins/larry/mail.css
  • Loading branch information...
commit c23aad2feb9923cbf9197f4d99f73978a61de832 1 parent ab08544
Thomas B. authored October 01, 2012
9  program/steps/mail/func.inc
@@ -1055,17 +1055,12 @@ function rcmail_message_full_headers($attrib, $headers=NULL)
1055 1055
   global $OUTPUT;
1056 1056
 
1057 1057
   $html = html::div(array('id' => "all-headers", 'class' => "all", 'style' => 'display:none'), html::div(array('id' => 'headers-source'), ''));
1058  
-
1059  
-  if (!get_boolean($attrib['no-switch'])) {
1060  
-    $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)"), '');
1061  
-  }
1062  
-
1063  
-  unset($attrib['no-switch']);
  1058
+  $html .= html::div(array('class' => "more-headers show-headers", 'onclick' => "return ".JS_OBJECT_NAME.".command('show-headers','',this)"), '');
1064 1059
 
1065 1060
   $OUTPUT->add_gui_object('all_headers_row', 'all-headers');
1066 1061
   $OUTPUT->add_gui_object('all_headers_box', 'headers-source');
1067 1062
 
1068  
-  return count($attrib) > 1 ? html::div($attrib, $html) : $html;
  1063
+  return html::div($attrib, $html);
1069 1064
 }
1070 1065
 
1071 1066
 
6  skins/larry/ie7hacks.css
@@ -29,7 +29,7 @@ a.deletebutton,
29 29
 .boxfooter .listbutton .inner,
30 30
 .attachmentslist li a.delete,
31 31
 .attachmentslist li a.cancelupload,
32  
-#messageheader .iconlink {
  32
+#messagepreviewheader .iconlink {
33 33
 	/* workaround for text-indent which also offsets the background image */
34 34
 	text-indent: 0;
35 35
 	font-size: 0;
@@ -45,7 +45,7 @@ a.deletebutton,
45 45
 
46 46
 .pagenav a.button,
47 47
 .pagenav a.button span.inner,
48  
-#messageheader .iconlink,
  48
+#messagepreviewheader .iconlink,
49 49
 #uploadform a.iconlink {
50 50
 	display: inline;
51 51
 }
@@ -67,7 +67,7 @@ a.deletebutton,
67 67
 	text-align: left;
68 68
 }
69 69
 
70  
-#messageheader .iconlink {
  70
+#messagepreviewheader .iconlink {
71 71
 	color: #fff;
72 72
 	height: 14px;
73 73
 }
2  skins/larry/iehacks.css
@@ -143,7 +143,7 @@ ul.toolbarmenu li a.active:hover,
143 143
 	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#005d76', endColorstr='#004558', GradientType=0);
144 144
 }
145 145
 
146  
-#partheader, #composeheaders {
  146
+#messageheader, #partheader, #composeheaders {
147 147
 	filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e9e9e9', GradientType=0);
148 148
 }
149 149
 
BIN  skins/larry/images/contactpic_32px.png
BIN  skins/larry/images/contactpic_48px.png
79  skins/larry/mail.css
@@ -38,6 +38,10 @@
38 38
 	bottom: 28px;
39 39
 }
40 40
 
  41
+#mailview-top.fullheight {
  42
+	border-radius: 4px 4px 0 0;
  43
+}
  44
+
41 45
 #mailview-bottom {
42 46
 	position: absolute;
43 47
 	left: 0;
@@ -46,10 +50,6 @@
46 50
 	height: 26px;
47 51
 }
48 52
 
49  
-#mailview-top.fullheight {
50  
-	border-radius: 4px 4px 0 0;
51  
-}
52  
-
53 53
 #folderlist-header {
54 54
 	width: 100%;
55 55
 	height: 12px;
@@ -675,14 +675,15 @@ a.iconbutton.threadmode.selected {
675 675
 
676 676
 #messagecontent {
677 677
 	position: absolute;
678  
-	top: 0;
  678
+	top: 140px;
679 679
 	left: 0;
680 680
 	width: 100%;
681  
-	bottom: 28px;
  681
+	bottom: 0;
682 682
 	overflow: auto;
683 683
 	border-radius: 4px 4px 0 0;
684 684
 }
685 685
 
  686
+#messageheader,
686 687
 #partheader,
687 688
 #composeheaders {
688 689
 	position: relative;
@@ -706,7 +707,7 @@ h2.subject {
706 707
 
707 708
 h3.subject {
708 709
 	font-size: 14px;
709  
-	margin: 0 13em 0 0;
  710
+	margin: 0 8em 0 0;
710 711
 	padding: 8px 8px 4px 8px;
711 712
 	white-space: nowrap;
712 713
 	overflow: hidden;
@@ -781,7 +782,6 @@ h3.subject {
781 782
 	background: -ms-linear-gradient(left, #fbfbfb 0, #e9e9e9 100%);
782 783
 	background: linear-gradient(left, #fbfbfb 0, #e9e9e9 100%);
783 784
 	border-right: 1px solid #dfdfdf;
784  
-	border-radius: 3px 0 0 0; /* for Opera */
785 785
 }
786 786
 
787 787
 #previewheaderstoggle .iconlink {
@@ -796,29 +796,28 @@ h3.subject {
796 796
 
797 797
 #previewheaderstoggle.remove .iconlink {
798 798
 	top: auto;
799  
-	bottom: 15px;
  799
+	bottom: 5px;
800 800
 	background-position: -5px -242px;
801 801
 }
802 802
 
803  
-#previewheaderstoggle .iconlink.allheaders {
804  
-	display: none;
  803
+div.more-headers {
  804
+	cursor: pointer;
  805
+	height: 10px;
  806
+	background: url(images/buttons.png) center -1619px no-repeat;
805 807
 }
806 808
 
807  
-#previewheaderstoggle.remove .iconlink.allheaders {
808  
-	top: auto;
809  
-	bottom: 2px;
810  
-	display: inline-block;
811  
-	background-position: -27px -242px;
  809
+div.hide-headers {
  810
+	background-position: center -1629px;
812 811
 }
813 812
 
814 813
 #all-headers {
815 814
 	position: relative;
816  
-	margin: 2px 0;
  815
+	margin: 0 10px;
817 816
 	padding: 0;
818 817
 	height: 180px;
819  
-	background-color: #f0f0f0;
820  
-	overflow: hidden;
  818
+	border: 1px solid #bbb;
821 819
 	border-radius: 4px;
  820
+	background: #fff;
822 821
 }
823 822
 
824 823
 #headers-source {
@@ -828,31 +827,26 @@ h3.subject {
828 827
 	left: 0;
829 828
 	right: 0;
830 829
 	bottom: 0;
831  
-	padding: 2px;
  830
+	padding: 2px 5px;
832 831
 	overflow: auto;
833 832
 	text-align: left;
834  
-	color: #666;
  833
+	color: #333;
835 834
 }
836 835
 
837  
-#messageheader {
  836
+#messagepreviewheader {
838 837
 	position: relative;
839 838
 	height: auto;
840 839
 	min-height: 52px;
841 840
 	margin: 0 8px 0 0;
842  
-	padding: 0 0 0 72px;
  841
+	padding: 0 0 6px 72px;
843 842
 	border-bottom: 2px solid #f0f0f0;
844 843
 }
845 844
 
846  
-#messagecontent #messageheader {
847  
-	padding: 0 0 0 90px;
848  
-	min-height: 68px;
849  
-}
850  
-
851  
-#messageheader h3.subject {
  845
+#messagepreviewheader h3.subject {
852 846
 	padding: 8px 8px 2px 0;
853 847
 }
854 848
 
855  
-#messageheader #contactphoto {
  849
+#messagepreviewheader #contactphoto {
856 850
 	display: block;
857 851
 	position: absolute;
858 852
 	top: 11px;
@@ -864,35 +858,46 @@ h3.subject {
864 858
 	border-radius: 3px;
865 859
 }
866 860
 
867  
-#messageheader #contactphoto img {
  861
+#messagepreviewheader #contactphoto img {
868 862
 	width: 32px;
869 863
 	height: auto;
870 864
 	border-radius: 3px;
871 865
 }
872 866
 
873  
-#messagecontent #messageheader #contactphoto {
874  
-	top: 11px;
875  
-	left: 31px;
  867
+#messageheader #contactphoto {
  868
+	display: block;
  869
+	position: absolute;
  870
+	top: 40px;
  871
+	right: 10px;
876 872
 	width: 48px;
877 873
 	height: 48px;
878  
-	background: url(images/contactpic_48px.png) center center no-repeat #fff;
  874
+	overflow: hidden;
879 875
 	border-radius: 4px;
880 876
 }
881 877
 
882  
-#messagecontent #messageheader #contactphoto img {
  878
+#messageheader #contactphoto img {
883 879
 	width: 48px;
884 880
 	height: auto;
885 881
 	border-radius: 4px;
886 882
 }
887 883
 
  884
+#messagepreviewheader #countcontrols,
888 885
 #messageheader #countcontrols {
889 886
 	position: absolute;
890 887
 	top: 8px;
891  
-	right: 0;
  888
+	right: 8px;
  889
+	width: 20em;
892 890
 	text-align: right;
893 891
 	white-space: nowrap;
894 892
 }
895 893
 
  894
+#messageheader .pagenav .countdisplay {
  895
+	min-width: 0;
  896
+	padding-right: 0.5em;
  897
+	white-space: nowrap;
  898
+}
  899
+
  900
+#messagecontent .leftcol,
896 901
 #messagepreview .leftcol {
897 902
 	margin-right: 252px;
898 903
 	overflow-x: auto;
2  skins/larry/svggradients.css
@@ -133,7 +133,7 @@ ul.toolbarmenu li a.active:hover,
133 133
 	background-image: url(svggradient.php?c=005d76;004558);
134 134
 }
135 135
 
136  
-#partheader, #composeheaders {
  136
+#messageheader, #partheader, #composeheaders {
137 137
 	background-image: url(svggradient.php?c=ffffff;e9e9e9);
138 138
 }
139 139
 
61  skins/larry/templates/message.html
@@ -24,38 +24,20 @@
24 24
 
25 25
 <!-- folders list -->
26 26
 <div id="mailboxcontainer" class="uibox listbox">
27  
-    <div class="scroller">
28  
-        <roundcube:object name="mailboxlist" id="mailboxlist" class="listing" folder_filter="mail" unreadwrap="%s" />
29  
-    </div>
  27
+<div class="scroller">
  28
+<roundcube:object name="mailboxlist" id="mailboxlist" class="listing" folder_filter="mail" unreadwrap="%s" />
  29
+</div>
30 30
 </div>
31 31
 
32  
-</div><!-- end mailview-left -->
33  
-
34  
-<div id="mailview-right" class="uibox" style="top: 42px">
35  
-
36  
-<div id="messagecontent">
37  
-
38  
-<div id="messageheader">
39  
-<h3 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h3>
40  
-
41  
-<a href="#details" id="previewheaderstoggle"><span class="iconlink"></span><span id="headerstoggleall" class="iconlink allheaders"></span></a>
  32
+</div>
42 33
 
43  
-<div id="contactphoto"><roundcube:object name="contactphoto" /></div>
  34
+<div id="mailview-right">
44 35
 
45  
-<table class="headers-table" id="preview-shortheaders"><tbody><tr>
46  
-<roundcube:if condition="env:mailbox == config:drafts_mbox || env:mailbox == config:sent_mbox">
47  
-	<td class="header-title"><roundcube:label name="to" /></td>
48  
-	<td class="header from"><roundcube:object name="messageHeaders" valueOf="to" addicon="/images/addcontact.png" /></td>
49  
-<roundcube:else />
50  
-	<td class="header-title"><roundcube:label name="from" /></td>
51  
-	<td class="header from"><roundcube:object name="messageHeaders" valueOf="from" addicon="/images/addcontact.png" /></td>
52  
-<roundcube:endif />
53  
-	<td class="header-title"><roundcube:label name="date" /></td>
54  
-	<td class="header from"><roundcube:object name="messageHeaders" valueOf="date" /></td>
55  
-</tr></tbody></table>
56  
-
57  
-<roundcube:object name="messageHeaders" id="preview-allheaders" class="headers-table" addicon="/images/addcontact.png" exclude="subject,replyto" />
58  
-<roundcube:object name="messageFullHeaders" no-switch="true" />
  36
+<div id="mailview-top">
  37
+<div id="messageheader" class="uibox">
  38
+<h2 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h2>
  39
+<roundcube:object name="messageHeaders" class="headers-table" addicon="/images/addcontact.png" exclude="subject" />
  40
+<roundcube:object name="messageFullHeaders" id="full-headers" />
59 41
 
60 42
 <!-- record navigation -->
61 43
 <div id="countcontrols" class="pagenav">
@@ -64,21 +46,24 @@ <h3 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" />
64 46
 	<roundcube:button command="nextmessage" type="link" class="button nextpage disabled" classAct="button nextpage" classSel="button nextpage pressed" innerClass="inner" title="nextmessage" content="&amp;gt;" />
65 47
 </div>
66 48
 
67  
-</div><!-- end messageheader -->
  49
+<div id="contactphoto"><roundcube:object name="contactphoto" /></div>
  50
+</div>
68 51
 
69  
-<div id="messagepreview">
70  
-    <div class="rightcol">
71  
-        <roundcube:object name="messageAttachments" id="attachment-list" class="attachmentslist" />
72  
-    </div>
73  
-    <div class="leftcol">
74  
-        <roundcube:object name="messageObjects" id="message-objects" />
75  
-        <roundcube:object name="messageBody" id="messagebody" />
76  
-    </div>
  52
+<div id="messagecontent" class="uibox">
  53
+<div class="rightcol">
  54
+<roundcube:object name="messageAttachments" id="attachment-list" class="attachmentslist" />
  55
+</div>
  56
+<div class="leftcol">
  57
+<roundcube:object name="messageObjects" id="message-objects" />
  58
+<roundcube:object name="messageBody" id="messagebody" />
  59
+</div>
77 60
 </div>
78 61
 
79  
-</div><!-- end messagecontent -->
  62
+</div><!-- end mailview-top -->
80 63
 
  64
+<div id="mailview-bottom" class="uibox">
81 65
 <roundcube:object name="message" id="message" class="statusbar" />
  66
+</div>
82 67
 
83 68
 </div><!-- end mailview-right -->
84 69
 
10  skins/larry/templates/messageerror.html
@@ -27,6 +27,8 @@
27 27
 
28 28
 </div>
29 29
 
  30
+<div id="mailview-right">
  31
+
30 32
 <!-- toolbar -->
31 33
 <div id="messagetoolbar" class="fullwidth">
32 34
 	<div id="mailtoolbar" class="toolbar">
@@ -34,11 +36,11 @@
34 36
 	</div>
35 37
 </div>
36 38
 
37  
-<div id="mailview-right" class="uibox" style="top: 42px">
38  
-
39  
-<div id="messagecontent" class="watermark"></div>
  39
+<div id="mailview-top" class="uibox watermark"></div>
40 40
 
41  
-<roundcube:object name="message" id="message" class="statusbar" />
  41
+<div id="mailview-bottom" class="uibox">
  42
+	<roundcube:object name="message" id="message" class="statusbar" />
  43
+</div>
42 44
 
43 45
 </div><!-- end mailview-right -->
44 46
 
5  skins/larry/templates/messagepreview.html
@@ -6,10 +6,10 @@
6 6
 </head>
7 7
 <body class="iframe fullheight">
8 8
 
9  
-<div id="messageheader">
  9
+<div id="messagepreviewheader">
10 10
 <h3 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" /></h3>
11 11
 
12  
-<a href="#details" id="previewheaderstoggle"><span class="iconlink"></span><span id="headerstoggleall" class="iconlink allheaders"></a>
  12
+<a href="#details" id="previewheaderstoggle"><span class="iconlink"></span></a>
13 13
 <div id="contactphoto"><roundcube:object name="contactphoto" /></div>
14 14
 
15 15
 <table class="headers-table" id="preview-shortheaders"><tbody><tr>
@@ -25,7 +25,6 @@ <h3 class="subject"><roundcube:object name="messageHeaders" valueOf="subject" />
25 25
 </tr></tbody></table>
26 26
 
27 27
 <roundcube:object name="messageHeaders" id="preview-allheaders" class="headers-table" addicon="/images/addcontact.png" exclude="subject,replyto" />
28  
-<roundcube:object name="messageFullHeaders" no-switch="true" />
29 28
 
30 29
 <!-- record navigation -->
31 30
 <div id="countcontrols" class="pagenav">
34  skins/larry/ui.js
@@ -74,8 +74,9 @@ function rcube_mail_ui()
74 74
 
75 75
       if (rcmail.env.action == 'show' || rcmail.env.action == 'preview') {
76 76
         layout_messageview();
77  
-        $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false; });
78  
-        $('#headerstoggleall').click(function(e){ toggle_all_headers(this); return false; });
  77
+        rcmail.addEventListener('aftershow-headers', function() { layout_messageview(); });
  78
+        rcmail.addEventListener('afterhide-headers', function() { layout_messageview(); });
  79
+        $('#previewheaderstoggle').click(function(e){ toggle_preview_headers(this); return false });
79 80
       }
80 81
       else if (rcmail.env.action == 'compose') {
81 82
         rcmail.addEventListener('aftertoggle-editor', function(){ window.setTimeout(function(){ layout_composeview() }, 200); });
@@ -320,6 +321,7 @@ function rcube_mail_ui()
320 321
    */
321 322
   function layout_messageview()
322 323
   {
  324
+    $('#messagecontent').css('top', ($('#messageheader').outerHeight() + 10) + 'px');
323 325
     $('#message-objects div a').addClass('button');
324 326
 
325 327
     if (!$('#attachment-list li').length) {
@@ -512,31 +514,13 @@ function rcube_mail_ui()
512 514
   {
513 515
     $('#preview-shortheaders').toggle();
514 516
     var full = $('#preview-allheaders').toggle(),
515  
-      button = $('#previewheaderstoggle');
516  
-
517  
-    if (!$('#headerstoggleall').length)
518  
-      $('#all-headers').toggle();
  517
+      button = $('a#previewheaderstoggle');
519 518
 
520 519
     // add toggle button to full headers table
521  
-    if (full.is(':visible')) {
522  
-      button.attr('href', '#hide').removeClass('add').addClass('remove');
523  
-    }
524  
-    else {
525  
-      button.attr('href', '#details').removeClass('remove').addClass('add');
526  
-    }
527  
-  }
528  
-
529  
-
530  
-  /**
531  
-   * Show/hide all message headers
532  
-   */
533  
-  function toggle_all_headers(button)
534  
-  {
535  
-    rcmail.command('show-headers', '', button);
536  
-    $(button).remove();
537  
-    $('#previewheaderstoggle span').css({bottom: '5px'});
538  
-
539  
-    return false;
  520
+    if (full.is(':visible'))
  521
+      button.attr('href', '#hide').removeClass('add').addClass('remove')
  522
+    else
  523
+      button.attr('href', '#details').removeClass('remove').addClass('add')
540 524
   }
541 525
 
542 526
 

0 notes on commit c23aad2

Please sign in to comment.
Something went wrong with that request. Please try again.