From e4213b2a700acb14aaff9b21117c14a42932b8df Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 7 Mar 2008 22:10:03 +0000 Subject: [PATCH] Monotone-Parent: b76970a2508695482a2184b33fcd48d53793fd10 Monotone-Revision: 9c6b1538458962e41dfc4b0be00689fde420820f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2008-03-07T22:10:03 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/ContactsUI.js | 2 +- UI/WebServerResources/UIxContactEditor.js | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index e6196b0b5..d9d7a876a 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -455,7 +455,7 @@ function onHeaderClick(event) { } function newContact(sender) { - openContactWindow(URLForFolderID(currentContactFolder) + "/new"); + openContactWindow(URLForFolderID(currentContactFolder) + "/newcontact"); return false; /* stop following the link */ } diff --git a/UI/WebServerResources/UIxContactEditor.js b/UI/WebServerResources/UIxContactEditor.js index 76910d032..97d38c704 100644 --- a/UI/WebServerResources/UIxContactEditor.js +++ b/UI/WebServerResources/UIxContactEditor.js @@ -127,11 +127,18 @@ function onFnNewValue(event) { return true; } +function onEditorCancelClick(event) { + preventDefault(event); + window.close(); +} + function initEditorForm() { displayNameChanged = ($("fn").value.length > 0); $("fn").onkeydown = onFnKeyDown; $("sn").onkeyup = onFnNewValue; $("givenName").onkeyup = onFnNewValue; + + $("cancelButton").observe("click", onEditorCancelClick); } FastInit.addOnLoad(initEditorForm);