fixed not working readonly display of integer or float widgets, caused by attribute validation allowing string only

This commit is contained in:
Ralf Becker 2013-11-02 14:49:26 +00:00
parent 511a925bb4
commit 52a3a5e2ae

View File

@ -18,9 +18,9 @@
/** /**
* Class which implements the "int" and textbox type=float XET-Tags * Class which implements the "int" and textbox type=float XET-Tags
* *
* @augments et2_textbox * @augments et2_textbox
*/ */
var et2_number = et2_textbox.extend( var et2_number = et2_textbox.extend(
{ {
attributes: { attributes: {
@ -49,13 +49,13 @@ var et2_number = et2_textbox.extend(
"type": "integer", "type": "integer",
"default": et2_no_init, "default": et2_no_init,
"description": "Allowed precision - # of decimal places", "description": "Allowed precision - # of decimal places",
"ignore": true "ignore": true
} }
}, },
/** /**
* Constructor * Constructor
* *
* @memberOf et2_number * @memberOf et2_number
*/ */
init: function() { init: function() {
@ -98,9 +98,10 @@ et2_register_widget(et2_number, ["int", "integer", "float"]);
var et2_number_ro = et2_textbox_ro.extend( var et2_number_ro = et2_textbox_ro.extend(
{ {
attributes: { attributes: {
"min": {"ignore": true}, min: { ignore: true},
"max": {"ignore": true}, max: { ignore: true},
"precision": {"ignore": true} precision: { ignore: true},
value: { type: "float" }
} }
}); });
et2_register_widget(et2_number_ro, ["int_ro", "integer_ro", "float_ro"]); et2_register_widget(et2_number_ro, ["int_ro", "integer_ro", "float_ro"]);