hidden widget to transport content from server to client and back, thought server to client could easier be done by accessing content via content array manager

This commit is contained in:
Ralf Becker 2014-12-05 08:59:51 +00:00
parent eefb5963bf
commit 9b5c68f743
2 changed files with 12 additions and 6 deletions

View File

@ -190,4 +190,4 @@ class etemplate_widget_textbox extends etemplate_widget
}
}
}
etemplate_widget::registerWidget('etemplate_widget_textbox', array('textbox','text','int','integer','float','passwd','hidden','colorpicker'));
etemplate_widget::registerWidget('etemplate_widget_textbox', array('textbox','text','int','integer','float','passwd','hidden','colorpicker','hidden'));

View File

@ -110,8 +110,14 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
else
{
this.input = $j(document.createElement("input"));
if(this.options.type == "passwd") {
this.input.attr("type", "password");
switch(this.options.type)
{
case "passwd":
this.input.attr("type", "password");
break;
case "hidden":
this.input.attr("type", "hidden");
break;
}
if (this.options.autocomplete) this.input.attr("autocomplete", this.options.autocomplete);
}
@ -226,7 +232,7 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
}
this.options.blur = _value;
},
resize: function (_height)
{
if (typeof this.options.resize_ratio != 'undefined'
@ -234,12 +240,12 @@ var et2_textbox = et2_inputWidget.extend([et2_IResizeable],
{
// apply the ratio
_height *= this.options.resize_ratio;
this.input.height(this.input.height() + _height);
}
}
});
et2_register_widget(et2_textbox, ["textbox", "passwd"]);
et2_register_widget(et2_textbox, ["textbox", "passwd", "hidden"]);
/**
* et2_textbox_ro is the dummy readonly implementation of the textbox.