Merge branch 'master' of github.com:inverse-inc/sogo

This commit is contained in:
Wolfgang Sourdeau 2012-09-27 10:14:29 -04:00
commit a353b6e4ed
11 changed files with 43 additions and 69 deletions

View file

@ -67,12 +67,8 @@
co = [self clientObject]; co = [self clientObject];
event = (iCalEvent *) [[self clientObject] occurence]; event = (iCalEvent *) [[self clientObject] occurence];
ud = [[context activeUser] userDefaults];
tz = [ud timeZone];
start = [event startDate]; start = [event startDate];
[start setTimeZone: tz];
end = [event endDate]; end = [event endDate];
[end setTimeZone: tz];
if ([event isAllDay]) if ([event isAllDay])
{ {
@ -87,6 +83,10 @@
} }
else else
{ {
ud = [[context activeUser] userDefaults];
tz = [ud timeZone];
[start setTimeZone: tz];
[end setTimeZone: tz];
newStart = [start dateByAddingYears: 0 months: 0 newStart = [start dateByAddingYears: 0 months: 0
days: [daysDelta intValue] days: [daysDelta intValue]
hours: 0 minutes: [startDelta intValue] hours: 0 minutes: [startDelta intValue]

View file

@ -16,7 +16,7 @@
<table class="mailer_fieldtable"> <table class="mailer_fieldtable">
<tr class="mailer_fieldrow"> <tr class="mailer_fieldrow">
<td class="mailer_fieldname" ><var:string label:value="Subject"/>:</td> <td class="mailer_fieldname" ><var:string label:value="Subject"/>:</td>
<td class="mailer_subjectfieldvalue"><var:string value="messageSubject"/></td> <td class="mailer_subjectfieldvalue" id="subject"><var:string value="messageSubject"/></td>
</tr> </tr>
<tr class="mailer_fieldrow"> <tr class="mailer_fieldrow">
<td class="mailer_fieldname" ><var:string label:value="From"/>:</td> <td class="mailer_fieldname" ><var:string label:value="From"/>:</td>

View file

@ -46,7 +46,7 @@
<var:popup const:id="language" const:name="language" <var:popup const:id="language" const:name="language"
list="languages" list="languages"
item="item" item="item"
var:selection="item" var:selection="locale.NSLanguageName"
var:value="item" var:value="item"
string="languageText" string="languageText"
label:noSelectionString="choose" label:noSelectionString="choose"

View file

@ -101,7 +101,7 @@
><var:string label:value="Edit"/></a></span></label> ><var:string label:value="Edit"/></a></span></label>
<hr /> <hr />
<label id="commentArea"><var:string label:value="Description:" <label id="commentArea"><var:string label:value="Description:"
/><textarea rows="20" name="comment" var:value="comment" /></label> /><span class="content"><textarea rows="20" name="comment" var:value="comment" /></span></label>
<label id="documentLabel" style="display: none;"><var:string label:value="Document:" <label id="documentLabel" style="display: none;"><var:string label:value="Document:"
/><span class="content" /><span class="content"
><a href="#" id="documentHref"><!-- space --></a ><a href="#" id="documentHref"><!-- space --></a

View file

@ -257,14 +257,16 @@ function _onContactMenuAction(folderItem, action, refresh) {
} }
} }
var url = ApplicationBaseURL + selectedFolderId + "/" + action var url = ApplicationBaseURL + selectedFolderId + "/" + action;
+ "?folder=" + folderId + "&uid="
+ contactIds.join("&uid=");
if (refresh) if (refresh)
triggerAjaxRequest(url, actionContactCallback, selectedFolderId); triggerAjaxRequest(url, actionContactCallback, selectedFolderId,
('folder='+ folderId + '&uid=' + contactIds.join('&uid=')),
{ "Content-type": "application/x-www-form-urlencoded" });
else else
triggerAjaxRequest(url, actionContactCallback); triggerAjaxRequest(url, actionContactCallback, null,
('folder='+ folderId + '&uid=' + contactIds.join('&uid=')),
{ "Content-type": "application/x-www-form-urlencoded" });
} }
} }
@ -313,7 +315,7 @@ function actionContactCallback(http) {
if (parseInt(http.status) == 403) if (parseInt(http.status) == 403)
showAlertDialog(_("You don't have the required privileges to perform the operation.")); showAlertDialog(_("You don't have the required privileges to perform the operation."));
else if (error) else if (error)
showAlertDialog(labels[error]); showAlertDialog(_(error));
refreshCurrentFolder(); refreshCurrentFolder();
} }
} }
@ -1516,7 +1518,7 @@ function currentFolderIsRemote() {
var selectedFolders = $("contactFolders").getSelectedNodes(); var selectedFolders = $("contactFolders").getSelectedNodes();
if (selectedFolders.length > 0) { if (selectedFolders.length > 0) {
var fromObject = $(selectedFolders[0]); var fromObject = $(selectedFolders[0]);
rc = fromObject.hasClassName ("remote"); rc = fromObject.hasClassName("remote");
} }
return rc; return rc;
} }
@ -1571,19 +1573,19 @@ function dropSelectedContacts(action, toId) {
if (selectedFolders.length > 0) { if (selectedFolders.length > 0) {
var contactIds = $('contactsList').getSelectedRowsId(); var contactIds = $('contactsList').getSelectedRowsId();
for (var i = 0; i < contactIds.length; i++) { for (var i = 0; i < contactIds.length; i++) {
if (contactIds[i].endsWith ("vlf")) { if (contactIds[i].endsWith("vlf")) {
showAlertDialog(_("Lists can't be moved or copied.")); showAlertDialog(_("Lists can't be moved or copied."));
return false; return false;
} }
} }
var fromId = $(selectedFolders[0]).id; var fromId = $(selectedFolders[0]).id;
if ((!currentFolderIsRemote () || action != "move") if ((!currentFolderIsRemote() || action != "move")
&& fromId.substring(1) != toId) { && fromId.substring(1) != toId) {
var url = ApplicationBaseURL + fromId + "/" + action
+ "?folder=" + toId + "&uid="
+ contactIds.join("&uid=");
triggerAjaxRequest(url, actionContactCallback, fromId); var url = ApplicationBaseURL + fromId + "/" + action;
triggerAjaxRequest(url, actionContactCallback, fromId,
('folder='+ toId + '&uid=' + contactIds.join('&uid=')),
{ "Content-type": "application/x-www-form-urlencoded" });
} }
} }
} }

