merge of '49f34fbd1c71d08a025aff7ebece50001773fa8e'

and '92d5ab2719da70823dc4cd47a37ba4c74f093c11'

Monotone-Parent: 49f34fbd1c71d08a025aff7ebece50001773fa8e
Monotone-Parent: 92d5ab2719da70823dc4cd47a37ba4c74f093c11
Monotone-Revision: bdfa1641c55906ac04987ae50165889fa53c577b

Monotone-Author: flachapelle@inverse.ca
Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-05-25T15:53:23
Monotone-Date: 2007-05-25T17:24:56
Monotone-Branch: ca.inverse.sogo
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2007-05-25 15:53:23 +00:00
3 changed files with 71 additions and 53 deletions
+8 -8
View File
@@ -15,8 +15,8 @@ var SOGoDragHandlesInterface = {
stopHandleDraggingBinded: null,
moveBinded: null,
bind: function () {
this.startHandleDraggingBinded = this.startHandleDragging.bindAsEventListener(this);
Event.observe(this, "mousedown", this.startHandleDraggingBinded, false);
this.startHandleDraggingBound = this.startHandleDragging.bindAsEventListener(this);
Event.observe(this, "mousedown", this.startHandleDraggingBound, false);
this.onmousedown = function() { return false }
},
_determineType: function () {
@@ -49,10 +49,10 @@ var SOGoDragHandlesInterface = {
this.origLower = this.lowerBlock.offsetTop - 5;
document.body.style.cursor = "n-resize";
}
this.stopHandleDraggingBinded = this.stopHandleDragging.bindAsEventListener(this);
Event.observe(document.body, "mouseup", this.stopHandleDraggingBinded, true);
this.moveBinded = this.move.bindAsEventListener(this);
Event.observe(document.body, "mousemove", this.moveBinded, true);
this.stopHandleDraggingBound = this.stopHandleDragging.bindAsEventListener(this);
Event.observe(document.body, "mouseup", this.stopHandleDraggingBound, true);
this.moveBound = this.move.bindAsEventListener(this);
Event.observe(document.body, "mousemove", this.moveBound, true);
this.move(event);
event.cancelBubble = true;
}
@@ -74,8 +74,8 @@ var SOGoDragHandlesInterface = {
this.upperBlock.style.height = (this.origUpper + deltaY - delta) + 'px';
}
Event.stopObserving(document.body, "mouseup", this.stopHandleDraggingBinded, true);
Event.stopObserving(document.body, "mousemove", this.moveBinded, true);
Event.stopObserving(document.body, "mouseup", this.stopHandleDraggingBound, true);
Event.stopObserving(document.body, "mousemove", this.moveBound, true);
document.body.setAttribute('style', '');
+9 -11
View File
@@ -25,14 +25,14 @@ function onPopupUrlWindow(event) {
if (documentHref.childNodes.length > 0) {
documentHref.childNodes[0].nodeValue = newUrl;
if (newUrl.length > 0)
documentLabel.style.display = "block;";
documentLabel.setStyle({ display: "block" });
else
documentLabel.style.display = "none;";
documentLabel.setStyle({ display: "none" });
}
else {
documentHref.appendChild(document.createTextNode(newUrl));
if (newUrl.length > 0)
documentLabel.style.display = "block;";
documentLabel.setStyle({ display: "block" });
}
urlInput.value = newUrl;
}
@@ -88,10 +88,10 @@ function refreshAttendees() {
if (attendeesNames.value.length > 0) {
attendeesHref.appendChild(document.createTextNode(attendeesNames.value));
attendeesLabel.style.display = "block;";
attendeesLabel.setStyle({ display: "block" });
}
else
attendeesLabel.style.display = "none;";
attendeesLabel.setStyle({ display: "none" });
}
function initializeAttendeesHref() {
@@ -101,10 +101,9 @@ function initializeAttendeesHref() {
attendeesHref.addEventListener("click", onPopupAttendeesWindow, false);
if (attendeesNames.value.length > 0) {
attendeesHref.style.textDecoration = "underline;";
attendeesHref.style.color = "#00f;";
attendeesHref.setStyle({ textDecoration: "underline", color: "#00f" });
attendeesHref.appendChild(document.createTextNode(attendeesNames.value));
attendeesLabel.style.display = "block;";
attendeesLabel.setStyle({ display: "block" });
}
}
@@ -114,11 +113,10 @@ function initializeDocumentHref() {
var documentUrl = $("url");
documentHref.addEventListener("click", onPopupDocumentWindow, false);
documentHref.style.textDecoration = "underline;";
documentHref.style.color = "#00f;";
documentHref.setStyle({ textDecoration: "underline", color: "#00f" });
if (documentUrl.value.length > 0) {
documentHref.appendChild(document.createTextNode(documentUrl.value));
documentLabel.style.display = "block;";
documentLabel.setStyle({ display: "block" });
}
var changeUrlButton = $("changeUrlButton");
+54 -34
View File
@@ -258,12 +258,13 @@ function checkAjaxRequestsState() {
document.busyAnim = anim;
anim.id = "progressIndicator";
anim.src = ResourcesURL + "/busy.gif";
anim.style.visibility = "hidden;";
anim.setStyle({ visibility: "hidden" });
toolbar.appendChild(anim);
anim.style.visibility = "visible;";
anim.setStyle({ visibility: "visible" });
}
else if (activeAjaxRequests == 0
&& document.busyAnim) {
&& document.busyAnim
&& document.busyAnim.parentNode) {
document.busyAnim.parentNode.removeChild(document.busyAnim);
document.busyAnim = null;
}
@@ -410,12 +411,19 @@ function onRowClick(event) {
if (startSelection != node.parentNode.getSelectedNodes()) {
var parentNode = node.parentNode;
log("onRowClick " + parentNode.tagName);
if (parentNode.tagName == 'TBODY')
parentNode = parentNode.parentNode;
var onSelectionChangeEvent = document.createEvent("UIEvents");
onSelectionChangeEvent.initEvent("selectionchange", true, true);
parentNode.dispatchEvent(onSelectionChangeEvent);
log("onRowClick: parentNode = " + parentNode.tagName);
if (document.createEvent) {
var onSelectionChangeEvent = document.createEvent("UIEvents");
onSelectionChangeEvent.initEvent("selectionchange", true, true);
parentNode.dispatchEvent(onSelectionChangeEvent);
}
else if (document.createEventObject) {
// TODO: add support for IE
//parentNode.fireEvent("change");
//parentNode is UL or TABLE
}
}
}
@@ -444,9 +452,9 @@ function popupMenu(event, menuId, target) {
if (leftDiff < 0)
menuLeft -= popup.offsetWidth;
popup.style.top = menuTop + "px;";
popup.style.left = menuLeft + "px;";
popup.style.visibility = "visible;";
popup.setStyle({ top: menuTop + "px",
left: menuLeft + "px",
visibility: "visible" });
bodyOnClick = "" + document.body.getAttribute("onclick");
document.body.setAttribute("onclick", "onBodyClick(event);");
@@ -491,7 +499,8 @@ function hideMenu(event, menuNode) {
menuNode.submenu = null;
}
menuNode.style.visibility = "hidden";
//menuNode.setStyle({ visibility: "hidden" });
$(menuNode).hide();
if (menuNode.parentMenuItem) {
menuNode.parentMenuItem.setAttribute('class', 'submenu');
menuNode.parentMenuItem = null;
@@ -501,9 +510,14 @@ function hideMenu(event, menuNode) {
menuNode.parentMenu = null;
}
var onhideEvent = document.createEvent("UIEvents");
onhideEvent.initEvent("hideMenu", false, true);
menuNode.dispatchEvent(onhideEvent);
if (document.initEvent) {
var onhideEvent = document.createEvent("UIEvents");
onhideEvent.initEvent("hideMenu", false, true);
menuNode.dispatchEvent(onhideEvent);
}
else if (document.createEventObject) {
// TODO: add support for IE
}
}
function onMenuEntryClick(event) {
@@ -633,9 +647,9 @@ function dropDownSubmenu(event) {
parentNode.setAttribute('onmousemove', 'checkDropDown(event);');
node.setAttribute('class', 'submenu-selected');
submenuNode.style.top = menuTop + "px;";
submenuNode.style.left = menuLeft + "px;";
submenuNode.style.visibility = "visible;";
submenuNode.setStyle({ top: menuTop + "px",
left: menuLeft + "px",
visibility: "visible" });
}
}
@@ -677,9 +691,9 @@ function popupSearchMenu(event) {
hideMenu(event, document.currentPopupMenu);
var popup = document.getElementById(menuId);
popup.style.top = node.offsetHeight + "px";
popup.style.left = (node.offsetLeft + 3) + "px";
popup.style.visibility = "visible";
popup.setStyle({ top: node.offsetHeight + "px",
left: (node.offsetLeft + 3) + "px",
visibility: "visible" });
bodyOnClick = "" + document.body.getAttribute("onclick");
document.body.setAttribute("onclick", "onBodyClick('" + menuId + "');");
@@ -728,7 +742,7 @@ function onSearchFocus() {
this.select();
}
this.style.color = "#000";
this.setStyle({ color: "#000" });
}
function onSearchBlur(event) {
@@ -736,14 +750,14 @@ function onSearchBlur(event) {
// log ("search blur: '" + this.value + "'");
if (!this.value) {
this.setAttribute("modified", "");
this.style.color = "#aaa";
this.setStyle({ color: "#aaa" });
this.value = ghostPhrase;
} else if (this.value == ghostPhrase) {
this.setAttribute("modified", "");
this.style.color = "#aaa";
this.setStyle({ color: "#aaa" });
} else {
this.setAttribute("modified", "yes");
this.style.color = "#000";
this.setStyle({ color: "#000" });
}
}
@@ -772,7 +786,7 @@ function initCriteria() {
if (searchValue.value == '') {
searchValue.value = firstOption.innerHTML;
searchValue.setAttribute("modified", "");
searchValue.style.color = "#aaa";
searchValue.setStyle({ color: "#aaa" });
}
}
}
@@ -794,9 +808,9 @@ function popupToolbarMenu(event, menuId) {
var popup = document.getElementById(menuId);
var top = node.offsetTop + node.offsetHeight - 2;
popup.style.top = top + "px";
popup.style.left = node.cascadeLeftOffset() + "px";
popup.style.visibility = "visible";
popup.setStyle({ top: top + "px",
left: node.cascadeLeftOffset() + "px",
visibility: "visible" });
bodyOnClick = "" + document.body.getAttribute("onclick");
document.body.setAttribute("onclick", "onBodyClick('" + menuId + "');");
@@ -888,15 +902,21 @@ function initTabs() {
var containers = document.getElementsByClassName("tabsContainer");
for (var x = 0; x < containers.length; x++) {
var container = containers[x];
var nodes = container.childNodes[1].childNodes;
var firstTab;
var firstTab = null;
for (var i = 0; i < container.childNodes.length; i++) {
if (container.childNodes[i].tagName == 'UL') {
if (!firstTab)
firstTab = i;
}
}
var nodes = container.childNodes[firstTab].childNodes;
firstTab = null;
for (var i = 0; i < nodes.length; i++) {
if (nodes[i].tagName == 'LI') {
if (!firstTab) {
if (!firstTab)
firstTab = i;
}
Event.observe(nodes[i], "mousedown", onTabMouseDown, true);
Event.observe(nodes[i], "mousedown", onTabMouseDown, true);
Event.observe(nodes[i], "click", onTabClick, true);
}
}