summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts
diff options
context:
space:
mode:
authortof <>2007-10-18 09:22:46 +0000
committertof <>2007-10-18 09:22:46 +0000
commit8bebf49fbfb92f039f56cb22b759d8e84ef19799 (patch)
tree6be47ae5ac609d31989eb1dad739e7823fd08ae2 /framework/Web/Javascripts
parent56615eb9b1cef2e707f1163c74aaecc7e94ae549 (diff)
Fixed #722 - Add Read only capabilities to TInPlaceTextBox
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r--framework/Web/Javascripts/source/prado/activecontrols/inlineeditor.js14
1 files changed, 12 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/source/prado/activecontrols/inlineeditor.js b/framework/Web/Javascripts/source/prado/activecontrols/inlineeditor.js
index f8b8b412..8f480d3d 100644
--- a/framework/Web/Javascripts/source/prado/activecontrols/inlineeditor.js
+++ b/framework/Web/Javascripts/source/prado/activecontrols/inlineeditor.js
@@ -6,6 +6,7 @@ Prado.WebUI.TInPlaceTextBox = Base.extend(
this.isSaving = false;
this.isEditing = false;
this.editField = null;
+ this.readOnly = options.ReadOnly;
this.options = Object.extend(
{
@@ -36,7 +37,7 @@ Prado.WebUI.TInPlaceTextBox = Base.extend(
*/
enterEditMode : function(evt)
{
- if (this.isSaving || this.isEditing) return;
+ if (this.isSaving || this.isEditing || this.readOnly) return;
this.isEditing = true;
this.onEnterEditMode();
this.createEditorInput();
@@ -281,5 +282,14 @@ Prado.WebUI.TInPlaceTextBox = Base.extend(
textbox.exitEditMode(null);
}
}
- }
+ },
+
+ setReadOnly : function(id, value)
+ {
+ var textbox = Prado.WebUI.TInPlaceTextBox.textboxes[id];
+ if (textbox)
+ {
+ textbox.readOnly=value;
+ }
+ },
}); \ No newline at end of file