View file

@ -53,7 +53,7 @@ LABEL, SPAN.checkBoxList
SELECT SELECT
{ margin-left: 1px; } { margin-left: 1px; }
LABEL#commentArea n0LABEL#commentArea
{ height: 17em; } { height: 17em; }
LABEL#commentArea textarea LABEL#commentArea textarea
@ -105,7 +105,8 @@ SPAN#categoriesCB LABEL
margin-right: 1em; } margin-right: 1em; }
SPAN.content > INPUT.textField SPAN.content > INPUT.textField
{ width: 380px; } { n0width: 380px;
width: 97%; }
LABEL#urlArea INPUT LABEL#urlArea INPUT
{ position: static; } { position: static; }

View file

@ -30,13 +30,10 @@ SPAN.content
line-height: 2em; line-height: 2em;
top: -.25em; top: -.25em;
left: 8em; left: 8em;
right: 1em; right: 0em;
text-overflow: ellipsis; text-overflow: ellipsis;
overflow: hidden; } overflow: hidden;
min-height: 22px; }
SPAN.content > INPUT.textField,
LABEL#commentArea textarea
{ max-width: 380px; }
LABEL, SPAN.checkBoxList LABEL, SPAN.checkBoxList
{ display: block; { display: block;
@ -48,20 +45,12 @@ LABEL, SPAN.checkBoxList
width: 100%; } width: 100%; }
LABEL#commentArea textarea LABEL#commentArea textarea
{ position: absolute; { width: 97%; }
top: 0;
width: 100%;
left: 8em;
right: 1em;
margin: 0px;
margin: auto;
margin-left: 1px; }
SPAN.headerContent SPAN.headerContent
{ {
width: 80%; width: 80%;
height: 1px; height: 1px;
background: #aaaaaa;
top: 0.9em; top: 0.9em;
} }
LABEL.title LABEL.title

View file

@ -108,7 +108,7 @@ function updateWindowTitleFromSubject(event) {
if (this.value) { if (this.value) {
document.title = this.value; document.title = this.value;
}else{ }else{
document.title = _("Untitled"); document.title = '(' + _("Untitled") + ')';
} }
} }
@ -423,6 +423,12 @@ function initMailEditor() {
configureDragHandle(); configureDragHandle();
// Set current subject as window title if not set, use '(Untitled)'
if (document.pageform.subject.value == "")
document.title = '(' + _("Untitled") + ')';
else
document.title = _(document.pageform.subject.value);
// Change the window title when typing the subject // Change the window title when typing the subject
$$("div#subjectRow input").first().on("keyup", updateWindowTitleFromSubject); $$("div#subjectRow input").first().on("keyup", updateWindowTitleFromSubject);

View file

@ -16,6 +16,10 @@ function initPopupMailer(event) {
window.messageUID = mailboxName + "/" + messageName; window.messageUID = mailboxName + "/" + messageName;
handleReturnReceipt(); handleReturnReceipt();
var td = $("subject");
if (td)
document.title = td.allTextContent();
} }
function onICalendarButtonClick(event) { function onICalendarButtonClick(event) {

View file

@ -13,20 +13,6 @@ DIV.appointmentRightLabel
{ display: inline; { display: inline;
vertical-align: middle; } vertical-align: middle; }
LABEL, SPAN.checkBoxList
{ display: block;
position: relative;
height: 1.5em;
margin-left: .5em;
margin-bottom: .5em;
width: 100%; }
LABEL#commentArea
{ height: 15em; }
LABEL#commentArea textarea
{ height: 15em; }
SPAN.checkBoxList#participantsCB SPAN.checkBoxList#participantsCB
{ height: 7em; } { height: 7em; }
@ -39,21 +25,6 @@ DIV#participants UL.contactList
SPAN.checkBoxList SPAN.content LABEL SPAN.checkBoxList SPAN.content LABEL
{ display: inline; } { display: inline; }
SPAN.content
{ position: absolute;
top: -.25em;
left: 6em;
right: 1em; }
TEXTAREA
{ position: absolute;
top: 0px;
left: 6em;
vertical-align: bottom;
bottom: 1em;
right: 1em;
padding-bottom: 0em; }
A#changeUrlButton A#changeUrlButton
{ margin-left: 1em; } { margin-left: 1em; }
@ -91,7 +62,8 @@ SPAN#allDay > INPUT
{ position: static; } { position: static; }
SPAN.content > INPUT.textField SPAN.content > INPUT.textField
{ width: 390px; } { width: 390px;
width: 97%; }
INPUT#startDateCB, INPUT#startDateCB,
INPUT#dueDateCB, INPUT#dueDateCB,