See ChangeLog

Monotone-Parent: e9ca26d51aa3d10c2258ad11e5ed08cf1cdc234c
Monotone-Revision: 7e80d62d21237dc99d74c702f53f591b1fd10acc

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2010-08-04T17:59:43
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2010-08-04 17:59:43 +00:00
parent 2f69dee9d6
commit 662f6d509a
4 changed files with 151 additions and 27 deletions
+17
View File
@@ -1684,6 +1684,18 @@ function createDialog(id, title, legend, content, positionClass) {
var newDialog = createElement("div", id, ["dialog", positionClass]);
newDialog.setStyle({"display": "none"});
if (positionClass == "none") {
var bgDiv = $("bgDialogDiv");
if (bgDiv) {
bgDiv.show();
}
else {
bgDiv = createElement("div", "bgDialogDiv", ["bgDialog"]);
document.body.appendChild(bgDiv);
bgDiv.observe("click", onBodyClickDialogHandler.bind(document.body, id));
}
}
var subdiv = createElement("div", null, null, null, null, newDialog);
if (title && title.length > 0) {
var titleh3 = createElement("h3", null, null, null, null, subdiv);
@@ -1711,6 +1723,11 @@ function createButton(id, caption, action) {
return newButton;
}
function onBodyClickDialogHandler(dialogId) {
$(dialogId).hide();
$("bgDialogDiv").hide();
}
function readCookie(name) {
var foundCookie = null;