Partially revert changes on compose screen from r3789

release-0.6
thomascube 14 years ago
parent 5019d9caf7
commit b218aa7d2e

@ -57,6 +57,8 @@ show_popupmenu: function(obj, refname, show, above)
var ref = rcube_find_object(refname); var ref = rcube_find_object(refname);
if (show && ref) { if (show && ref) {
var pos = $(ref).offset(); 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)) }); 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) show_composemenu: function(show)
{ {
this.show_popupmenu(this.composemenu, 'composemenulink', show, true); this.show_popupmenu(this.composemenu, 'composemenulink', show);
}, },
show_uploadform: function(show) show_uploadform: function(show)
@ -93,8 +95,12 @@ show_uploadform: function(show)
if (typeof show == 'object') // called as event handler if (typeof show == 'object') // called as event handler
show = false; show = false;
if (!show) if (!show)
$('input[type=file]').val(''); $('#attachment-form input[type=file]').val('');
this.show_popupmenu(this.uploadform, 'uploadformlink', show, true); this.show_popupmenu(this.uploadform, 'uploadformlink', show, true);
if (this.uploadform.is(':visible'))
$('#attachment-form input[type=file]').click();
}, },
show_searchmenu: function(show) show_searchmenu: function(show)
@ -328,21 +334,21 @@ init_compose_form: function()
rcmail_ui.resize_compose_body(); 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(); $(window).resize();
}, },
resize_compose_body: function() resize_compose_body: function()
{ {
var div = $('#compose-div'), w = div.width(), h = div.height(); var div = $('#compose-div .boxlistcontent'), w = div.width(), h = div.height();
w = w-4; w -= 8; // 2 x 3px padding + 2 x 1px border
h = h-25; 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')) { if (window.tinyMCE && tinyMCE.get('compose-body')) {
$('#compose-body_tbl').width((w+4)+'px').height(''); $('#compose-body_tbl').width((w+6)+'px').height('');
$('#compose-body_ifr').width((w+2)+'px').height((h-54)+'px'); $('#compose-body_ifr').width((w+6)+'px').height((h-54)+'px');
} }
else { else {
$('#googie_edit_layer').height(h+'px'); $('#googie_edit_layer').height(h+'px');
@ -370,7 +376,7 @@ show_header_form: function(id)
var div = document.getElementById('compose-div'), var div = document.getElementById('compose-div'),
headers_div = document.getElementById('compose-headers-div'); headers_div = document.getElementById('compose-headers-div');
row.style.display = (document.all && !window.opera) ? 'block' : 'table-row'; 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(); this.resize_compose_body();
} }

