Monotone-Parent: 9d2034c400246e39f2d7a801f52ee4971e5b431a

Monotone-Revision: 807deb2239f073e058d501505aea6ff999ed1b25

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2007-09-24T21:26:23
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2007-09-24 21:26:23 +00:00
parent 05f79daf43
commit 1b65309e59
15 changed files with 169 additions and 165 deletions

2
NEWS
View File

@ -10,7 +10,7 @@
- added tooltips for toolbar buttons (English and French); - added tooltips for toolbar buttons (English and French);
- added checkmarks in live search options popup menus; - added checkmarks in live search options popup menus;
- added browser detection with recommanded alternatives; - added browser detection with recommanded alternatives;
- initial support for resizable columns in tables; - support for resizable columns in tables;
- improved IE7 and Safari support: attendees selector; - improved IE7 and Safari support: attendees selector;
- countless bugfixes; - countless bugfixes;

View File

@ -10,22 +10,23 @@
selectorComponentClass="selectorComponentClass" selectorComponentClass="selectorComponentClass"
title="name"> title="name">
<table id="contactsList" multiselect="yes"> <table id="contactsList" multiselect="yes">
<tbody> <thead>
<tr class="tableview"> <tr class="tableview">
<!-- localize --> <!-- localize -->
<td class="tbtv_headercell" id="nameHeader" <td class="tbtv_headercell sortableTableHeader" id="nameHeader"
><var:string label:value="Name" ><var:string label:value="Name"
/></td /></td
><td class="tbtv_headercell" id="mailHeader" ><td class="tbtv_headercell sortableTableHeader" id="mailHeader"
><var:string label:value="Email"/></td ><var:string label:value="Email"/></td
><td class="tbtv_headercell" id="screenNameHeader" ><td class="tbtv_headercell sortableTableHeader" id="screenNameHeader"
><var:string label:value="Screen Name" /></td ><var:string label:value="Screen Name" /></td
><td class="tbtv_headercell" id="orgHeader" ><td class="tbtv_headercell sortableTableHeader" id="orgHeader"
><var:string label:value="Organization" /></td ><var:string label:value="Organization" /></td
><td class="tbtv_headercell" id="phoneHeader" ><td class="tbtv_headercell sortableTableHeader" id="phoneHeader"
><var:string label:value="Work Phone" /></td ><var:string label:value="Work Phone" /></td
></tr> ></tr>
</thead>
<tbody>
<var:foreach list="contactInfos" item="currentContact"> <var:foreach list="contactInfos" item="currentContact">
<tr class="tableview" <tr class="tableview"
var:id="currentCName" var:id="currentCName"
@ -46,4 +47,4 @@
</var:foreach> </var:foreach>
</tbody> </tbody>
</table> </table>
</var:component> </var:component>

View File

@ -8,22 +8,22 @@
xmlns:label="OGo:label"> xmlns:label="OGo:label">
<thead> <thead>
<tr class="tableview" <tr class="tableview"
><td class="tbtv_headercell messageFlagColumn" ><td class="tbtv_headercell messageFlagColumn sortableTableHeader"
><var:entity const:name="nbsp" /></td ><var:entity const:name="nbsp" /></td
><td class="tbtv_headercell messageFlagColumn"> ><td class="tbtv_headercell messageFlagColumn sortableTableHeader">
<img rsrc:src="title_attachment_14x14.png" width="14" <img rsrc:src="title_attachment_14x14.png" width="14"
height="14"/></td height="14"/></td
><td class="tbtv_headercell" id="subjectHeader" ><td class="tbtv_headercell sortableTableHeader" id="subjectHeader"
><var:string label:value="Subject"/></td ><var:string label:value="Subject"/></td
><td class="tbtv_headercell" id="fromHeader" ><td class="tbtv_headercell sortableTableHeader" id="fromHeader"
><var:if condition="showToAddress" const:negate="YES" ><var:if condition="showToAddress" const:negate="YES"
><var:string label:value="From"/></var:if ><var:string label:value="From"/></var:if
><var:if condition="showToAddress" ><var:if condition="showToAddress"
><var:string label:value="To"/></var:if ><var:string label:value="To"/></var:if
></td ></td
><td class="tbtv_headercell" id="messageFlagHeader" ><td class="tbtv_headercell sortableTableHeader" id="messageFlagHeader"
><img rsrc:src="title_read_14x14.png"/></td ><img rsrc:src="title_read_14x14.png"/></td
><td class="tbtv_headercell" id="dateHeader" ><td class="tbtv_headercell sortableTableHeader" id="dateHeader"
><var:string label:value="Date"/></td ><var:string label:value="Date"/></td
></tr> ></tr>
<tr class="tableview" <tr class="tableview"

