mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-30 23:55:34 +00:00
Monotone-Parent: 66cb288cba7bdd7b9537c1a8dc18987f2e0571f9
Monotone-Revision: 134d5f26f5b5c12057ef16e7224200617273ff67 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-03T16:27:02 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,24 +1,27 @@
|
||||
( /* the toolbar groups -*-cperl-*- */
|
||||
( /* first group */
|
||||
{ link = "#"; isSafe = NO;
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
onclick = "clickedEditorSend(this);return false;";
|
||||
image = "tb-compose-send-flat-24x24.png";
|
||||
cssClass = "tbicon_send"; label = "Send"; },
|
||||
{ link = "#"; target = "addressbook";
|
||||
onclick = "openAddressbook(this);return false;";
|
||||
cssClass = "tbicon_send";
|
||||
label = "Send"; },
|
||||
{ link = "#";
|
||||
onclick = "return onContactAdd(null);";
|
||||
image = "tb-compose-contacts-flat-24x24.png";
|
||||
cssClass = "tbicon_addressbook"; label = "Contacts"; },
|
||||
/* { link = "#"; target = "anais";
|
||||
onclick = "openAnais(this);return false;";
|
||||
image = "tbtb_anais.png";
|
||||
cssClass = "tbicon_anais"; label = "Anais"; }, */
|
||||
{ link = "#"; isSafe = NO;
|
||||
cssClass = "tbicon_addressbook";
|
||||
label = "Contacts"; },
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
onclick = "clickedEditorAttach(this)";
|
||||
image = "tb-compose-attach-flat-24x24.png";
|
||||
cssClass = "tbicon_attach"; label = "Attach"; },
|
||||
{ link = "#"; isSafe = NO;
|
||||
cssClass = "tbicon_attach";
|
||||
label = "Attach"; },
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
onclick = "clickedEditorSave(this);return false;";
|
||||
image = "tb-mail-file-flat-24x24.png";
|
||||
cssClass = "tbicon_save"; label = "Save"; },
|
||||
cssClass = "tbicon_save";
|
||||
label = "Save"; },
|
||||
)
|
||||
)
|
||||
|
||||
@@ -4,11 +4,10 @@
|
||||
{ link = "getMail";
|
||||
image = "tb-mail-getmail-flat-24x24.png";
|
||||
cssClass = "tbicon_getmail"; label = "Get Mail"; },
|
||||
|
||||
{ link = "#"; // "compose"; // target = "_blank";
|
||||
{ link = "#";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-write-flat-24x24.png";
|
||||
onclick = "clickedCompose(this);return false;";
|
||||
onclick = "return openMessageWindow(null, 'compose');";
|
||||
cssClass = "tbicon_compose"; label = "Write"; },
|
||||
{ link = "#"; target = "addressbook";
|
||||
onclick = "openAddressbook(this);return false;";
|
||||
@@ -18,19 +17,19 @@
|
||||
|
||||
( // second group
|
||||
{ link = "reply";
|
||||
onclick = "return onMenuReplyToSender(event);";
|
||||
onclick = "return openMessageWindowsForSelection('reply');";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-reply-flat-24x24.png";
|
||||
cssClass = "tbicon_reply"; label = "Reply"; },
|
||||
|
||||
{ link = "replyall";
|
||||
onclick = "return onMenuReplyToAll(event);";
|
||||
onclick = "return openMessageWindowsForSelection('replyall');";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-replyall-flat-24x24.png";
|
||||
cssClass = "tbicon_replyall"; label = "Reply All"; },
|
||||
|
||||
{ link = "forward";
|
||||
onclick = "return onMenuForwardMessage(event);";
|
||||
onclick = "return openMessageWindowsForSelection('forward');";
|
||||
isSafe = NO;
|
||||
image = "tb-mail-forward-flat-24x24.png";
|
||||
cssClass = "tbicon_forward"; label = "Forward"; },
|
||||
|
||||
@@ -298,7 +298,7 @@
|
||||
{
|
||||
link = "#"; // "compose"; // target = "_blank";
|
||||
isSafe = NO;
|
||||
onclick = "clickedCompose(this);return false;";
|
||||
onclick = "return openMessageWindow(null, 'compose');";
|
||||
image = "tb-mail-write-flat-24x24.png";
|
||||
cssClass = "tbicon_compose"; label = "Write"; },
|
||||
)
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
xmlns:rsrc="OGo:url"
|
||||
className="UIxContactsListViewContainer"
|
||||
title="name"
|
||||
var:popup="isPopup"
|
||||
>
|
||||
<table id="contactsList" multiselect="yes">
|
||||
<tbody>
|
||||
|
||||
@@ -89,7 +89,50 @@
|
||||
<var:component className="UIxContactsFilterPanel" qualifier="qualifier" />
|
||||
|
||||
<div id="contactsListContent">
|
||||
<var:component-content />
|
||||
<table id="contactsList" multiselect="yes">
|
||||
<tbody>
|
||||
<tr class="tableview">
|
||||
<!-- localize -->
|
||||
<td class="tbtv_headercell">
|
||||
<var:component className="UIxSortableTableHeader"
|
||||
label:label="Lastname"
|
||||
const:sortKey="cn"
|
||||
const:href="view"
|
||||
var:queryDictionary="context.request.formValues"
|
||||
/>
|
||||
</td>
|
||||
<td class="tbtv_headercell">
|
||||
<var:component className="UIxSortableTableHeader"
|
||||
label:label="EMail"
|
||||
const:sortKey="mail"
|
||||
const:href="view"
|
||||
var:queryDictionary="context.request.formValues"
|
||||
/>
|
||||
</td>
|
||||
<td class="tbtv_headercell">
|
||||
<var:string label:value="Phone" />
|
||||
</td>
|
||||
<td class="tbtv_headercell">
|
||||
<var:string label:value="Location" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<var:foreach list="contactInfos" item="currentContact">
|
||||
<tr class="tableview"
|
||||
var:id="currentContact.c_name"
|
||||
var:contactname="currentContact.cn"
|
||||
var:contactid="currentContact.c_uid"
|
||||
onclick="return onContactRowClick(event, this);"
|
||||
ondblclick="return onContactRowDblClick(event, this);"
|
||||
oncontextmenu="return onContactContextMenu(event, this);">
|
||||
<td onmousedown="return false;"><img rsrc:src="abcard.gif" /><var:string value="currentContact.cn" /></td>
|
||||
<td onmousedown="return false;"><var:string value="currentContact.mail" /></td>
|
||||
<td onmousedown="return false;"><var:string value="currentContact.telephonenumber" /></td>
|
||||
<td onmousedown="return false;"><var:string value="currentContact.l" /></td>
|
||||
</tr>
|
||||
</var:foreach>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div id="rightDragHandle"
|
||||
@@ -106,11 +149,7 @@
|
||||
</div>
|
||||
|
||||
<div class="contactSelection">
|
||||
<input type="submit"
|
||||
class="button"
|
||||
label:value="Add Selected Contacts"
|
||||
name="validate"
|
||||
onclick="return onConfirmContactSelection();" />
|
||||
<var:component-content />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -118,6 +157,5 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
currentContactFolder = '<var:string value="contactFolderId" />';
|
||||
contactSelectorId = '<var:string value="queryParameters.selectorId" />';
|
||||
</script>
|
||||
</var:component>
|
||||
|
||||
@@ -64,12 +64,6 @@
|
||||
var:checked="checkForConflicts"
|
||||
/><var:string label:value="check for conflicts"
|
||||
/></label>
|
||||
<span class="checkBoxList"><var:string label:value="Participants" />
|
||||
<span class="content" style="display: block; height: 10em;"><var:component className="UIxContactSelector"
|
||||
const:selectorId="participants"
|
||||
contacts="participants"
|
||||
/></span></span>
|
||||
|
||||
<label><var:string label:value="Cycle"
|
||||
/>
|
||||
<span class="content"
|
||||
@@ -94,14 +88,20 @@
|
||||
></span
|
||||
></label>
|
||||
|
||||
<span class="checkBoxList" style="height: 10em;"
|
||||
<span class="checkBoxList" id="participantsCB"><var:string label:value="Participants" />
|
||||
<span class="content"><var:component className="UIxContactSelector"
|
||||
const:selectorId="participants"
|
||||
contacts="participants"
|
||||
/></span></span>
|
||||
|
||||
<span class="checkBoxList"
|
||||
><var:string label:value="Categories"
|
||||
/><span class="content"><var:checkbox-list list="categoryItems"
|
||||
item="item"
|
||||
suffix="itemCategoryText"
|
||||
selections="categories"
|
||||
/></span></span>
|
||||
|
||||
|
||||
<label><var:string label:value="Priority" />
|
||||
<var:popup list="priorities" item="item"
|
||||
string="itemPriorityText" selection="priority" /></label>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
><td onmousedown="return false;"
|
||||
><var:string value="currentEndTime"/></td
|
||||
><td onmousedown="return false;"
|
||||
><var:string value="currentLocation" const:escapeHTML="NO"/></td
|
||||
><var:string value="currentLocation" /></td
|
||||
></tr
|
||||
></var:foreach>
|
||||
</table>
|
||||
|
||||
@@ -38,7 +38,6 @@ var currentContactFolder = '';
|
||||
/* mail list */
|
||||
|
||||
function openContactWindow(sender, url) {
|
||||
log ("message window at url: " + url);
|
||||
var msgWin = window.open(url, null,
|
||||
"width=544,height=525,resizable=1,scrollbars=1,toolbar=0,"
|
||||
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
@@ -111,7 +110,6 @@ function openContactsFolder(contactsFolder, params)
|
||||
if (params)
|
||||
url += '&' + params;
|
||||
|
||||
log ("reload url = '" + url + "'");
|
||||
var selection;
|
||||
if (document.contactsListAjaxRequest) {
|
||||
document.contactsListAjaxRequest.aborted = true;
|
||||
@@ -261,12 +259,7 @@ function moveTo(uri) {
|
||||
/* contact menu entries */
|
||||
function onContactRowClick(event, node)
|
||||
{
|
||||
var contactId = node.getAttribute('id');
|
||||
|
||||
loadContact(contactId);
|
||||
log ("clicked contact: " + contactId);
|
||||
// changeCalendarDisplay(day);
|
||||
// changeDateSelectorDisplay(day);
|
||||
loadContact(node.getAttribute('id'));
|
||||
|
||||
return onRowClick(event);
|
||||
}
|
||||
@@ -406,7 +399,6 @@ function onHeaderClick(node)
|
||||
url = ApplicationBaseURL + currentContactFolder + "/" + href;
|
||||
if (!href.match(/noframe=/))
|
||||
url += "&noframe=1";
|
||||
log ("url: " + url);
|
||||
document.contactsListAjaxRequest
|
||||
= triggerAjaxRequest(url, contactsListCallback);
|
||||
|
||||
@@ -445,7 +437,7 @@ function onSearchFormSubmit()
|
||||
return false;
|
||||
}
|
||||
|
||||
function onConfirmContactSelection()
|
||||
function onConfirmContactSelection(tag)
|
||||
{
|
||||
var folderLi = $(currentContactFolder);
|
||||
var currentContactFolderName = folderLi.innerHTML;
|
||||
@@ -455,15 +447,10 @@ function onConfirmContactSelection()
|
||||
for (i = 0; i < rows.length; i++)
|
||||
{
|
||||
var cid = rows[i].getAttribute("contactid");
|
||||
if (cid)
|
||||
{
|
||||
var cname = '' + rows[i].getAttribute("contactname");
|
||||
log('cid = ' + cid + '; cname = ' + cname );
|
||||
if (cid.length > 0)
|
||||
opener.window.addContact(contactSelectorId,
|
||||
cid,
|
||||
currentContactFolderName + '/' + cname);
|
||||
}
|
||||
var cname = '' + rows[i].getAttribute("contactname");
|
||||
var email = '' + rows[i].cells[1].innerHTML;
|
||||
opener.window.addContact(tag, currentContactFolderName + '/' + cname,
|
||||
cid, cname, email);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -39,20 +39,25 @@ var cachedMessages = new Array();
|
||||
var currentMailbox = '';
|
||||
/* mail list */
|
||||
|
||||
function openMessageWindow(sender, msguid, url) {
|
||||
function openMessageWindow(msguid, url) {
|
||||
log ("message window at url: " + url);
|
||||
var msgWin = window.open(url, "SOGo_msg_" + msguid,
|
||||
"width=640,height=480,resizable=1,scrollbars=1,toolbar=0," +
|
||||
"location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
var wId = '';
|
||||
if (msguid)
|
||||
wId += "SOGo_msg_" + msguid;
|
||||
var msgWin = window.open(url, wId,
|
||||
"width=680,height=520,resizable=1,scrollbars=1,toolbar=0,"
|
||||
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
|
||||
msgWin.focus();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function clickedUid(sender, msguid) {
|
||||
resetSelection(window);
|
||||
openMessageWindow(sender, msguid,
|
||||
ApplicationBaseURL + currentMailbox + "/" + msguid + "/view");
|
||||
return true;
|
||||
return openMessageWindow(msguid,
|
||||
ApplicationBaseURL + currentMailbox + "/"
|
||||
+ msguid + "/view");
|
||||
}
|
||||
|
||||
function doubleClickedUid(sender, msguid) {
|
||||
@@ -73,18 +78,6 @@ function clearSearch(sender) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* compose support */
|
||||
|
||||
function clickedCompose(sender) {
|
||||
var urlstr;
|
||||
|
||||
urlstr = "compose";
|
||||
window.open(urlstr, "SOGo_compose",
|
||||
"width=680,height=520,resizable=1,scrollbars=1,toolbar=0," +
|
||||
"location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
return false; /* stop following the link */
|
||||
}
|
||||
|
||||
/* mail editor */
|
||||
|
||||
function validateEditorInput(sender) {
|
||||
@@ -152,7 +145,7 @@ function showInlineAttachmentList(sender) {
|
||||
|
||||
function updateInlineAttachmentList(sender, attachments) {
|
||||
if (!attachments || (attachments.length == 0)) {
|
||||
this.hideInlineAttachmentList(sender);
|
||||
// this.hideInlineAttachmentList(sender);
|
||||
return;
|
||||
}
|
||||
var e, i, count, text;
|
||||
@@ -172,34 +165,13 @@ function updateInlineAttachmentList(sender, attachments) {
|
||||
function openAddressbook(sender) {
|
||||
var urlstr;
|
||||
|
||||
urlstr = ApplicationBaseURL + "/../Contacts/select";
|
||||
urlstr = ApplicationBaseURL + "/../Contacts/?popup=YES";
|
||||
var w = window.open(urlstr, "Addressbook",
|
||||
"width=640,height=400,left=10,top=10,toolbar=no," +
|
||||
"dependent=yes,menubar=no,location=no,resizable=yes," +
|
||||
"scrollbars=yes,directories=no,status=no");
|
||||
"width=640,height=400,resizable=1,scrollbars=1,toolbar=0,"
|
||||
+ "location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
w.focus();
|
||||
}
|
||||
|
||||
/* filters */
|
||||
|
||||
function clickedFilter(sender, scriptname) {
|
||||
var urlstr;
|
||||
|
||||
urlstr = scriptname + "/edit";
|
||||
window.open(urlstr, "SOGo_filter_" + scriptname,
|
||||
"width=640,height=480,resizable=1,scrollbars=1,toolbar=0," +
|
||||
"location=0,directories=0,status=0,menubar=0,copyhistory=0")
|
||||
return true;
|
||||
}
|
||||
|
||||
function clickedNewFilter(sender) {
|
||||
var urlstr;
|
||||
|
||||
urlstr = "create";
|
||||
window.open(urlstr, "SOGo_filter",
|
||||
"width=680,height=480,resizable=1,scrollbars=1,toolbar=0," +
|
||||
"location=0,directories=0,status=0,menubar=0,copyhistory=0");
|
||||
return false; /* stop following the link */
|
||||
return false;
|
||||
}
|
||||
|
||||
/* mail list DOM changes */
|
||||
@@ -277,18 +249,19 @@ function reopenToRemoveLocationBar() {
|
||||
|
||||
/* mail list reply */
|
||||
|
||||
function openMessageWindowsForSelection(sender, action)
|
||||
function openMessageWindowsForSelection(action)
|
||||
{
|
||||
var messageList = $("messageList");
|
||||
var rows = messageList.getSelectedRowsId();
|
||||
var idset = "";
|
||||
|
||||
for (var i = 0; i < rows.length; i++)
|
||||
win = openMessageWindow(sender,
|
||||
rows[i].substr(4) /* msguid */,
|
||||
win = openMessageWindow(rows[i].substr(4) /* msguid */,
|
||||
ApplicationBaseURL + currentMailbox
|
||||
+ "/" + rows[i].substr(4)
|
||||
+ "/" + action /* url */);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function mailListMarkMessage(sender, action, msguid, markread)
|
||||
@@ -726,39 +699,9 @@ function onMenuOpenMessage(event)
|
||||
var node = getParentMenu(event.target).menuTarget.parentNode;
|
||||
var msgId = node.getAttribute('id').substr(4);
|
||||
|
||||
openMessageWindow(null, msgId,
|
||||
ApplicationBaseURL + currentMailbox
|
||||
+ "/" + msgId + "/view");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onMenuReplyToSender(event)
|
||||
{
|
||||
openMessageWindowsForSelection(null, 'reply');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onMenuReplyToAll(event)
|
||||
{
|
||||
openMessageWindowsForSelection(null, 'replyall');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onMenuForwardMessage(event)
|
||||
{
|
||||
openMessageWindowsForSelection(null, 'forward');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function onMenuDeleteMessage(event)
|
||||
{
|
||||
uixDeleteSelectedMessages(null);
|
||||
|
||||
return false;
|
||||
return openMessageWindow(msgId,
|
||||
ApplicationBaseURL + currentMailbox
|
||||
+ "/" + msgId + "/view");
|
||||
}
|
||||
|
||||
/* contacts */
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
02111-1307, USA.
|
||||
*/
|
||||
|
||||
// var cuicui = '';
|
||||
var contactSelectorAction = 'scheduler-contacts';
|
||||
|
||||
function uixEarlierDate(date1, date2) {
|
||||
// can this be done in a sane way?
|
||||
@@ -155,3 +155,34 @@ function toggleCycleVisibility(node, nodeName, hiddenValue) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function addContact(tag, fullContactName, contactId, contactName, contactEmail)
|
||||
{
|
||||
var uids = $('uixselector-participants-uidList');
|
||||
log ("contactId: " + contactId);
|
||||
if (contactId)
|
||||
{
|
||||
var re = new RegExp("(^|,)" + contactId + "($|,)");
|
||||
|
||||
log ("uids: " + uids);
|
||||
if (!re.test(uids.value))
|
||||
{
|
||||
log ("no match... realling adding");
|
||||
if (uids.value.length > 0)
|
||||
uids.value += ',' + contactId;
|
||||
else
|
||||
uids.value = contactId;
|
||||
|
||||
log ('values: ' + uids.value);
|
||||
var names = $('uixselector-participants-display');
|
||||
names.innerHTML += ('<li onmousedown="return false;"'
|
||||
+ ' onclick="onRowClick(event);"><img src="'
|
||||
+ ResourcesURL + '/abcard.gif" />'
|
||||
+ contactName + '</li>');
|
||||
}
|
||||
else
|
||||
log ("match... ignoring contact");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user