mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-21 14:43:31 +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:
@@ -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