View File

@ -95,10 +95,10 @@
<div id="eventsListView"> <div id="eventsListView">
<table id="eventsList"> <table id="eventsList">
<tr> <tr>
<td class="headerCell headerTitle"><span class="sortableTableHeader"><var:string label:value="Title"/></span></td> <td class="headerCell headerTitle sortableTableHeader"><var:string label:value="Title"/></td>
<td class="headerCell headerDateTime"><span class="sortableTableHeader"><var:string label:value="Start"/></span></td> <td class="headerCell headerDateTime sortableTableHeader"><var:string label:value="Start"/></td>
<td class="headerCell headerDateTime"><span class="sortableTableHeader"><var:string label:value="End"/></span></td> <td class="headerCell headerDateTime sortableTableHeader"><var:string label:value="End"/></td>
<td class="headerCell headerLocation"><span class="sortableTableHeader"><var:string label:value="Location"/></span></td> <td class="headerCell headerLocation sortableTableHeader"><var:string label:value="Location"/></td>
</tr> </tr>
</table> </table>
</div> </div>

View File

@ -46,6 +46,7 @@
<script type="text/javascript" rsrc:src="events.js"><!-- space required --></script> <script type="text/javascript" rsrc:src="events.js"><!-- space required --></script>
<script type="text/javascript" rsrc:src="prototype.js"><!-- space required --></script> <script type="text/javascript" rsrc:src="prototype.js"><!-- space required --></script>
<script type="text/javascript" rsrc:src="tablekit.js"><!-- space required --></script> <script type="text/javascript" rsrc:src="tablekit.js"><!-- space required --></script>
<script type="text/javascript" rsrc:src="tablekit-trueresize.js"><!-- space required --></script>
<script type="text/javascript" rsrc:src="JavascriptAPIExtensions.js"><!-- space required --></script> <script type="text/javascript" rsrc:src="JavascriptAPIExtensions.js"><!-- space required --></script>
<script type="text/javascript" rsrc:src="HTMLElement.js"><!-- space required --></script> <script type="text/javascript" rsrc:src="HTMLElement.js"><!-- space required --></script>
<script type="text/javascript" rsrc:src="HTMLInputElement.js"><!-- space required --></script> <script type="text/javascript" rsrc:src="HTMLInputElement.js"><!-- space required --></script>

View File

