From a2c484c46ccfcad863b33c3fdd4a824c8ebd8ebc Mon Sep 17 00:00:00 2001 From: "allan%beaufour.dk" Date: Thu, 9 Feb 2006 11:50:36 +0000 Subject: [PATCH] [XForms] Datepicker input field was not readonly. Bug 323829, patch by doronr r=aaronr+smaug. git-svn-id: svn://10.0.0.236/trunk@189475 18797224-902f-48f8-a5cc-f745e15eee43 --- .../xforms/resources/content/xforms.xml | 51 ++++++++++++++----- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/mozilla/extensions/xforms/resources/content/xforms.xml b/mozilla/extensions/xforms/resources/content/xforms.xml index 67c01605853..6ddaceff7cf 100644 --- a/mozilla/extensions/xforms/resources/content/xforms.xml +++ b/mozilla/extensions/xforms/resources/content/xforms.xml @@ -149,7 +149,7 @@ - + @@ -161,7 +161,7 @@ - + @@ -416,6 +416,14 @@ + this.inputField.value = this.stringValue; + if (this.accessors.isReadonly()) { + this.inputField.setAttribute("readonly", "readonly"); + this.dropmarker.setAttribute("disabled", "true"); + } else { + this.inputField.removeAttribute("readonly"); + this.dropmarker.removeAttribute("disabled"); + } return true; @@ -431,6 +439,17 @@ + null + + + if (!this._dropmarker) { + this._dropmarker = + document.getAnonymousElementByAttribute(this, "anonid", "dropmarker"); + } + return this._dropmarker; + + + null @@ -465,13 +484,13 @@ @@ -791,7 +814,7 @@ if (currentElement.localName == "input") { // if we are on the button, down should focus the current selected // cell - this.selectCell(this._currentCellIndex); + this.selectCell(index); } else if ((index + 7) < this._cells.length) { this.selectCell(index + 7); }