mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 03:15:25 +00:00
Monotone-Parent: d3d13025350af6364527c65ace59ad308e3e8ffe
Monotone-Revision: 448455bad9d5f72d9a932fd3427bd756cb54e81c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-09-13T21:23:44 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2006-09-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* UI/WebServerResources/ContactsUI.js: added code to download card
|
||||
views and display them beneath the list.
|
||||
|
||||
2006-09-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* SoObjects/SOGo/SOGoObject.m ([SOGoObject -userTimeZone]): retain
|
||||
|
||||
@@ -24,13 +24,17 @@ DIV#contactsListContent
|
||||
{
|
||||
position: absolute;
|
||||
left: 15em;
|
||||
top: 5.5em;
|
||||
top: 7.5em;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
border: 0px dashed #f00;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
width: 100%;
|
||||
height: 15.7em;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
DIV#mailboxContent
|
||||
@@ -315,6 +319,7 @@ TABLE#contactsList TD
|
||||
|
||||
TABLE#contactsList TD IMG
|
||||
{
|
||||
vertical-align: middle;
|
||||
margin-left: 1em;
|
||||
margin-right: .2em;
|
||||
}
|
||||
@@ -330,6 +335,59 @@ TABLE#contactsList TR._deleted TD
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
DIV#rightDragHandle
|
||||
{
|
||||
cursor: n-resize;
|
||||
top: 23em;
|
||||
left: 15em;
|
||||
right: 0px;
|
||||
height: 5px;
|
||||
}
|
||||
|
||||
DIV#contactView
|
||||
{
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
padding: .5em;
|
||||
top: 23.5em;
|
||||
left: 15em;
|
||||
bottom: 0em;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid #aaa;
|
||||
border-left: 1px solid #aaa;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
DIV#contactView H3.contactCardTitle
|
||||
{ display: block;
|
||||
margin: .2em 0px;
|
||||
font-size: large;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
text-decoration: underline; }
|
||||
|
||||
DIV.contactColumn
|
||||
{
|
||||
width: 38%;
|
||||
padding: .5em;
|
||||
float: left;
|
||||
}
|
||||
|
||||
DIV.contactColumn DIV
|
||||
{ margin-bottom: 1em; }
|
||||
|
||||
DIV.contactColumn H4
|
||||
{
|
||||
margin: .2em 0px;
|
||||
margin-left: -.5em;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
background: #4b6983;
|
||||
width: 100%;
|
||||
padding: .1em .2em;
|
||||
}
|
||||
|
||||
INPUT#searchValue:focus
|
||||
{ color: #000; }
|
||||
|
||||
@@ -352,6 +410,18 @@ DIV#mailboxDragHandle
|
||||
height: .4em;
|
||||
}
|
||||
|
||||
DIV#calendarView
|
||||
{
|
||||
position: absolute;
|
||||
background: #fff;
|
||||
top: 18em;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
border-top: 1px solid #aaa;
|
||||
border-left: 1px solid #aaa;
|
||||
}
|
||||
|
||||
DIV.contactSelector
|
||||
{
|
||||
position: absolute;
|
||||
|
||||
@@ -51,7 +51,8 @@ function openContactWindow(sender, contactuid, url) {
|
||||
function clickedUid(sender, contactuid) {
|
||||
resetSelection(window);
|
||||
openContactWindow(sender, contactuid,
|
||||
ApplicationBaseURL + currentContactFolder + "/" + contactuid + "/view");
|
||||
ApplicationBaseURL + currentContactFolder
|
||||
+ "/" + contactuid + "/edit");
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -264,7 +265,7 @@ function onContactContextMenu(event, element)
|
||||
var selectedNodes = topNode.getSelectedRows();
|
||||
topNode.menuSelectedRows = selectedNodes;
|
||||
for (var i = 0; i < selectedNodes.length; i++)
|
||||
deselectNode(selectedNode);
|
||||
deselectNode(selectedNodes[i]);
|
||||
topNode.menuSelectedEntry = element;
|
||||
selectNode(element);
|
||||
}
|
||||
@@ -338,62 +339,30 @@ function storeCachedMessage(cachedContact)
|
||||
cachedContacts[oldest] = cachedContact;
|
||||
}
|
||||
|
||||
function onMessageSelectionChange()
|
||||
function loadContact(idx)
|
||||
{
|
||||
var contactsList = document.getElementById('contactsList');
|
||||
|
||||
var selection = contactsList.getSelectedRowsId();
|
||||
if (selection.length == 1)
|
||||
{
|
||||
var idx = selection[0];
|
||||
|
||||
if (currentMessages[currentContactFolder] != idx) {
|
||||
currentMessages[currentContactFolder] = idx;
|
||||
loadMessage(idx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function loadMessage(idx)
|
||||
{
|
||||
var cachedContact = getCachedMessage(idx);
|
||||
|
||||
if (document.messageAjaxRequest) {
|
||||
document.messageAjaxRequest.aborted = true;
|
||||
document.messageAjaxRequest.abort();
|
||||
if (document.contactAjaxRequest) {
|
||||
document.contactAjaxRequest.aborted = true;
|
||||
document.contactAjaxRequest.abort();
|
||||
}
|
||||
|
||||
if (cachedContact == null) {
|
||||
var url = (ApplicationBaseURL + currentContactFolder + "/"
|
||||
+ idx + "/view?noframe=1");
|
||||
document.messageAjaxRequest
|
||||
= triggerAjaxRequest(url, messageCallback, idx);
|
||||
markMailInWindow(window, idx, true);
|
||||
} else {
|
||||
var div = document.getElementById('messageContent');
|
||||
div.innerHTML = cachedContact['text'];
|
||||
cachedContact['time'] = (new Date()).getTime();
|
||||
document.messageAjaxRequest = null;
|
||||
}
|
||||
var url = (ApplicationBaseURL + currentContactFolder + "/"
|
||||
+ idx + "/view?noframe=1");
|
||||
log ("url: " + url);
|
||||
document.contactAjaxRequest
|
||||
= triggerAjaxRequest(url, contactLoadCallback, idx);
|
||||
}
|
||||
|
||||
function messageCallback(http)
|
||||
function contactLoadCallback(http)
|
||||
{
|
||||
var div = document.getElementById('messageContent');
|
||||
var div = $('contactView');
|
||||
log ("div: " + div);
|
||||
log ("http: " + http.status);
|
||||
|
||||
if (http.readyState == 4
|
||||
&& http.status == 200) {
|
||||
document.messageAjaxRequest = null;
|
||||
document.contactAjaxRequest = null;
|
||||
div.innerHTML = http.responseText;
|
||||
|
||||
if (http.callbackData) {
|
||||
var cachedContact = new Array();
|
||||
cachedContact['idx'] = currentContactFolder + '/' + http.callbackData;
|
||||
cachedContact['time'] = (new Date()).getTime();
|
||||
cachedContact['text'] = http.responseText;
|
||||
if (cachedContact['text'].length < 30000)
|
||||
storeCachedMessage(cachedContact);
|
||||
}
|
||||
}
|
||||
else
|
||||
log ("ajax fuckage");
|
||||
@@ -429,13 +398,25 @@ 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);
|
||||
|
||||
return onRowClick(event);
|
||||
}
|
||||
|
||||
function onContactRowDblClick(event, node)
|
||||
{
|
||||
var contactId = node.getAttribute('id');
|
||||
|
||||
openContactWindow(null, contactId,
|
||||
ApplicationBaseURL + currentContactFolder
|
||||
+ "/" + contactId + "/view");
|
||||
+ "/" + contactId + "/edit");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user