Various fixes and improvements to the Mail module

pull/56/head
Francis Lachapelle 2014-09-10 11:37:52 -04:00
parent c441fa5b80
commit 1dd3dbacb5
8 changed files with 60 additions and 38 deletions

View File

@ -42,7 +42,7 @@
"Attachment" = "Attachment";
"Unread" = "Unread";
"Flagged" = "Flagged";
"Search inbox" = "Search inbox";
"Search multiple mailboxes" = "Search multiple mailboxes";
/* Main Frame */
@ -240,7 +240,7 @@
"As Not Junk" = "As Not Junk";
"Run Junk Mail Controls" = "Run Junk Mail Controls";
"Search messages in" = "Search messages in";
"Search messages in:" = "Search messages in:";
"Search" = "Search";
"Search subfolders" = "Search subfolders";
"Match any of the following" = "Match any of the following";

View File

@ -13,6 +13,7 @@
"Print" = "Imprimer";
"Stop" = "Arrêter";
"Write" = "Écrire";
"Search" = "Recherche";
"Send" = "Envoyer";
"Contacts" = "Contacts";
@ -41,6 +42,7 @@
"Attachment" = "Documents joints";
"Unread" = "Non lus";
"Flagged" = "Marqués";
"Search multiple mailboxes" = "Rechercher dans plusieurs boîtes";
/* Main Frame */
@ -94,8 +96,9 @@
"To" = "Destinataire";
"Cc" = "Copie à";
"Bcc" = "Copie cachée à";
"Reply-To" = "Répondre à";
"Reply-To" = "Répondre à";
"Add address" = "Ajouter Adresse";
"Body" = "Contenu";
"Open" = "Ouvrir";
"Select All" = "Tout sélectionner";
@ -237,6 +240,18 @@
"As Not Junk" = "Comme acceptable";
"Run Junk Mail Controls" = "Lancer le contrôle des indésirables";
"Search messages in:" = "Rechercher dans :";
"Search" = "Recherche";
"Search subfolders" = "Rechercher dans les sous-dossiers";
"Match any of the following" = "Répondant à un des critères suivants";
"Match all of the following" = "Répondant à tous les critères suivants";
"contains" = "contient";
"does not contain" = "ne contient pas";
"No matches found" = "Aucun résultat";
"results found" = "messages trouvés";
"result found" = "message trouvé";
"Please specify at least one filter" = "Veuillez définir au moins un critère.";
/* Folder operations */
"Name :" = "Nom:";
"Enter the new name of your folder :"

View File

@ -69,6 +69,6 @@
cssClass = "";
image = "search-messages.png";
label = "Search";
tooltip = "Search inbox"; }
tooltip = "Search multiple mailboxes"; }
)
)

View File

@ -6,7 +6,7 @@
xmlns:rsrc="OGo:url"
xmlns:label="OGo:label"
const:jsFiles="tablekit.js, tablekit-sogo.js, tablekit-trueresize.js">
<ul id="searchByList" class="hidden">
<li><var:string label:value="Subject"/></li>
<li><var:string label:value="From"/></li>
@ -30,7 +30,7 @@
<a class="button" name="search" id="searchButton" onclick="onSearchClick()">
<span><var:string label:value="Search"/></span></a>
<a class="button" name="cancel" id="cancelButton" onclick="onCancelClick()">
<span><var:string label:value="Cancel" /></span></a>
<span><var:string label:value="Close" /></span></a>
</td>
</tr>
<tr>

View File

