Page MenuHomePhorge

No OneTemporary

diff --git a/skins/default/functions.js b/skins/default/functions.js
index e232ac771..53519d181 100644
--- a/skins/default/functions.js
+++ b/skins/default/functions.js
@@ -1,141 +1,169 @@
/**
* RoundCube functions for default skin interface
*/
/**
* Settings
*/
function rcube_init_settings_tabs()
{
if (window.rcmail && rcmail.env.action)
{
var action = rcmail.env.action=='preferences' ? 'default' : (rcmail.env.action.indexOf('identity')>0 ? 'identities' : rcmail.env.action);
var tab = document.getElementById('settingstab'+action);
}
else
var tab = document.getElementById('settingstabdefault');
if (tab)
tab.className = 'tablink-selected';
}
function rcube_show_advanced(visible)
{
var rows = document.getElementsByTagName('TR');
for(var i=0; i<rows.length; i++)
if(rows[i].className && rows[i].className.match(/advanced/))
rows[i].style.display = visible ? (bw.ie ? 'block' : 'table-row') : 'none';
}
/**
* Mail Composing
*/
-function rcmail_show_header_form(id, link)
+function rcmail_show_header_form(id)
{
- var row, parent, ns, ps, links;
-
- if (link)
- {
- var parent = link.parentNode;
+ var link, row, parent, ns, ps;
+
+ link = document.getElementById(id + '-link');
+ parent = link.parentNode;
- if ((ns = rcmail_next_sibling(link)))
- parent.removeChild(ns);
- else if ((ps = rcmail_prev_sibling(link)))
- parent.removeChild(ps);
+ if ((ns = rcmail_next_sibling(link)))
+ ns.style.display = 'none';
+ else if ((ps = rcmail_prev_sibling(link)))
+ ps.style.display = 'none';
- parent.removeChild(link);
+ link.style.display = 'none';
- if(!parent.getElementsByTagName('A').length)
- document.getElementById('compose-links').style.display = 'none';
- }
-
- if (row = document.getElementById(id))
+ if (row = document.getElementById('compose-' + id))
{
var div = document.getElementById('compose-div');
var headers_div = document.getElementById('compose-headers-div');
row.style.display = (document.all && !window.opera) ? 'block' : 'table-row';
div.style.top = (parseInt(headers_div.offsetHeight)) + 'px';
}
return false;
}
+function rcmail_hide_header_form(id)
+{
+ var row, parent, ns, ps, link, links;
+
+ link = document.getElementById(id + '-link');
+ link.style.display = '';
+
+ parent = link.parentNode;
+ links = parent.getElementsByTagName('A');
+
+ for (var i=0; i<links.length; i++)
+ if (links[i].style.display != 'none')
+ for (var j=i+1; j<links.length; j++)
+ if (links[j].style.display != 'none')
+ if ((ns = rcmail_next_sibling(links[i]))) {
+ ns.style.display = '';
+ break;
+ }
+
+ document.getElementById('_' + id).value = '';
+
+ if (row = document.getElementById('compose-' + id))
+ {
+ var div = document.getElementById('compose-div');
+ var headers_div = document.getElementById('compose-headers-div');
+ row.style.display = 'none';
+ div.style.top = (parseInt(headers_div.offsetHeight)) + 'px';
+ }
+
+ return false;
+}
+
function rcmail_next_sibling(elm)
{
var ns = elm.nextSibling;
while (ns && ns.nodeType == 3)
ns = ns.nextSibling;
return ns;
}
function rcmail_prev_sibling(elm)
{
var ps = elm.previousSibling;
while (ps && ps.nodeType == 3)
ps = ps.previousSibling;
return ps;
}
function rcmail_init_compose_form()
{
- var cc_field = document.getElementById('rcmcomposecc');
+ var cc_field = document.getElementById('_cc');
if (cc_field && cc_field.value!='')
- rcmail_show_header_form('compose-cc', document.getElementById('addcclink'));
- var bcc_field = document.getElementById('rcmcomposebcc');
+ rcmail_show_header_form('cc');
+
+ var bcc_field = document.getElementById('_bcc');
if (bcc_field && bcc_field.value!='')
- rcmail_show_header_form('compose-bcc', document.getElementById('addbcclink'));
+ rcmail_show_header_form('bcc');
// prevent from form data loss when pressing ESC key in IE
if (bw.ie) {
var form = rcube_find_object('form');
form.onkeydown = function (e) { if (rcube_event.get_keycode(e) == 27) rcube_event.cancel(e); };
}
}
/**
* Mailbox view
*/
function rcube_mail_ui()
{
this.markmenu = new rcube_layer('markmessagemenu');
}
rcube_mail_ui.prototype = {
show_markmenu: function(show)
{
if (typeof show == 'undefined')
show = this.markmenu.visible ? false : true;
var ref = rcube_find_object('markreadbutton');
if (show && ref)
this.markmenu.move(ref.offsetLeft, ref.offsetTop + ref.offsetHeight);
this.markmenu.show(show);
},
body_mouseup: function(evt, p)
{
if (this.markmenu && this.markmenu.visible && evt.target != rcube_find_object('markreadbutton'))
this.show_markmenu(false);
},
body_keypress: function(evt, p)
{
if (rcube_event.get_keycode(evt) == 27 && this.markmenu && this.markmenu.visible)
this.show_markmenu(false);
}
};
var rcmail_ui;
function rcube_init_mail_ui()
{
rcmail_ui = new rcube_mail_ui();
rcube_event.add_listener({ object:rcmail_ui, method:'body_mouseup', event:'mouseup' });
rcube_event.add_listener({ object:rcmail_ui, method:'body_keypress', event:'keypress' });
}
diff --git a/skins/default/images/icons/minus.gif b/skins/default/images/icons/minus.gif
new file mode 100644
index 000000000..4ec02c87a
Binary files /dev/null and b/skins/default/images/icons/minus.gif differ
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index aa45ef027..712db6629 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -1,101 +1,104 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><roundcube:object name="productname" /> :: <roundcube:label name="compose" /></title>
<roundcube:include file="/includes/links.html" />
<link rel="stylesheet" type="text/css" href="/mail.css" />
<link rel="stylesheet" type="text/css" href="/googiespell.css" />
<script type="text/javascript" src="/functions.js"></script>
</head>
<body onload="rcmail_init_compose_form()">
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
<form name="form" action="./" method="post">
<div id="messagetoolbar">
<table border="0" cellspacing="0" cellpadding="0"><tr>
<td id="compose-toolbar">
<roundcube:button command="list" image="/images/buttons/back_act.png" imageSel="/images/buttons/back_sel.png" imageAct="/images/buttons/back_act.png" width="32" height="32" title="backtolist" />
<roundcube:button command="send" imageSel="/images/buttons/send_sel.png" imageAct="/images/buttons/send_act.png" imagePas="/images/buttons/send_pas.png" width="32" height="32" title="sendmessage" />
<roundcube:button command="spellcheck" imageSel="/images/buttons/spellcheck_sel.png" imageAct="/images/buttons/spellcheck_act.png" imagePas="/images/buttons/spellcheck_pas.png" width="32" height="32" title="checkspelling" />
<roundcube:button command="add-attachment" imageSel="/images/buttons/attach_sel.png" imageAct="/images/buttons/attach_act.png" imagePas="/images/buttons/attach_pas.png" width="32" height="32" title="addattachment" />
<roundcube:button command="savedraft" imageSel="/images/buttons/drafts_sel.png" imageAct="/images/buttons/drafts_act.png" imagePas="/images/buttons/drafts_pas.png" width="32" height="32" title="savemessage" />
</td>
<td id="priority-selector">
<label for="rcmcomposepriority"><roundcube:label name="priority" />:</label>&nbsp;<roundcube:object name="prioritySelector" form="form" id="rcmcomposepriority" />
</td>
<td id="receipt-selector">
<roundcube:object name="receiptCheckBox" form="form" id="rcmcomposereceipt" />&nbsp;<label for="rcmcomposereceipt"><roundcube:label name="returnreceipt" /></label>
</td>
</tr></table>
</div>
<div id="compose-container">
<div id="compose-headers-div" style="width: 100%;">
<table border="0" cellspacing="0" cellpadding="1" id="compose-headers" summary="">
<tbody>
<tr>
- <td class="title"><label for="rcmcomposefrom"><roundcube:label name="from" /></label></td>
- <td><roundcube:object name="composeHeaders" part="from" form="form" id="rcmcomposefrom" tabindex="1" /></td>
+ <td class="title"><label for="_from"><roundcube:label name="from" /></label></td>
+ <td><roundcube:object name="composeHeaders" part="from" form="form" id="_from" tabindex="1" /></td>
</tr><tr>
- <td class="title top"><label for="rcmcomposeto"><roundcube:label name="to" /></label></td>
- <td><roundcube:object name="composeHeaders" part="to" form="form" id="rcmcomposeto" cols="70" rows="2" tabindex="2" /></td>
+ <td class="title top"><label for="_to"><roundcube:label name="to" /></label></td>
+ <td><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"><label for="rcmcomposecc"><roundcube:label name="cc" /></label></td>
- <td><roundcube:object name="composeHeaders" part="cc" form="form" id="rcmcomposecc" cols="70" rows="2" tabindex="3" /></td>
+ <td class="title top"><a href="#cc" onclick="return rcmail_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></td>
+ <td><roundcube:object name="composeHeaders" part="cc" form="form" id="_cc" cols="70" rows="2" tabindex="3" /></td>
</tr><tr id="compose-bcc">
- <td class="title top"><label for="rcmcomposebcc"><roundcube:label name="bcc" /></label></td>
- <td><roundcube:object name="composeHeaders" part="bcc" form="form" id="rcmcomposebcc" cols="70" rows="2" tabindex="4" /></td>
+ <td class="title top"><a href="#bcc" onclick="return rcmail_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></td>
+ <td><roundcube:object name="composeHeaders" part="bcc" form="form" id="_bcc" cols="70" rows="2" tabindex="4" /></td>
</tr><tr id="compose-replyto">
- <td class="title top"><label for="rcmcomposereplyto"><roundcube:label name="replyto" /></label></td>
- <td><roundcube:object name="composeHeaders" part="replyto" form="form" id="rcmcomposereplyto" size="70" tabindex="5" /></td>
+ <td class="title top"><a href="#replyto" onclick="return rcmail_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></td>
+ <td><roundcube:object name="composeHeaders" part="replyto" form="form" id="_replyto" size="70" tabindex="5" /></td>
</tr><tr id="compose-links">
<td></td>
<td class="formlinks">
- <a href="#cc" onclick="return rcmail_show_header_form('compose-cc', this);" id="addcclink"><roundcube:label name="addcc" /></a>
+ <a href="#cc" onclick="return rcmail_show_header_form('cc')" id="cc-link"><roundcube:label name="addcc" /></a>
<span class="separator">|</span>
- <a href="#bcc" onclick="return rcmail_show_header_form('compose-bcc', this);" id="addbcclink"><roundcube:label name="addbcc" /></a>
+ <a href="#bcc" onclick="return rcmail_show_header_form('bcc')" id="bcc-link"><roundcube:label name="addbcc" /></a>
<span class="separator">|</span>
- <a href="#reply-to" onclick="return rcmail_show_header_form('compose-replyto', this);" id="addreplytolink"><roundcube:label name="addreplyto" /></a>
+ <a href="#reply-to" onclick="return rcmail_show_header_form('replyto')" id="replyto-link"><roundcube:label name="addreplyto" /></a>
</td>
</tr><tr>
<td class="title"><label for="compose-subject"><roundcube:label name="subject" /></label></td>
<td><roundcube:object name="composeSubject" id="compose-subject" form="form" tabindex="6" /></td>
</tr>
</tbody>
</table>
</div>
<div id="compose-div">
<roundcube:object name="composeBody" id="compose-body" form="form" cols="70" rows="20" tabindex="7" />
<table border="0" cellspacing="0" summary="" style="width:100%; margin-top: 5px;"><tbody>
<tr>
<td style="white-space: nowrap">
<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" />
</td>
<td style="text-align:center; white-space: nowrap">
<label><roundcube:label name="savesentmessagein" />: <roundcube:object name="storetarget" maxlength="30" /></label>
</td>
<td style="text-align:right; white-space:nowrap">
<roundcube:label name="editortype" />:&nbsp;
<span class="radios-left"><roundcube:object name="editorSelector" editorid="compose-body" tabindex="10" /></span>
</td>
</tr>
</tbody></table>
</div>
</div>
<div id="compose-attachments">
<div id="attachment-title"><roundcube:label name="attachments" /></div>
<roundcube:object name="composeAttachmentList" deleteIcon="/images/icons/remove-attachment.png"/ >
<p><roundcube:button command="add-attachment" imagePas="/images/buttons/add_pas.png" imageSel="/images/buttons/add_sel.png" imageAct="/images/buttons/add_act.png" width="23" height="18" title="addattachment" /></p>
</div>
</form>
<roundcube:object name="composeAttachmentForm" id="attachment-form" />
</body>
</html>

File Metadata

Mime Type
text/x-diff
Expires
Sat, Mar 1, 12:06 PM (6 h, 21 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
166938
Default Alt Text
(13 KB)

Event Timeline