diff --git a/skins/default/functions.js b/skins/default/functions.js
index cff5b9271..bfc5e8eb3 100644
--- a/skins/default/functions.js
+++ b/skins/default/functions.js
@@ -57,6 +57,8 @@ show_popupmenu: function(obj, refname, show, above)
var ref = rcube_find_object(refname);
if (show && ref) {
var pos = $(ref).offset();
+ if (!above && pos.top + ref.offsetHeight + obj.height() > window.innerHeight)
+ above = true;
obj.css({ left:pos.left, top:(pos.top + (above ? -obj.height() : ref.offsetHeight)) });
}
@@ -85,7 +87,7 @@ show_mailboxmenu: function(show)
show_composemenu: function(show)
{
- this.show_popupmenu(this.composemenu, 'composemenulink', show, true);
+ this.show_popupmenu(this.composemenu, 'composemenulink', show);
},
show_uploadform: function(show)
@@ -93,8 +95,12 @@ show_uploadform: function(show)
if (typeof show == 'object') // called as event handler
show = false;
if (!show)
- $('input[type=file]').val('');
+ $('#attachment-form input[type=file]').val('');
+
this.show_popupmenu(this.uploadform, 'uploadformlink', show, true);
+
+ if (this.uploadform.is(':visible'))
+ $('#attachment-form input[type=file]').click();
},
show_searchmenu: function(show)
@@ -328,21 +334,21 @@ init_compose_form: function()
rcmail_ui.resize_compose_body();
});
- div.style.top = (parseInt(headers_div.offsetHeight, 10) + 1) + 'px';
+ div.style.top = (parseInt(headers_div.offsetHeight, 10) + 3) + 'px';
$(window).resize();
},
resize_compose_body: function()
{
- var div = $('#compose-div'), w = div.width(), h = div.height();
- w = w-4;
- h = h-25;
+ var div = $('#compose-div .boxlistcontent'), w = div.width(), h = div.height();
+ w -= 8; // 2 x 3px padding + 2 x 1px border
+ h -= 4;
- $('#compose-body').width(w-(bw.ie || bw.opera || bw.safari ? 2 : 0)+'px').height(h+'px');
+ $('#compose-body').width(w+'px').height(h+'px');
if (window.tinyMCE && tinyMCE.get('compose-body')) {
- $('#compose-body_tbl').width((w+4)+'px').height('');
- $('#compose-body_ifr').width((w+2)+'px').height((h-54)+'px');
+ $('#compose-body_tbl').width((w+6)+'px').height('');
+ $('#compose-body_ifr').width((w+6)+'px').height((h-54)+'px');
}
else {
$('#googie_edit_layer').height(h+'px');
@@ -370,7 +376,7 @@ show_header_form: function(id)
var div = document.getElementById('compose-div'),
headers_div = document.getElementById('compose-headers-div');
row.style.display = (document.all && !window.opera) ? 'block' : 'table-row';
- div.style.top = (parseInt(headers_div.offsetHeight, 10) + 1) + 'px';
+ div.style.top = (parseInt(headers_div.offsetHeight, 10) + 3) + 'px';
this.resize_compose_body();
}
diff --git a/skins/default/ie6hacks.css b/skins/default/ie6hacks.css
index aaba2f2a6..912eac48f 100644
--- a/skins/default/ie6hacks.css
+++ b/skins/default/ie6hacks.css
@@ -113,6 +113,11 @@ ul.toolbarmenu li.separator_below
height: expression((parseInt(this.parentNode.offsetHeight)-24-parseInt(this.style.top?this.style.top:21))+'px');
}
+#compose-div .boxlistcontent
+{
+ height: expression((parseInt(this.parentNode.offsetHeight)-28-parseInt(this.style.top?this.style.top:21))+'px');
+}
+
#directorylistbox
{
height: expression((parseInt(document.documentElement.clientHeight)-105)+'px');
diff --git a/skins/default/mail.css b/skins/default/mail.css
index dfaf45365..3d3a101e7 100644
--- a/skins/default/mail.css
+++ b/skins/default/mail.css
@@ -1108,7 +1108,18 @@ div.message-htmlpart div.rcmBody
bottom: 0;
margin: 0;
width: 100%;
- border: 1px solid #999;
+}
+
+#compose-div .boxfooter
+{
+ height: 26px;
+ background: none;
+ border-top: 0;
+}
+
+#compose-div .boxlistcontent
+{
+ bottom: 26px;
}
#compose-body
@@ -1120,8 +1131,8 @@ div.message-htmlpart div.rcmBody
bottom: 0;
margin: 0;
font-size: 9pt;
- border: none;
font-family: monospace;
+ border: 1px solid #999;
resize: none;
}
@@ -1133,7 +1144,7 @@ div.message-htmlpart div.rcmBody
#compose-headers td.editfield
{
padding-right: 5px;
- min-width: 200px;
+ width: 95%;
}
#compose-headers td.top
@@ -1159,11 +1170,6 @@ div.message-htmlpart div.rcmBody
border: 1px solid #999;
}
-#compose-headers td select
-{
- width: 100%;
-}
-
#compose-headers td textarea
{
height: 32px;
@@ -1178,9 +1184,7 @@ div.message-htmlpart div.rcmBody
#formlinks
{
- text-align: right;
white-space: nowrap;
- width: 1%;
padding-left: 5px;
}
@@ -1202,16 +1206,16 @@ div.message-htmlpart div.rcmBody
{
position: absolute;
right: 5px;
- bottom: 0;
+ bottom: 2px;
text-align: right;
- line-height: 22px;
}
#compose-buttons
{
position: absolute;
- left: 40px;
- top: 1px;
+ left: 0;
+ bottom: 0;
+ width: auto;
}
#compose-attachments
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index bd5860372..4e167ce12 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -24,9 +24,11 @@