@ -35,7 +35,7 @@ var refreshViewCheckTimer;
// Variables for feature threadsCollapsing
var displayThreadElement = false;
var cachedThreadsCollapsed = (UserSettings.Mail ? UserSettings.Mail.threadsCollapsed: []);
var cachedThreadsCollapsed = [];
/* We need to override this method since it is adapted to GCS-based folder
references, which we do not use here */
@ -457,6 +457,7 @@ function onDocumentKeydown(event) {
/* Search mail, call the template and open inside a dialog windoƒw */
function onSearchMail(event) {
Event.stop(event);
var element = Event.findElement(event);
if (element.disabled == false || element.disabled == undefined) {
element.disabled = true;
@ -473,12 +474,13 @@ function onSearchMail(event) {
triggerAjaxRequest(urlstr, displaySearchMailCallback);
}
}
return false;
}
function displaySearchMailCallback(http) {
if (http.readyState == 4 && http.status == 200) {
var fields = createElement("div", null); // (tagName, id, classes, attributes, htmlAttributes, parentNode)
var title = _("Search mail");
var title = _("Search multiple mailboxes");
var id = _("searchMailView");
fields.innerHTML = http.responseText;
@ -2033,15 +2035,20 @@ function initMailer(event) {
else if (!Mailer.sortByThread && Mailer.columnsOrder[0] == "Thread")
Mailer.columnsOrder.shift(); // drop the thread column
// Restore sorting from user settings
if (UserSettings && UserSettings["Mail"] && UserSettings["Mail"]["SortingState"]) {
sorting["attribute"] = UserSettings["Mail"]["SortingState"][0];
sorting["ascending"] = parseInt(UserSettings["Mail"]["SortingState"][1]) > 0;
if (sorting["attribute"] == 'to') sorting["attribute"] = 'from'; // initial mailbox is always the inbox
}
else {
sorting["attribute"] = "date";
sorting["ascending"] = false;
if (UserSettings && UserSettings.Mail) {
// Restore threads
cachedThreadsCollapsed = UserSettings.Mail.threadsCollapsed;
// Restore sorting from user settings
if (UserSettings.Mail.SortingState) {
sorting["attribute"] = UserSettings["Mail"]["SortingState"][0];
sorting["ascending"] = parseInt(UserSettings["Mail"]["SortingState"][1]) > 0;
if (sorting["attribute"] == 'to') sorting["attribute"] = 'from'; // initial mailbox is always the inbox
}
else {
sorting["attribute"] = "date";
sorting["ascending"] = false;
}
}
Mailer.dataTable = $("mailboxList");

View File

@ -1,3 +1,17 @@
/*************** Dialog *****************/
DIV.dialog.searchMail {
position: relative;
padding: 0px;
opacity: 1;
width: 85%;
height: 75%;
margin: 2em auto;
}
DIV.dialog.searchMail > DIV {
min-height: 500px;
}
/*************** Table adjustment *****************/
@ -44,7 +58,7 @@ TR.filterRow > TD
TR.filterRow > TD.buttonsCell
{
width:5%;
width: 40px;
}
TR.filterRow > TD.inputsCell
@ -172,15 +186,16 @@ A#deleteButton, A#openButton
top: -18px;
left: -18px; }
#filterButtons
.filterButtons
{
width:40px;
width: 40px;
}
IMG.addFilterButton, IMG.removeFilterButton
.filterButtons IMG
{
z-index: 1;
cursor:pointer;
cursor: pointer;
vertical-align: middle;
}
/* Glow */

View File

@ -305,9 +305,7 @@ function onAddFilter() {
var imageRemoveFilter = document.createElement("img");
imageAddFilter.setAttribute("src", "/SOGo.woa/WebServerResources/add-icon.png");
imageRemoveFilter.setAttribute("src", "/SOGo.woa/WebServerResources/remove-icon.png");
Element.addClassName(imageAddFilter, "addFilterButton");
Element.addClassName(imageAddFilter, "glow");
Element.addClassName(imageRemoveFilter, "removeFilterButton");
Element.addClassName(imageRemoveFilter, "glow");
imageAddFilter.setAttribute("name", "addFilter");
imageAddFilter.setAttribute("id", "addFilterButtonRow" + rowCount);
@ -315,7 +313,7 @@ function onAddFilter() {
imageRemoveFilter.setAttribute("name", "removeFilter");
imageRemoveFilter.setAttribute("id", "removeFilterButtonRow" + rowCount);
$(imageRemoveFilter).on("click", onRemoveFilter);
buttonsDiv.setAttribute("id", "filterButtons");
Element.addClassName(buttonsDiv, "filterButtons");
buttonsDiv.appendChild(imageAddFilter);
buttonsDiv.appendChild(imageRemoveFilter);

View File

@ -659,19 +659,6 @@ DIV.dialog > DIV
top: 7px;
}
DIV.dialog.searchMail {
position: relative;
padding: 0px;
opacity: 1;
width: 75%;
height: 75%;
margin: 2em auto;
}
DIV.dialog.searchMail > DIV {
min-height:500px;
}
DIV.dialog.none
{ position: relative;
margin: 0px;