merge of 'edee02986f2da875cdc191d1e96c9d41d928200a'

and 'f36334509c4664853d23a261e33fef626136abcf'

Monotone-Parent: edee02986f2da875cdc191d1e96c9d41d928200a
Monotone-Parent: f36334509c4664853d23a261e33fef626136abcf
Monotone-Revision: b8c85ddcde506f67f18bf96dcff79741af94661b

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2008-04-29T20:59:05
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Wolfgang Sourdeau 2008-04-29 20:59:05 +00:00
commit 6a1cf458cd
5 changed files with 43 additions and 25 deletions

View File

@ -1170,17 +1170,17 @@ var messageListGhost = function () {
newDiv.appendChild(document.createTextNode(count + " messages..."));
return newDiv;
};
var messageListData = function(type) {
var rows = this.parentNode.parentNode.getSelectedRowsId();
var msgIds = new Array();
for (var i = 0; i < rows.length; i++)
msgIds.push(rows[i].substr(4));
return msgIds;
}
var messageListData = function(type) {
var rows = this.parentNode.parentNode.getSelectedRowsId();
var msgIds = new Array();
for (var i = 0; i < rows.length; i++)
msgIds.push(rows[i].substr(4));
return msgIds;
}
/* a model for a futur refactoring of the sortable table headers mechanism */
function configureMessageListEvents(table) {
if (table) {
@ -1200,28 +1200,28 @@ function configureMessageListBodyEvents(table) {
if ($(cell).hasClassName("tbtv_navcell")) {
var anchors = $(cell).childNodesWithTag("a");
for (var i = 0; i < anchors.length; i++)
anchors[i].observe("click",
openMailboxAtIndex.bindAsEventListener(anchors[i]));
$(anchors[i]).observe("click", openMailboxAtIndex);
}
rows = table.tBodies[0].rows;
for (var i = 0; i < rows.length; i++) {
rows[i].observe("mousedown", onRowClick);
rows[i].observe("selectstart", listRowMouseDownHandler);
rows[i].observe("contextmenu", onMessageContextMenu.bindAsEventListener(rows[i]));
var row = $(rows[i]);
row.observe("mousedown", onRowClick);
row.observe("selectstart", listRowMouseDownHandler);
row.observe("contextmenu", onMessageContextMenu);
rows[i].dndTypes = function() { return new Array("mailRow"); };
rows[i].dndGhost = messageListGhost;
rows[i].dndDataForType = messageListData;
// document.DNDManager.registerSource(rows[i]);
row.dndTypes = function() { return new Array("mailRow"); };
row.dndGhost = messageListGhost;
row.dndDataForType = messageListData;
// document.DNDManager.registerSource(row);
for (var j = 0; j < rows[i].cells.length; j++) {
var cell = rows[i].cells[j];
for (var j = 0; j < row.cells.length; j++) {
var cell = $(row.cells[j]);
cell.observe("mousedown", listRowMouseDownHandler);
if (j == 2 || j == 3 || j == 5)
cell.observe("dblclick", onMessageDoubleClick.bindAsEventListener(cell));
else if (j == 4) {
var img = cell.childNodesWithTag("img")[0];
var img = $(cell.childNodesWithTag("img")[0]);
img.observe("click", mailListMarkMessage.bindAsEventListener(img));
}
}

View File

@ -261,11 +261,11 @@ function onTextFocus() {
function onTextFirstFocus() {
var content = this.getValue();
if (content.lastIndexOf("--") == 0) {
this.insertBefore(document.createTextNode("\r\n"),
this.insertBefore(document.createTextNode("\r"),
this.lastChild);
}
if (signatureLength > 0) {
var length = this.getValue().length - signatureLength - 1;
var length = this.getValue().length - signatureLength - 2;
this.setCaretTo(length);
}
Event.stopObserving(this, "focus", onTextFirstFocus);

View File

@ -304,6 +304,7 @@ function onAjaxRequestStateChange(http) {
log("AJAX Request, Caught Exception: " + e.name);
log(e.message);
log(backtrace());
log("request url was '" + http.url + "'");
}
}
@ -1387,6 +1388,16 @@ function onLoadHandler(event) {
if (progressImage)
progressImage.parentNode.removeChild(progressImage);
$(document.body).observe("contextmenu", onBodyClickContextMenu);
/* $(document.body).observe("click", testclic); */
}
function testclic(event) {
log("test: " + event.target);
if (event.target) {
log("tag: " + event.target.tagName);
log("id: " + event.target.getAttribute("id"));
log("class: " + event.target.getAttribute("class"));
}
}
function onBodyClickContextMenu(event) {

View File

@ -1,4 +1,11 @@
/* SOGoRootPage */
HTML
{ overflow: hidden; }
FORM
{ padding: 0px;
margin: 0px; }
DIV#loginScreen
{ border: 2px solid #fff;
border-right: 2px solid #666;
@ -293,4 +300,4 @@ TABLE#freeBusyData TD SPAN.freeBusyZoneElement
{ height: 103%; }
TABLE
{ empty-cells: show; }
{ empty-cells: show; }

View File

@ -1275,7 +1275,7 @@ Ajax.Request = Class.create(Ajax.Base, {
success: function() {
var status = this.getStatus();
return !status || (status >= 200 && status < 300);
return !status || status == 1223 || (status >= 200 && status < 300);
},
getStatus: function() {