From d1912a40898ecc05d9b0cd6d02cef79445095344 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Wed, 4 Aug 2010 12:47:07 +0000 Subject: [PATCH] Monotone-Parent: e9ca26d51aa3d10c2258ad11e5ed08cf1cdc234c Monotone-Revision: 903126052b2bc7a486d1885b2118aad411d1b2f2 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-08-04T12:47:07 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ UI/WebServerResources/RowEditionController.js | 13 ++----------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5d3fb4434..925f5bed0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2010-08-04 Wolfgang Sourdeau + + * UI/WebServerResources/RowEditionController.js: + (RowEditionController.startEditing): avoid setting the whole + element class. Make use of addClassName/removeClassName instead, + so that classes added/removed via other evt handlers are not + ignored. + 2010-08-03 Wolfgang Sourdeau * SoObjects/SOGo/SOGoUser.m (-_appendSystemMailAccount): new diff --git a/UI/WebServerResources/RowEditionController.js b/UI/WebServerResources/RowEditionController.js index e6412dcb4..04524141d 100644 --- a/UI/WebServerResources/RowEditionController.js +++ b/UI/WebServerResources/RowEditionController.js @@ -36,13 +36,7 @@ RowEditionController.prototype = { startEditing: function REC_startEditing() { var rowElement = this.rowElement; - rowElement.previousClassName = rowElement.className; - if (rowElement.className.indexOf("_selected") > -1) { - rowElement.className = "editing _selected"; - } - else { - rowElement.className = "editing"; - } + rowElement.addClassName("editing"); var value = ""; for (var i = 0; i < rowElement.childNodes.length; i++) { @@ -51,7 +45,6 @@ RowEditionController.prototype = { value += child.nodeValue; } } - log("initial Value: " + value); this.initialValue = value; this.emptyRow(); @@ -82,8 +75,7 @@ RowEditionController.prototype = { this.textField = null; this.emptyRow(); var rowElement = this.rowElement; - rowElement.className = rowElement.previousClassName; - rowElement.previousClassName = null; + rowElement.removeClassName("editing"); rowElement.appendChild(document.createTextNode(displayValue)); this.initialValue = null; @@ -111,7 +103,6 @@ RowEditionController.prototype = { /* event handlers */ onRowDblClick: function REC_onRowDblClick(event) { - log("onRowDblClick"); if (!this.textField) { this.startEditing(); event.stop();