mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-09-29 09:00:31 +00:00
Monotone-Parent: 1cd01a11a7384ec7da33be5a6316e39e3024c38a
Monotone-Revision: 16bd3aa0fa9b1f29444120c9720217440143eb7d Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-05-04T15:57:23 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -10,15 +10,12 @@ HTMLElement.prototype.childNodesWithTag = function(tagName) {
|
||||
var tagName = tagName.toUpperCase();
|
||||
|
||||
for (var i = 0; i < this.childNodes.length; i++) {
|
||||
// log("(" + tagName + ") childNodes " + i + " = " + this.childNodes[i]);
|
||||
if (typeof(this.childNodes[i]) == "object"
|
||||
&& this.childNodes[i].tagName
|
||||
&& this.childNodes[i].tagName.toUpperCase() == tagName)
|
||||
matchingNodes.push(this.childNodes[i]);
|
||||
}
|
||||
|
||||
// log ("matching: " + matchingNodes.length);
|
||||
|
||||
return matchingNodes;
|
||||
}
|
||||
|
||||
@@ -163,14 +160,10 @@ HTMLElement.prototype.onContextMenu = function(event) {
|
||||
popup.style.top = menuTop + "px;";
|
||||
popup.style.left = menuLeft + "px;";
|
||||
popup.style.visibility = "visible;";
|
||||
// setupMenuTarget(popup, event.target);
|
||||
|
||||
bodyOnClick = "" + document.body.getAttribute("onclick");
|
||||
document.body.setAttribute("onclick", "onBodyClick(event);");
|
||||
document.currentPopupMenu = popup;
|
||||
|
||||
// event.cancelBubble = true;
|
||||
// event.returnValue = false;
|
||||
}
|
||||
|
||||
HTMLElement.prototype.attachMenu = function(menuName) {
|
||||
|
||||
@@ -376,10 +376,16 @@ function onMailboxTreeItemClick(event) {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function refreshMailbox() {
|
||||
openMailbox(currentMailbox, true);
|
||||
function _refreshWindowMailbox() {
|
||||
openMailbox(currentMailbox, true);
|
||||
}
|
||||
|
||||
return false;
|
||||
function refreshMailbox() {
|
||||
var topWindow = getTopWindow();
|
||||
if (topWindow)
|
||||
topWindow._refreshWindowMailbox();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function openMailbox(mailbox, reload) {
|
||||
|
||||
@@ -23,33 +23,18 @@ var SOGODragAndDropSourceInterface = {
|
||||
}
|
||||
},
|
||||
dragGestureMouseUpHandler: function (event) {
|
||||
// log("mouseup");
|
||||
document._currentMouseGestureObject._removeGestureHandlers();
|
||||
},
|
||||
dragGestureMouseMoveHandler: function (event) {
|
||||
// log("source mouse move (target: " + event.target + ")");
|
||||
var deltaX = event.clientX - document._dragGestureStartPoint[0];
|
||||
var deltaY = event.clientY - document._dragGestureStartPoint[1];
|
||||
if (Math.sqrt((deltaX * deltaX) + (deltaY * deltaY)) > 10) {
|
||||
// log("event: " + event);
|
||||
// event.stopPropagation();
|
||||
// event.preventDefault();
|
||||
event.returnValue = true;
|
||||
event.cancelBubble = true;
|
||||
var object = document._currentMouseGestureObject;
|
||||
var point = document._dragGestureStartPoint;
|
||||
document.DNDManager.startDragging(object, point);
|
||||
document._currentMouseGestureObject._removeGestureHandlers();
|
||||
// var mouseup = document.createEvent("MouseEvent");
|
||||
// mouseup.initEvent("mouseup", true, true);
|
||||
// event.target.dispatchEvent(mouseup);
|
||||
// var dragStart = document.createEvent("MouseEvents");
|
||||
// dragStart.initMouseEvent("draggesture-hack", true, true, window,
|
||||
// event.detail, event.screenX, event.screenY,
|
||||
// event.clientX, event.clientY, event.ctrlKey,
|
||||
// event.altKey, event.shiftKey, event.metaKey,
|
||||
// event.button, null);
|
||||
// this.dispatchEvent(dragStart);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -94,10 +79,8 @@ document.DNDManager = {
|
||||
return destination;
|
||||
},
|
||||
startDragging: function (object, point) {
|
||||
// log("source gesture intercepted (source: " + object + ")");
|
||||
var source = document.DNDManager._lookupSource (object);
|
||||
if (source) {
|
||||
// log("source known");
|
||||
document.DNDManager.currentDndOperation = new document.DNDOperation(source, point);
|
||||
window.addEventListener("mouseup",
|
||||
document.DNDManager.destinationDrop, false);
|
||||
@@ -113,7 +96,6 @@ document.DNDManager = {
|
||||
var operation = document.DNDManager.currentDndOperation;
|
||||
var destination = document.DNDManager._lookupDestination (event.target);
|
||||
if (operation && destination && destination.dndAcceptType) {
|
||||
// log("enter: " + event.target);
|
||||
operation.type = null;
|
||||
var i = 0;
|
||||
while (operation.type == null
|
||||
@@ -133,21 +115,14 @@ document.DNDManager = {
|
||||
var operation = document.DNDManager.currentDndOperation;
|
||||
if (operation
|
||||
&& operation.destination == event.target) {
|
||||
// log("exit: " + event.target);
|
||||
if (operation.destination.dndExit)
|
||||
event.target.dndExit();
|
||||
operation.setDestination(null);
|
||||
}
|
||||
},
|
||||
destinationOver: function (event) {
|
||||
// log("over: " + event.target);
|
||||
// var operation = document.DNDManager.currentDndOperation;
|
||||
// if (operation
|
||||
// && operation.destination == event.target)
|
||||
// log("over: " + event.target);
|
||||
},
|
||||
destinationDrop: function (event) {
|
||||
// log ("drop...");
|
||||
var operation = document.DNDManager.currentDndOperation;
|
||||
if (operation) {
|
||||
window.removeEventListener("mouseup",
|
||||
@@ -159,20 +134,14 @@ document.DNDManager = {
|
||||
window.removeEventListener("mouseout",
|
||||
document.DNDManager.destinationExit, false);
|
||||
if (operation.destination == event.target) {
|
||||
// log("drag / drop: " + operation.source + " to " + operation.destination);
|
||||
if (operation.destination.dndExit) {
|
||||
// log ("destination.dndExit...");
|
||||
operation.destination.dndExit();
|
||||
}
|
||||
if (operation.destination.dndDrop) {
|
||||
// log ("destination.dndDrop...");
|
||||
var data = null;
|
||||
// log ("optype: " + operation.type);
|
||||
if (operation.source.dndDataForType)
|
||||
data = operation.source.dndDataForType(operation.type);
|
||||
// log ("data: " + data);
|
||||
var result = operation.destination.dndDrop(data);
|
||||
// log ("result: " + result);
|
||||
if (operation.ghost) {
|
||||
if (result)
|
||||
operation.bustGhost();
|
||||
@@ -244,6 +213,8 @@ document.DNDOperation.prototype.chaseGhost = function() {
|
||||
document.removeEventListener("mousemove", this.moveGhost, false);
|
||||
this.ghost.bustStep = 25;
|
||||
this.ghost.chaseStep = 25;
|
||||
this.ghost.style.overflow = "hidden;"
|
||||
this.ghost.style.whiteSpace = "nowrap;";
|
||||
this.ghost.chaseDeltaX = ((this.ghost.cascadeLeftOffset() - this.startPoint[0])
|
||||
/ this.ghost.chaseStep);
|
||||
this.ghost.chaseDeltaY = ((this.ghost.cascadeTopOffset() - this.startPoint[1])
|
||||
@@ -270,6 +241,8 @@ document.DNDOperation.prototype._chaseGhost = function() {
|
||||
document.DNDOperation.prototype._fadeGhost = function() {
|
||||
if (this.ghost.bustStep) {
|
||||
this.ghost.style.MozOpacity = (0.1 * this.ghost.bustStep);
|
||||
this.ghost.style.width = (this.ghost.offsetWidth * .7) + "px;";
|
||||
this.ghost.style.height = (this.ghost.offsetHeight * .7) + "px;";
|
||||
this.ghost.bustStep--;
|
||||
setTimeout("document._dyingOperation._fadeGhost();", 50);
|
||||
}
|
||||
|
||||
@@ -59,6 +59,8 @@ UL#tasksList, UL#calendarList
|
||||
margin: .25em;
|
||||
padding: 0px;
|
||||
overflow: auto;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
border-bottom: 1px solid #fff;
|
||||
border-right: 1px solid #fff;
|
||||
border-top: 2px solid #222;
|
||||
|
||||
@@ -1,23 +1,39 @@
|
||||
/* test */
|
||||
|
||||
DIV.acls
|
||||
{ padding: 1em; }
|
||||
{ position: absolute;
|
||||
top: 4em;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
bottom: 0px;
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
margin: 0px; }
|
||||
|
||||
DIV.acls LABEL
|
||||
{ white-space: nowrap;
|
||||
width: 100%; }
|
||||
|
||||
DIV.acls UL
|
||||
{ height: 100%;
|
||||
width: 100%; }
|
||||
DIV#userSelectorHeader
|
||||
{ margin: 1em; }
|
||||
|
||||
DIV#userRoles
|
||||
{ height: 8em;
|
||||
padding-bottom: 2em; }
|
||||
{ position: absolute;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
left: 1em;
|
||||
top: 5em;
|
||||
right: 1em;
|
||||
bottom: 0px; }
|
||||
|
||||
UL#userList
|
||||
{ cursor: default;
|
||||
margin: .25em;
|
||||
{ position: absolute;
|
||||
top: 1.5em;
|
||||
bottom: 0px;
|
||||
left: 0px;
|
||||
right: 0px;
|
||||
width: 100%;
|
||||
cursor: default;
|
||||
padding: 0px;
|
||||
white-space: nowrap;
|
||||
overflow: auto;
|
||||
@@ -34,12 +50,3 @@ UL#userList
|
||||
UL#userList > LI._selected
|
||||
{ background: #4b6983 !important;
|
||||
color: #fff !important; }
|
||||
|
||||
SELECT#userRoleDropDown
|
||||
{ visibility: hidden;
|
||||
margin-top: 1em;
|
||||
margin-left: 2em; }
|
||||
|
||||
SPAN.legend
|
||||
{ margin-left: 1em;
|
||||
font-size: smaller; }
|
||||
|
||||
@@ -316,6 +316,9 @@ SPAN.toolbarButton:active
|
||||
width: auto;
|
||||
white-space: nowrap; }
|
||||
|
||||
.menu LI.disabled
|
||||
{ color: #999; }
|
||||
|
||||
.menu LI IMG
|
||||
{ margin-left: -.8em;
|
||||
padding-right: .2em;
|
||||
@@ -340,6 +343,9 @@ SPAN.toolbarButton:active
|
||||
.menu LI.submenu
|
||||
{ background-image: url('submenu.gif'); }
|
||||
|
||||
.menu LI[class~="disabled"].submenu
|
||||
{ background-image: url('submenu-disabled.gif') !important; }
|
||||
|
||||
.menu LI.submenu:hover, .menu LI.submenu-selected
|
||||
{ background-image: url('submenu-active.gif') !important; }
|
||||
|
||||
@@ -529,6 +535,7 @@ A[class~="_disabled"].button:hover,
|
||||
A[class~="_disabled"].button:active
|
||||
{ cursor: default;
|
||||
padding: 1px .5em;
|
||||
background-color: #d4d0c8;
|
||||
border-top: 2px solid #fff;
|
||||
border-left: 2px solid #fff;
|
||||
border-bottom: 2px solid #888;
|
||||
|
||||
@@ -956,6 +956,20 @@ function getUsersRightsWindowWidth() {
|
||||
return usersRightsWindowWidth;
|
||||
}
|
||||
|
||||
function getTopWindow() {
|
||||
var topWindow = null;
|
||||
var currentWindow = window;
|
||||
while (!topWindow) {
|
||||
if (currentWindow.document.body.hasClassName("popup")
|
||||
&& currentWindow.opener)
|
||||
currentWindow = currentWindow.opener;
|
||||
else
|
||||
topWindow = currentWindow;
|
||||
}
|
||||
|
||||
return topWindow;
|
||||
}
|
||||
|
||||
function onTabClick(event) {
|
||||
var node = event.target;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user