@ -39,7 +39,7 @@ DIV#contactsListContent
left: 0px; left: 0px;
right: 0px; right: 0px;
height: 16em; height: 16em;
overflow: scroll; overflow: auto;
overflow-x: hidden; } overflow-x: hidden; }
.aptview_text .aptview_text
@ -169,17 +169,15 @@ DIV#folderTreeContent TABLE TD
padding: 0px; } padding: 0px; }
TABLE#contactsList TABLE#contactsList
{ display: block; { width: 100%; }
position: relative;
width: 100%; }
TABLE#contactsList TD TABLE#contactsList TD,
{ white-space: normal; /* pre, normal, nowrap */ TABLE#contactsList TH
/*width: 20%;*/ } { overflow: hidden;
white-space: nowrap; } /* pre, normal, nowrap */
TD#nameHeader, TABLE#contactsList TH
TD#mailHeader { white-space: pre; }
{ /*width: 30%;*/ }
TABLE#contactsList TD IMG TABLE#contactsList TD IMG
{ {
@ -247,18 +245,6 @@ DIV.contactColumn H4
INPUT#searchValue:focus INPUT#searchValue:focus
{ color: #000; } { color: #000; }
TABLE#contactsList TD.resize-handle-active
{ cursor: e-resize; }
DIV.resize-handle
{ cursor: e-resize;
width: 2px;
border-right: 1px solid #fff;
position: absolute;
top: 0;
left: 0;
max-height: 2em; }
/* drag handles */ /* drag handles */
DIV#dragHandle DIV#dragHandle
{ {

View File

@ -2,7 +2,6 @@
var cachedContacts = new Array(); var cachedContacts = new Array();
var currentContactFolder = null; var currentContactFolder = null;
var savedColumnsWidth = null;
var usersRightsWindowHeight = 200; var usersRightsWindowHeight = 200;
var usersRightsWindowWidth = 450; var usersRightsWindowWidth = 450;
@ -56,7 +55,7 @@ function openContactsFolder(contactsFolder, reload, idx) {
if (document.contactsListAjaxRequest) { if (document.contactsListAjaxRequest) {
document.contactsListAjaxRequest.aborted = true; document.contactsListAjaxRequest.aborted = true;
document.contactsListAjaxRequest.abort(); document.contactsListAjaxRequest.abort();
} } log (url);
document.contactsListAjaxRequest document.contactsListAjaxRequest
= triggerAjaxRequest(url, contactsListCallback, selection); = triggerAjaxRequest(url, contactsListCallback, selection);
} }
@ -74,33 +73,30 @@ function openContactsFolderAtIndex(element) {
= triggerAjaxRequest(url, contactsListCallback); = triggerAjaxRequest(url, contactsListCallback);
} }
function configureContactsListHeaders(cells) {
for (var i = 0; i < cells.length; i++) {
var currentCell = $(cells[i]);
Event.observe(currentCell, "click",
onHeaderClick.bindAsEventListener(currentCell));
//Event.observe(currentCell, "mousedown", listRowMouseDownHandler);
}
}
function contactsListCallback(http) { function contactsListCallback(http) {
var div = $("contactsListContent");
if (http.readyState == 4 if (http.readyState == 4
&& http.status == 200) { && http.status == 200) {
document.contactsListAjaxRequest = null; document.contactsListAjaxRequest = null;
div.update(http.responseText);
var table = $("contactsList"); var table = $("contactsList");
if (table) { if (table) {
TableKit.Resizable.init(table); // Update table
if (savedColumnsWidth != null) { var data = http.responseText;
// Restore columns width var html = data.replace(/^(.*\n)*.*(<table(.*\n)*)$/, "$2");
table.setColumnsWidth(savedColumnsWidth); var tbody = table.tBodies[0];
} var tmp = document.createElement('div');
configureContactsListHeaders(table.tBodies[0].rows[0].cells); $(tmp).update(html);
table.replaceChild(tmp.firstChild.tBodies[0], tbody);
} }
else {
// Add table (doesn't happen .. yet)
var div = $("contactsListContent");
div.update(http.responseText);
table = $("contactsList");
configureSortableTableHeaders(table);
TableKit.Resizable.init(table, {'trueResize' : true, 'keepWidth' : true});
}
if (sorting["attribute"] && sorting["attribute"].length > 0) { if (sorting["attribute"] && sorting["attribute"].length > 0) {
var sortHeader; var sortHeader;
if (sorting["attribute"] == "displayName") if (sorting["attribute"] == "displayName")
@ -117,6 +113,11 @@ function contactsListCallback(http) {
sortHeader = null; sortHeader = null;
if (sortHeader) { if (sortHeader) {
var sortImages = $(table.tHead).getElementsByClassName("sortImage");
$(sortImages).each(function(item) {
item.remove();
});
var sortImage = createElement("img", "messageSortImage", "sortImage"); var sortImage = createElement("img", "messageSortImage", "sortImage");
sortHeader.insertBefore(sortImage, sortHeader.firstChild); sortHeader.insertBefore(sortImage, sortHeader.firstChild);
if (sorting["ascending"]) if (sorting["ascending"])
@ -418,10 +419,9 @@ function onHeaderClick(event) {
sorting["ascending"] = true; sorting["ascending"] = true;
} }
savedColumnsWidth = this.up('table').getColumnsWidth();
refreshCurrentFolder(); refreshCurrentFolder();
preventDefault(event); Event.stop(event);
} }
function newContact(sender) { function newContact(sender) {
@ -437,7 +437,7 @@ function onFolderSelectionChange() {
if (nodes[0].hasClassName("denied")) { if (nodes[0].hasClassName("denied")) {
var div = $("contactsListContent"); var div = $("contactsListContent");
div.innerHTML = ""; div.update();
} }
else { else {
search = {}; search = {};
@ -746,6 +746,13 @@ function initContacts(event) {
configureSelectionButtons(); configureSelectionButtons();
configureContactFolders(); configureContactFolders();
// initDnd(); // initDnd();
var table = $("contactsList");
if (table) {
// Initialize contacts table
configureSortableTableHeaders(table);
TableKit.Resizable.init(table, {'trueResize' : true, 'keepWidth' : true});
}
} }
addEvent(window, 'load', initContacts); addEvent(window, 'load', initContacts);

View File

@ -34,28 +34,6 @@ Element.addMethods({
node.select(); node.select();
} }
} }
},
getColumnsWidth: function(element) {
element = $(element);
var widths = new Array();
if (element.tagName == 'TABLE') {
var cells = TableKit.getHeaderCells(element);
for (var i = 0; i < cells.length; i++) {
widths[i] = $(cells[i]).getWidth();
}
}
return widths;
},
setColumnsWidth: function(element, widths) {
element = $(element);
if (element.tagName == 'TABLE') {
for (var i = 0; i < widths.length; i++) {
TableKit.Resizable.resize(element, i, widths[i]);
}
}
} }
}); // Element.addMethods }); // Element.addMethods

View File

@ -52,7 +52,7 @@ DIV#mailboxContent
left: 0px; left: 0px;
right: 0px; right: 0px;
height: 15.5em; height: 15.5em;
overflow: scroll; overflow: auto;
overflow-x: hidden; } overflow-x: hidden; }
DIV#messageContent DIV#messageContent
@ -475,10 +475,16 @@ TABLE#addr_table
} }
TABLE#messageList TABLE#messageList
{ /*width: 100%;*/ } { width: 100%; }
TABLE#messageList TD TABLE#messageList TD,
{ height: 1.2em; } TABLE#messageList TH
{ height: 1.2em;
overflow: hidden;
white-space: nowrap; }
TABLE#messageList TH
{ white-space: pre; }
TD#messageFlagHeader, TD#messageFlagHeader,
TABLE#messageList TD.messageFlagColumn TABLE#messageList TD.messageFlagColumn
@ -500,8 +506,7 @@ TABLE#messageList TD.messageAddressColumn
overflow: hidden; } overflow: hidden; }
TD#dateHeader, TD#dateHeader,
TABLE#messageList TD.tbtv_date_headercell, TABLE#messageList TD.tbtv_date_headercell
TABLE#messageList TD.messageDateColumn
{ /*width: 25%;*/ { /*width: 25%;*/
overflow: hidden; } overflow: hidden; }
@ -516,18 +521,6 @@ TABLE#messageList TR._deleted TD
text-decoration: line-through; text-decoration: line-through;
} }
TABLE#messageList TD.resize-handle-active
{ cursor: e-resize; }
DIV.resize-handle
{ cursor: e-resize;
width: 2px;
border-right: 1px solid #fff;
position: absolute;
top: 0;
left: 0;
max-height: 2em; }
/* drag handles */ /* drag handles */
DIV#verticalDragHandle DIV#verticalDragHandle
{ {

View File

@ -342,7 +342,7 @@ function onMailboxTreeItemClick(event) {
else else
openMailbox(mailbox); openMailbox(mailbox);
preventDefault(event); Event.stop(event);
} }
function onMailboxMenuMove() { function onMailboxMenuMove() {
@ -415,7 +415,6 @@ function openMailbox(mailbox, reload, idx) {
+ rightDragHandle.offsetHeight + rightDragHandle.offsetHeight
+ 'px') }); + 'px') });
} }
document.messageListAjaxRequest document.messageListAjaxRequest
= triggerAjaxRequest(url, messageListCallback, = triggerAjaxRequest(url, messageListCallback,
currentMessage); currentMessage);
@ -429,18 +428,34 @@ function openMailbox(mailbox, reload, idx) {
function openMailboxAtIndex(event) { function openMailboxAtIndex(event) {
openMailbox(currentMailbox, true, this.getAttribute("idx")); openMailbox(currentMailbox, true, this.getAttribute("idx"));
preventDefault(event); Event.stop(event);
} }
function messageListCallback(http) { function messageListCallback(http) {
var div = $('mailboxContent'); var table = $('messageList');
if (http.readyState == 4 if (http.readyState == 4
&& http.status == 200) { && http.status == 200) {
document.messageListAjaxRequest = null; document.messageListAjaxRequest = null;
div.update(http.responseText);
TableKit.Resizable.init($('messageList')); if (table) {
// Update table
var thead = table.tHead;
var tbody = table.tBodies[0];
var tmp = document.createElement('div');
$(tmp).update(http.responseText);
thead.rows[1].parentNode.replaceChild(tmp.firstChild.tHead.rows[1], thead.rows[1]);
table.replaceChild(tmp.firstChild.tBodies[0], tbody);
}
else {
// Add table
var div = $('mailboxContent');
div.update(http.responseText);
table = $('messageList');
configureMessageListEvents(table);
TableKit.Resizable.init(table, {'trueResize' : true, 'keepWidth' : true});
}
configureMessageListBodyEvents(table);
var selected = http.callbackData; var selected = http.callbackData;
if (selected) { if (selected) {
@ -448,20 +463,16 @@ function messageListCallback(http) {
if (row) if (row)
row.select(); row.select();
} }
configureMessageListEvents();
if (sorting["attribute"] && sorting["attribute"].length > 0) { if (sorting["attribute"] && sorting["attribute"].length > 0) {
var sortHeader; var sortHeader = $(sorting["attribute"] + "Header");
if (sorting["attribute"] == "subject")
sortHeader = $("subjectHeader");
else if (sorting["attribute"] == "from")
sortHeader = $("fromHeader");
else if (sorting["attribute"] == "date")
sortHeader = $("dateHeader");
else
sortHeader = null;
if (sortHeader) { if (sortHeader) {
var sortImages = $(table.tHead).getElementsByClassName("sortImage");
$(sortImages).each(function(item) {
item.remove();
});
var sortImage = createElement("img", "messageSortImage", "sortImage"); var sortImage = createElement("img", "messageSortImage", "sortImage");
sortHeader.insertBefore(sortImage, sortHeader.firstChild); sortHeader.insertBefore(sortImage, sortHeader.firstChild);
if (sorting["ascending"]) if (sorting["ascending"])
@ -626,7 +637,7 @@ function storeCachedMessage(cachedMessage) {
cachedMessages[oldest] = cachedMessage; cachedMessages[oldest] = cachedMessage;
} }
function onMessageSelectionChange() { function onMessageSelectionChange() { log ("onMessageSelectionChange");
var rows = this.getSelectedRowsId(); var rows = this.getSelectedRowsId();
if (rows.length == 1) { if (rows.length == 1) {
@ -857,7 +868,7 @@ function onHeaderClick(event) {
newSortAttribute = "date"; newSortAttribute = "date";
else else
newSortAttribute = "arrival"; newSortAttribute = "arrival";
log ("new sort attribute = " + newSortAttribute);
if (sorting["attribute"] == newSortAttribute) if (sorting["attribute"] == newSortAttribute)
sorting["ascending"] = !sorting["ascending"]; sorting["ascending"] = !sorting["ascending"];
else { else {
@ -866,7 +877,7 @@ function onHeaderClick(event) {
} }
refreshCurrentFolder(); refreshCurrentFolder();
Event.stop(event); Event.stop(event);
} }
@ -956,35 +967,33 @@ var messageListData = function(type) {
/* a model for a futur refactoring of the sortable table headers mechanism */ /* a model for a futur refactoring of the sortable table headers mechanism */
function configureMessageListHeaders(cells) {
for (var i = 0; i < cells.length; i++) { function configureMessageListEvents(table) {
var currentCell = $(cells[i]); if (table) {
Event.observe(currentCell, "click", // Each body row can load a message
onHeaderClick.bindAsEventListener(currentCell)); Event.observe(table, "mousedown",
//Event.observe(currentCell, "mousedown", listRowMouseDownHandler); onMessageSelectionChange.bindAsEventListener(table));
// Sortable columns
configureSortableTableHeaders(table);
} }
} }
function configureMessageListEvents() { function configureMessageListBodyEvents(table) {
var messageList = $("messageList"); if (table) {
if (messageList) { // Page navigation
Event.observe(messageList, "mousedown", var cell = table.tHead.rows[1].cells[0];
onMessageSelectionChange.bindAsEventListener(messageList));
configureMessageListHeaders(messageList.tHead.rows[0].cells);
var cell = messageList.tHead.rows[1].cells[0];
if ($(cell).hasClassName("tbtv_navcell")) { if ($(cell).hasClassName("tbtv_navcell")) {
var anchors = $(cell).childNodesWithTag("a"); var anchors = $(cell).childNodesWithTag("a");
for (var i = 0; i < anchors.length; i++) for (var i = 0; i < anchors.length; i++)
Event.observe(anchors[i], "click", openMailboxAtIndex.bindAsEventListener(anchors[i])); Event.observe(anchors[i], "click", openMailboxAtIndex.bindAsEventListener(anchors[i]));
} }
rows = messageList.tBodies[0].rows; rows = table.tBodies[0].rows;
for (var i = 0; i < rows.length; i++) { for (var i = 0; i < rows.length; i++) {
Event.observe(rows[i], "mousedown", onRowClick); Event.observe(rows[i], "mousedown", onRowClick);
Event.observe(rows[i], "contextmenu", onMessageContextMenu.bindAsEventListener(rows[i])); Event.observe(rows[i], "contextmenu", onMessageContextMenu.bindAsEventListener(rows[i]));
rows[i].dndTypes = function() { return new Array("mailRow"); }; rows[i].dndTypes = function() { return new Array("mailRow"); };
rows[i].dndGhost = messageListGhost; rows[i].dndGhost = messageListGhost;
rows[i].dndDataForType = messageListData; rows[i].dndDataForType = messageListData;

View File

@ -69,7 +69,8 @@ UL#tasksList, UL#calendarList
overflow-x: hidden; } overflow-x: hidden; }
UL#calendarList UL#calendarList
{ clear: both; { clear: left;
width: 100%;
height: 10.5em; height: 10.5em;
margin: 0px; } margin: 0px; }
@ -266,13 +267,19 @@ TABLE#dateSelectorTable
border: 1px solid #deebf7; } border: 1px solid #deebf7; }
TABLE#eventsList TABLE#eventsList
{ display: block; { width: 100%; }
position: relative;
width: 100%; }
TABLE#eventsList td.headerTitle, TABLE#eventsList TD.headerTitle,
TABLE#eventsList td.headerLocation TABLE#eventsList TD.headerDateTime
{ width: 35%; } { width: 30%; }
TABLE#eventsList TD,
TABLE#eventsList TH
{ overflow: hidden;
white-space: nowrap; } /* pre, normal, nowrap */
TABLE#eventsList TH
{ white-space: pre; }
._unfocused#dateSelector TD._selected, ._unfocused#dateSelector TD._selected,
UL._unfocused > LI._selected, UL._unfocused > LI._selected,

View File

@ -307,16 +307,15 @@ function eventsListCallback(http) {
var div = $("eventsListView"); var div = $("eventsListView");
document.eventsListAjaxRequest = null; document.eventsListAjaxRequest = null;
var table = $("eventsList").tBodies[0]; var table = $("eventsList");
var params = parseQueryParameters(http.callbackData); var params = parseQueryParameters(http.callbackData);
sortKey = params["sort"]; sortKey = params["sort"];
sortOrder = params["desc"]; sortOrder = params["desc"];
configureSortableTableHeaders();
var data = http.responseText.evalJSON(true); var data = http.responseText.evalJSON(true);
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
var row = document.createElement("tr"); var row = document.createElement("tr");
table.appendChild(row); table.tBodies[0].appendChild(row);
$(row).addClassName("eventRow"); $(row).addClassName("eventRow");
row.setAttribute("id", escape(data[i][0])); row.setAttribute("id", escape(data[i][0]));
row.cname = escape(data[i][0]); row.cname = escape(data[i][0]);
@ -771,7 +770,7 @@ function calendarDisplayCallback(http) {
if (http.readyState == 4 if (http.readyState == 4
&& http.status == 200) { && http.status == 200) {
document.dayDisplayAjaxRequest = null; document.dayDisplayAjaxRequest = null;
div.innerHTML = http.responseText; div.update(http.responseText);
if (http.callbackData["view"]) if (http.callbackData["view"])
currentView = http.callbackData["view"]; currentView = http.callbackData["view"];
if (http.callbackData["day"]) if (http.callbackData["day"])
@ -927,8 +926,8 @@ function _loadTasksHref(href) {
} }
function onHeaderClick(event) { function onHeaderClick(event) {
// log("onHeaderClick: " + this.link); //log("onHeaderClick: " + this.link);
_loadEventHref(this.link); //_loadEventHref(this.link);
preventDefault(event); preventDefault(event);
} }
@ -1544,6 +1543,8 @@ function configureLists() {
list = $("eventsList"); list = $("eventsList");
list.multiselect = true; list.multiselect = true;
//configureSortableTableHeaders(list);
TableKit.Resizable.init(list, {'trueResize' : true, 'keepWidth' : true});
Event.observe(list, "mousedown", Event.observe(list, "mousedown",
onEventsSelectionChange.bindAsEventListener(list)); onEventsSelectionChange.bindAsEventListener(list));
var div = list.parentNode; var div = list.parentNode;

View File

@ -701,6 +701,20 @@ INPUT.checkBox
-moz-border-bottom-colors: #000 #fff; -moz-border-bottom-colors: #000 #fff;
-moz-border-right-colors: #000 #fff; } -moz-border-right-colors: #000 #fff; }
/* tablekit resizable columns */
TABLE TD.resize-handle-active
{ cursor: e-resize; }
DIV.resize-handle
{ cursor: e-resize;
width: 2px;
border-right: 1px solid #fff;
position: absolute;
top: 0;
left: 0;
max-height: 2em; }
@media print @media print
{ {
BODY BODY

View File

@ -222,7 +222,7 @@ function openContactWindow(url, wId) {
return w; return w;
} }
function openMailComposeWindow(url, wId) { log (url); function openMailComposeWindow(url, wId) {
if (!wId) if (!wId)
wId = "" + (new Date().getTime()); wId = "" + (new Date().getTime());
var w = window.open(url, wId, var w = window.open(url, wId,
@ -1046,7 +1046,8 @@ function accessToSubscribedFolder(serverFolder) {
} }
function listRowMouseDownHandler(event) { function listRowMouseDownHandler(event) {
preventDefault(event); preventDefault(event);
//Event.stop(event);
} }
/* tabs */ /* tabs */
@ -1301,7 +1302,6 @@ function onLoadHandler(event) {
initMenus(); initMenus();
initTabs(); initTabs();
configureDragHandles(); configureDragHandles();
configureSortableTableHeaders();
configureLinkBanner(); configureLinkBanner();
translateLabels(); translateLabels();
var progressImage = $("progressIndicator"); var progressImage = $("progressIndicator");
@ -1326,14 +1326,11 @@ function onBodyClickContextMenu(event) {
preventDefault(event); preventDefault(event);
} }
function configureSortableTableHeaders() { function configureSortableTableHeaders(table) {
var headers = document.getElementsByClassName("sortableTableHeader"); var headers = $(table).getElementsByClassName("sortableTableHeader");
for (var i = 0; i < headers.length; i++) { for (var i = 0; i < headers.length; i++) {
var header = headers[i]; var header = headers[i];
var anchor = $(header).childNodesWithTag("a")[0]; Event.observe(header, "click", onHeaderClick.bindAsEventListener(header))
if (anchor)
Event.observe(anchor, "click",
onHeaderClick.bindAsEventListener(anchor));
} }
} }

View File

@ -535,6 +535,16 @@ TableKit.Resizable = {
Event.observe(c, 'mouseout', TableKit.Resizable.killDetect); Event.observe(c, 'mouseout', TableKit.Resizable.killDetect);
}); });
}, },
reload : function(table) {
table = $(table);
var cells = TableKit.getHeaderCells(table);
cells.each(function(c){
c = $(c);
Event.stopObserving(c, 'mouseover', TableKit.Resizable.initDetect);
Event.stopObserving(c, 'mouseout', TableKit.Resizable.killDetect);
});
TableKit.Resizable.init(table);
},
resize : function(table, index, w) { resize : function(table, index, w) {
var cell; var cell;
if(typeof index === 'number') { if(typeof index === 'number') {