@ -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'); 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 #directorylistbox
{ {
height: expression((parseInt(document.documentElement.clientHeight)-105)+'px'); height: expression((parseInt(document.documentElement.clientHeight)-105)+'px');

@ -1108,7 +1108,18 @@ div.message-htmlpart div.rcmBody
bottom: 0; bottom: 0;
margin: 0; margin: 0;
width: 100%; width: 100%;
border: 1px solid #999; }
#compose-div .boxfooter
{
height: 26px;
background: none;
border-top: 0;
}
#compose-div .boxlistcontent
{
bottom: 26px;
} }
#compose-body #compose-body
@ -1120,8 +1131,8 @@ div.message-htmlpart div.rcmBody
bottom: 0; bottom: 0;
margin: 0; margin: 0;
font-size: 9pt; font-size: 9pt;
border: none;
font-family: monospace; font-family: monospace;
border: 1px solid #999;
resize: none; resize: none;
} }
@ -1133,7 +1144,7 @@ div.message-htmlpart div.rcmBody
#compose-headers td.editfield #compose-headers td.editfield
{ {
padding-right: 5px; padding-right: 5px;
min-width: 200px; width: 95%;
} }
#compose-headers td.top #compose-headers td.top
@ -1159,11 +1170,6 @@ div.message-htmlpart div.rcmBody
border: 1px solid #999; border: 1px solid #999;
} }
#compose-headers td select
{
width: 100%;
}
#compose-headers td textarea #compose-headers td textarea
{ {
height: 32px; height: 32px;
@ -1178,9 +1184,7 @@ div.message-htmlpart div.rcmBody
#formlinks #formlinks
{ {
text-align: right;
white-space: nowrap; white-space: nowrap;
width: 1%;
padding-left: 5px; padding-left: 5px;
} }
@ -1202,16 +1206,16 @@ div.message-htmlpart div.rcmBody
{ {
position: absolute; position: absolute;
right: 5px; right: 5px;
bottom: 0; bottom: 2px;
text-align: right; text-align: right;
line-height: 22px;
} }
#compose-buttons #compose-buttons
{ {
position: absolute; position: absolute;
left: 40px; left: 0;
top: 1px; bottom: 0;
width: auto;
} }
#compose-attachments #compose-attachments

@ -24,9 +24,11 @@
<roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " /> <roundcube:button command="list" type="link" class="button back" classAct="button back" classSel="button backSel" title="backtolist" content=" " />
<roundcube:button command="send" type="link" class="buttonPas send" classAct="button send" classSel="button sendSel" title="sendmessage" content=" " /> <roundcube:button command="send" type="link" class="buttonPas send" classAct="button send" classSel="button sendSel" title="sendmessage" content=" " />
<roundcube:button command="spellcheck" type="link" class="buttonPas spellcheck" classAct="button spellcheck" classSel="button spellcheckSel" title="checkspelling" content=" " /> <roundcube:button command="spellcheck" type="link" class="buttonPas spellcheck" classAct="button spellcheck" classSel="button spellcheckSel" title="checkspelling" content=" " />
<roundcube:button name="addattachment" type="link" class="button attach" classAct="button attach" classSel="button attachSel" title="addattachment" onclick="rcmail_ui.show_uploadform();return false" content=" " />
<roundcube:button command="insert-sig" type="link" class="buttonPas insertsig" classAct="button insertsig" classSel="button insertsigSel" title="insertsignature" content=" " /> <roundcube:button command="insert-sig" type="link" class="buttonPas insertsig" classAct="button insertsig" classSel="button insertsigSel" title="insertsignature" content=" " />
<roundcube:button command="savedraft" type="link" class="buttonPas savedraft" classAct="button savedraft" classSel="button savedraftSel" title="savemessage" content=" " /> <roundcube:button command="savedraft" type="link" class="buttonPas savedraft" classAct="button savedraft" classSel="button savedraftSel" title="savemessage" content=" " />
<roundcube:container name="toolbar" id="compose-toolbar" /> <roundcube:container name="toolbar" id="compose-toolbar" />
<roundcube:button name="messageoptions" id="composemenulink" type="link" class="button messagemenu" title="messageoptions" onclick="rcmail_ui.show_composemenu();return false" content=" " />
</div> </div>
<div id="mainscreen"> <div id="mainscreen">
@ -34,7 +36,7 @@
<div id="compose-attachments"> <div id="compose-attachments">
<div class="boxtitle"><roundcube:label name="attachments" /></div> <div class="boxtitle"><roundcube:label name="attachments" /></div>
<div class="boxlistcontent"> <div class="boxlistcontent">
<roundcube:object name="composeAttachmentList" deleteIcon="/images/icons/delete.png" cancelIcon="/images/icons/delete.png" loadingIcon="/images/display/loading_blue.gif" /> <roundcube:object name="composeAttachmentList" deleteIcon="/images/icons/delete.png" cancelIcon="/images/icons/delete.png" loadingIcon="/images/display/loading_blue.gif" />
</div> </div>
<div class="boxfooter"> <div class="boxfooter">
<roundcube:button name="uploadform" id="uploadformlink" type="link" title="addattachment" class="button addgroup" onclick="rcmail_ui.show_uploadform();return false" content=" " /> <roundcube:button name="uploadform" id="uploadformlink" type="link" title="addattachment" class="button addgroup" onclick="rcmail_ui.show_uploadform();return false" content=" " />
@ -42,76 +44,66 @@
</div> </div>
<script type="text/javascript"> <script type="text/javascript">
var composesplitv = new rcube_splitter({id:'composesplitterv', p1: 'compose-attachments', p2: 'compose-container', orientation: 'v', relative: true, start: 165}); var composesplitv = new rcube_splitter({id:'composesplitterv', p1: 'compose-attachments', p2: 'compose-container', orientation: 'v', relative: true, start: 175});
rcmail.add_onload('composesplitv.init()'); rcmail.add_onload('composesplitv.init()');
</script> </script>
<div id="compose-container"> <div id="compose-container">
<div id="compose-headers-div" style="width: 100%;"> <div id="compose-headers-div" style="width: 100%;">
<table border="0" cellspacing="0" cellpadding="1" id="compose-headers"> <table border="0" cellspacing="0" cellpadding="1" id="compose-headers">
<tr> <tr>
<td class="title"><label for="_from"><roundcube:label name="from" /></label></td> <td class="title"><label for="_from"><roundcube:label name="from" /></label></td>
<td class="editfield"> <td class="editfield"><roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" /></td>
<roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" /> </tr><tr>
</td> <td class="title top"><label for="_to"><roundcube:label name="to" /></label></td>
<td id="formlinks"> <td class="editfield"><roundcube:object name="composeHeaders" part="to" form="form" id="_to" cols="70" rows="2" tabindex="2" /></td>
<a href="#cc" onclick="return rcmail_ui.show_header_form('cc')" id="cc-link"><roundcube:label name="addcc" /></a> </tr><tr id="compose-cc">
<span class="separator">|</span> <td class="title top">
<a href="#bcc" onclick="return rcmail_ui.show_header_form('bcc')" id="bcc-link"><roundcube:label name="addbcc" /></a>
<span class="separator">|</span>
<a href="#reply-to" onclick="return rcmail_ui.show_header_form('replyto')" id="replyto-link"><roundcube:label name="addreplyto" /></a>
</td>
</tr><tr>
<td class="title top"><label for="_to"><roundcube:label name="to" /></label></td>
<td colspan="2" class="editfield">
<roundcube:object name="composeHeaders" part="to" form="form" id="_to" cols="70" rows="2" tabindex="2" />
</td>
</tr><tr id="compose-cc">
<td class="title top">
<a href="#cc" onclick="return rcmail_ui.hide_header_form('cc');"><img src="/images/icons/minus.gif" alt="" title="<roundcube:label name='delete' />" /></a> <a href="#cc" onclick="return rcmail_ui.hide_header_form('cc');"><img src="/images/icons/minus.gif" alt="" title="<roundcube:label name='delete' />" /></a>
<label for="_cc"><roundcube:label name="cc" /></label> <label for="_cc"><roundcube:label name="cc" /></label>
</td>
<td colspan="2" class="editfield">
<roundcube:object name="composeHeaders" part="cc" form="form" id="_cc" cols="70" rows="2" tabindex="3" />
</td> </td>
</tr><tr id="compose-bcc"> <td class="editfield"><roundcube:object name="composeHeaders" part="cc" form="form" id="_cc" cols="70" rows="2" tabindex="3" /></td>
<td class="title top"> </tr><tr id="compose-bcc">
<td class="title top">
<a href="#bcc" onclick="return rcmail_ui.hide_header_form('bcc');"><img src="/images/icons/minus.gif" alt="" title="<roundcube:label name='delete' />" /></a> <a href="#bcc" onclick="return rcmail_ui.hide_header_form('bcc');"><img src="/images/icons/minus.gif" alt="" title="<roundcube:label name='delete' />" /></a>
<label for="_bcc"><roundcube:label name="bcc" /></label> <label for="_bcc"><roundcube:label name="bcc" /></label>
</td> </td>
<td colspan="2" class="editfield"> <td colspan="2" class="editfield"><roundcube:object name="composeHeaders" part="bcc" form="form" id="_bcc" cols="70" rows="2" tabindex="4" /></td>
<roundcube:object name="composeHeaders" part="bcc" form="form" id="_bcc" cols="70" rows="2" tabindex="4" /> </tr><tr id="compose-replyto">
</td> <td class="title top">
</tr><tr id="compose-replyto">
<td class="title top">
<a href="#replyto" onclick="return rcmail_ui.hide_header_form('replyto');"><img src="/images/icons/minus.gif" alt="" title="<roundcube:label name='delete' />" /></a> <a href="#replyto" onclick="return rcmail_ui.hide_header_form('replyto');"><img src="/images/icons/minus.gif" alt="" title="<roundcube:label name='delete' />" /></a>
<label for="_replyto"><roundcube:label name="replyto" /></label> <label for="_replyto"><roundcube:label name="replyto" /></label>
</td>
<td colspan="2" class="editfield">
<roundcube:object name="composeHeaders" part="replyto" form="form" id="_replyto" size="70" tabindex="5" />
</td> </td>
<td class="editfield"><roundcube:object name="composeHeaders" part="replyto" form="form" id="_replyto" size="70" tabindex="5" /></td>
</tr><tr> </tr><tr>
<td class="title"><label for="compose-subject"><roundcube:label name="subject" /></label></td> <td></td>
<td colspan="2" class="editfield"> <td id="formlinks">
<roundcube:object name="composeSubject" id="compose-subject" form="form" tabindex="6" /> <a href="#cc" onclick="return rcmail_ui.show_header_form('cc')" id="cc-link"><roundcube:label name="addcc" /></a>
<span class="separator">|</span>
<a href="#bcc" onclick="return rcmail_ui.show_header_form('bcc')" id="bcc-link"><roundcube:label name="addbcc" /></a>
<span class="separator">|</span>
<a href="#reply-to" onclick="return rcmail_ui.show_header_form('replyto')" id="replyto-link"><roundcube:label name="addreplyto" /></a>
</td> </td>
</tr><tr>
<td class="title"><label for="compose-subject"><roundcube:label name="subject" /></label></td>
<td class="editfield"><roundcube:object name="composeSubject" id="compose-subject" form="form" tabindex="6" /></td>
</tr>
</table> </table>
</div> </div>
<div id="compose-div"> <div id="compose-div">
<div class="boxlistcontent" style="overflow: hidden; top: 0"> <div class="boxlistcontent" style="overflow: hidden; top: 0">
<roundcube:object name="composeBody" id="compose-body" form="form" cols="70" rows="20" tabindex="7" /> <roundcube:object name="composeBody" id="compose-body" form="form" cols="70" rows="20" tabindex="7" />
</div> </div>
<div class="boxfooter"> <div class="boxfooter">
<roundcube:button name="messageoptions" id="composemenulink" type="link" title="messageoptions" class="button groupactions" onclick="rcmail_ui.show_composemenu();return false" content=" " /> <div id="compose-buttons">
<span id="compose-buttons"> <roundcube:button type="input" command="send" class="button mainaction" label="sendmessage" tabindex="8" />
<roundcube:button type="input" command="send" class="button mainaction" label="sendmessage" tabindex="8" /> <roundcube:button type="input" command="list" class="button" label="cancel" tabindex="9" />
<roundcube:button type="input" command="list" class="button" label="cancel" tabindex="9" /> </div>
</span> <div id="compose-editorfooter">
<div id="compose-editorfooter" class="pagenav"> <span id="spellcheck-control" style="margin-right:10px"></span>
<span id="spellcheck-control" style="margin-right: 10px"></span>
<span> <span>
<roundcube:label name="editortype" /> <roundcube:label name="editortype" />
<roundcube:object name="editorSelector" editorid="compose-body" tabindex="10" /> <roundcube:object name="editorSelector" editorid="compose-body" tabindex="10" />
</span> </span>
</div> </div>
</div> </div>
@ -122,15 +114,16 @@
<div id="composeoptionsmenu" class="popupmenu"> <div id="composeoptionsmenu" class="popupmenu">
<table> <table>
<tr><td><label for="rcmcomposereceipt"><roundcube:label name="returnreceipt" />:</label></td> <tr>
<td><roundcube:object name="receiptCheckBox" form="form" id="rcmcomposereceipt" /></td> <td><label for="rcmcomposereceipt"><roundcube:label name="returnreceipt" />:</label></td>
</tr> <td><roundcube:object name="receiptCheckBox" form="form" id="rcmcomposereceipt" /></td>
<tr><td><label for="rcmcomposepriority"><roundcube:label name="priority" />:</label></td> </tr><tr>
<td><roundcube:object name="prioritySelector" form="form" id="rcmcomposepriority" /></td> <td><label for="rcmcomposepriority"><roundcube:label name="priority" />:</label></td>
</tr> <td><roundcube:object name="prioritySelector" form="form" id="rcmcomposepriority" /></td>
<tr><td><label><roundcube:label name="savesentmessagein" />:</label></td> </tr><tr>
<td><roundcube:object name="storetarget" maxlength="30" /></td> <td><label><roundcube:label name="savesentmessagein" />:</label></td>
</tr> <td><roundcube:object name="storetarget" maxlength="30" /></td>
</tr>
</table> </table>
</div> </div>

Loading…
Cancel
Save