From 2f9041071d6e6b60d3db0371040a030d10039f2f Mon Sep 17 00:00:00 2001 From: wolfgang Date: Thu, 6 Dec 2007 23:56:24 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1294 d1b88da0-ebda-0310-925b-ed51d893ca5b --- UI/Contacts/product.plist | 5 +++++ UI/WebServerResources/UIxMailEditor.js | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/UI/Contacts/product.plist b/UI/Contacts/product.plist index 88da1673..7cb5f6fc 100644 --- a/UI/Contacts/product.plist +++ b/UI/Contacts/product.plist @@ -157,6 +157,11 @@ protectedBy = ""; pageName = "UIxContactEditor"; }; + write = { + protectedBy = ""; + pageName = "UIxContactEditor"; + actionName = "write"; + }; }; }; }; diff --git a/UI/WebServerResources/UIxMailEditor.js b/UI/WebServerResources/UIxMailEditor.js index ed579636..0925b03e 100644 --- a/UI/WebServerResources/UIxMailEditor.js +++ b/UI/WebServerResources/UIxMailEditor.js @@ -214,6 +214,7 @@ function onAttachmentChange(event) { this.removeClassName("currentAttachment"); var list = $("attachments"); createAttachment(this, list); + clickedEditorAttach(null) } } @@ -249,6 +250,12 @@ function clickedEditorSave(sender) { } function onTextFocus() { + var input = currentAttachmentInput(); + if (input) + input.parentNode.removeChild(input); +} + +function onTextFirstFocus() { var content = this.getValue(); if (content.lastIndexOf("--") == 0) { this.insertBefore(document.createTextNode("\r\n"), @@ -258,7 +265,7 @@ function onTextFocus() { var length = this.getValue().length - signatureLength - 1; this.setCaretTo(length); } - Event.stopObserving(this, "focus", onTextFocus); + Event.stopObserving(this, "focus", onTextFirstFocus); } function initMailEditor() { @@ -283,6 +290,7 @@ function initMailEditor() { if (sigLimit > -1) signatureLength = (textContent.length - sigLimit); textarea.scrollTop = textarea.scrollHeight; + textarea.observe("focus", onTextFirstFocus); textarea.observe("focus", onTextFocus); onWindowResize(null); -- 2.39.5