mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 23:29:31 +01:00
Implement resize function for htmlarea widget in order to cordinate htmlNode's height to window size
This commit is contained in:
parent
30eefe4d20
commit
84560a0496
@ -24,7 +24,7 @@
|
||||
/**
|
||||
* @augments et2_inputWidget
|
||||
*/
|
||||
var et2_htmlarea = et2_inputWidget.extend(
|
||||
var et2_htmlarea = et2_inputWidget.extend([et2_IResizeable],
|
||||
{
|
||||
modes: ['ascii','simple','extended','advanced'],
|
||||
|
||||
@ -268,6 +268,20 @@ var et2_htmlarea = et2_inputWidget.extend(
|
||||
this.egw().debug("error",e);
|
||||
return null;
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* Resize htmlNode tag according to window size
|
||||
* @param {type} _height excess height which comes from window resize
|
||||
*/
|
||||
resize: function (_height)
|
||||
{
|
||||
if (_height)
|
||||
{
|
||||
// apply the ratio
|
||||
_height = (this.options.resize_ratio != '')? _height * this.options.resize_ratio: _height;
|
||||
if (_height != 0) this.htmlNode.height(this.htmlNode.height() + _height);
|
||||
}
|
||||
}
|
||||
});
|
||||
et2_register_widget(et2_htmlarea, ["htmlarea"]);
|
||||
|
Loading…
Reference in New Issue
Block a user