See Changelog.

Monotone-Parent: c3ae9437f2d6f5684527ea0486ab6204b9ce62b2
Monotone-Revision: e3951f85165fbcdda1e4339ca3625cd4f4fbcf9f

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2011-03-11T20:06:38
Monotone-Branch: ca.inverse.sogo
maint-2.0.2
Francis Lachapelle 2011-03-11 20:06:38 +00:00
parent 7b1c213051
commit 3dcb595c5a
6 changed files with 27 additions and 20 deletions

View File

@ -1,5 +1,15 @@
2011-03-11 Francis Lachapelle <flachapelle@inverse.ca> 2011-03-11 Francis Lachapelle <flachapelle@inverse.ca>
* UI/WebServerResources/HTMLElement.js (onContextMenu): hide the
menu on a mousedown, not a click. This fixes a problem on Webkit browsers.
* UI/WebServerResources/generic.js: cleanup some event observers
related to contextual menus.
* UI/WebServerResources/UIxMailEditor.js (initMailEditor): added
the SpellChecker button in the HTML editor toolbar, and disabled
the "check while typing" option (scayt).
* UI/WebServerResources/ContactsUI.js (initContacts): don't define * UI/WebServerResources/ContactsUI.js (initContacts): don't define
the categories contextual menu if the contacts list doesn't the categories contextual menu if the contacts list doesn't
exist. This fixes a problem when adding categories to a contact exist. This fixes a problem when adding categories to a contact

1
NEWS
View File

@ -5,6 +5,7 @@ New Features
Enhancements Enhancements
- updated Ukranian translation - updated Ukranian translation
- updated Spanish translation - updated Spanish translation
- "check while typing" is no longer enabled by default in HTML editor
Bug Fixes Bug Fixes
- sogo-tool now works in multi-domain environments - sogo-tool now works in multi-domain environments
- various other mutli-domain fixes - various other mutli-domain fixes

View File

@ -139,7 +139,6 @@ Element.addMethods({
onContextMenu: function(element, event) { onContextMenu: function(element, event) {
element = $(element); element = $(element);
Event.stop(event);
if (document.currentPopupMenu) if (document.currentPopupMenu)
hideMenu(document.currentPopupMenu); hideMenu(document.currentPopupMenu);
@ -160,13 +159,14 @@ Element.addMethods({
if (popup.prepareVisibility) if (popup.prepareVisibility)
isVisible = popup.prepareVisibility(); isVisible = popup.prepareVisibility();
Event.stop(event);
if (isVisible) { if (isVisible) {
popup.setStyle( { top: menuTop + "px", popup.setStyle( { top: menuTop + "px",
left: menuLeft + "px", left: menuLeft + "px",
visibility: "visible" } ); visibility: "visible" } );
document.currentPopupMenu = popup; document.currentPopupMenu = popup;
document.body.observe("click", onBodyClickMenuHandler); $(document.body).on("mousedown", onBodyClickMenuHandler);
} }
else else
log ("Warning: not showing the contextual menu " + element.id); log ("Warning: not showing the contextual menu " + element.id);
@ -175,8 +175,7 @@ Element.addMethods({
attachMenu: function(element, menuName) { attachMenu: function(element, menuName) {
element = $(element); element = $(element);
element.sogoContextMenu = $(menuName); element.sogoContextMenu = $(menuName);
element.observe("contextmenu", element.on("contextmenu", element.onContextMenu);
element.onContextMenu.bindAsEventListener(element));
}, },
selectElement: function(element) { selectElement: function(element) {

View File

@ -240,7 +240,7 @@ function createAttachment(node, list) {
var attachment = createElement("li", null, null, { node: node }, null, list); var attachment = createElement("li", null, null, { node: node }, null, list);
createElement("img", null, null, { src: ResourcesURL + "/attachment.gif" }, createElement("img", null, null, { src: ResourcesURL + "/attachment.gif" },
null, attachment); null, attachment);
attachment.observe("click", onRowClick); attachment.on("click", onRowClick);
var filename = node.value; var filename = node.value;
var separator; var separator;
@ -362,16 +362,15 @@ function initMailEditor() {
var list = $("attachments"); var list = $("attachments");
if (!list) return; if (!list) return;
$(list).attachMenu("attachmentsMenu"); list.attachMenu("attachmentsMenu");
var elements = $(list).childNodesWithTag("li"); var elements = $(list).childNodesWithTag("li");
for (var i = 0; i < elements.length; i++) for (var i = 0; i < elements.length; i++)
elements[i].observe("click", onRowClick); elements[i].on("click", onRowClick);
var listContent = $("attachments").childNodesWithTag("li"); if (elements.length > 0)
if (listContent.length > 0)
$("attachmentsArea").setStyle({ display: "block" }); $("attachmentsArea").setStyle({ display: "block" });
var textarea = $("text"); var textarea = $("text");
var textContent = textarea.getValue(); var textContent = textarea.getValue();
if (hasSignature()) { if (hasSignature()) {
@ -409,7 +408,7 @@ function initMailEditor() {
'BulletedList', '-', 'Link', 'Unlink', 'Image', 'BulletedList', '-', 'Link', 'Unlink', 'Image',
'JustifyLeft','JustifyCenter','JustifyRight', 'JustifyLeft','JustifyCenter','JustifyRight',
'JustifyBlock','Font','FontSize','-','TextColor', 'JustifyBlock','Font','FontSize','-','TextColor',
'BGColor'] 'BGColor','-','SpellChecker']
], ],
language : localeCode, language : localeCode,
scayt_sLang : localeCode scayt_sLang : localeCode

View File

@ -8,5 +8,5 @@ CKEDITOR.editorConfig = function( config )
config.uiColor = '#D4D0C8'; config.uiColor = '#D4D0C8';
config.skin = 'kama'; config.skin = 'kama';
config.removePlugins = "elementspath,maximize,resize"; config.removePlugins = "elementspath,maximize,resize";
config.scayt_autoStartup = true; config.scayt_autoStartup = false;
}; };

View File

@ -688,9 +688,8 @@ function getParentMenu(node) {
} }
function onBodyClickMenuHandler(event) { function onBodyClickMenuHandler(event) {
this.stopObserving(event.type);
hideMenu(document.currentPopupMenu); hideMenu(document.currentPopupMenu);
document.body.stopObserving("click", onBodyClickMenuHandler);
document.body.stopObserving("mouseup", onBodyClickMenuHandler);
document.currentPopupMenu = null; document.currentPopupMenu = null;
if (event) if (event)
@ -1355,7 +1354,7 @@ function initMenu(menuDIV, callbacks) {
var lis = $(uls[i]).childNodesWithTag("li"); var lis = $(uls[i]).childNodesWithTag("li");
for (var j = 0; j < lis.length; j++) { for (var j = 0; j < lis.length; j++) {
var node = $(lis[j]); var node = $(lis[j]);
node.observe("mousedown", listRowMouseDownHandler, false); node.on("mousedown", listRowMouseDownHandler);
var callback; var callback;
if (i > 0) if (i > 0)
callback = callbacks[i+j+1]; callback = callbacks[i+j+1];
@ -1368,13 +1367,12 @@ function initMenu(menuDIV, callbacks) {
else { else {
node.submenu = callback; node.submenu = callback;
node.addClassName("submenu"); node.addClassName("submenu");
node.observe("mouseover", popupSubmenu); node.on("mouseover", popupSubmenu);
} }
} }
else { else {
node.observe("mouseup", onBodyClickMenuHandler);
node.menuCallback = callback; node.menuCallback = callback;
node.observe("click", onMenuClickHandler); node.on("mousedown", onMenuClickHandler);
} }
} }
else else