mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-21 18:31:37 +02:00
Make editableWidget to set height when in edit mode
This commit is contained in:
parent
5f65cecda5
commit
b4d5584fe7
@ -41,6 +41,11 @@ var et2_editableWidget = (function(){ "use strict"; return et2_inputWidget.exten
|
|||||||
type: "string",
|
type: "string",
|
||||||
default: et2_no_init,
|
default: et2_no_init,
|
||||||
description: "Additional parameters passed to save_callback"
|
description: "Additional parameters passed to save_callback"
|
||||||
|
},
|
||||||
|
editable_height: {
|
||||||
|
name: "Editable height",
|
||||||
|
description: "Set height for widget while in edit mode",
|
||||||
|
type: "string"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -22,18 +22,18 @@
|
|||||||
var et2_htmlarea = (function(){ "use strict"; return et2_editableWidget.extend([et2_IResizeable],
|
var et2_htmlarea = (function(){ "use strict"; return et2_editableWidget.extend([et2_IResizeable],
|
||||||
{
|
{
|
||||||
attributes: {
|
attributes: {
|
||||||
'mode': {
|
mode: {
|
||||||
'name': 'Mode',
|
'name': 'Mode',
|
||||||
'description': 'One of {ascii|simple|extended|advanced}',
|
'description': 'One of {ascii|simple|extended|advanced}',
|
||||||
'default': '',
|
'default': '',
|
||||||
'type': 'string'
|
'type': 'string'
|
||||||
},
|
},
|
||||||
'height': {
|
height: {
|
||||||
'name': 'Height',
|
'name': 'Height',
|
||||||
'default': et2_no_init,
|
'default': et2_no_init,
|
||||||
'type': 'string'
|
'type': 'string'
|
||||||
},
|
},
|
||||||
'width': {
|
width: {
|
||||||
'name': 'Width',
|
'name': 'Width',
|
||||||
'default': et2_no_init,
|
'default': et2_no_init,
|
||||||
'type': 'string'
|
'type': 'string'
|
||||||
@ -214,7 +214,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_editableWidget.extend([
|
|||||||
this.options.readonly = _value;
|
this.options.readonly = _value;
|
||||||
if(this.options.readonly)
|
if(this.options.readonly)
|
||||||
{
|
{
|
||||||
this.editor.remove();
|
if (this. editor) this.editor.remove();
|
||||||
this.htmlNode = jQuery(document.createElement(this.options.readonly ? "div" : "textarea"))
|
this.htmlNode = jQuery(document.createElement(this.options.readonly ? "div" : "textarea"))
|
||||||
.css('height', this.options.height)
|
.css('height', this.options.height)
|
||||||
.addClass('et2_textbox_ro');
|
.addClass('et2_textbox_ro');
|
||||||
@ -227,7 +227,7 @@ var et2_htmlarea = (function(){ "use strict"; return et2_editableWidget.extend([
|
|||||||
if(!this.editor)
|
if(!this.editor)
|
||||||
{
|
{
|
||||||
this.htmlNode = jQuery(document.createElement("textarea"))
|
this.htmlNode = jQuery(document.createElement("textarea"))
|
||||||
.css('height', this.options.height)
|
.css('height', (this.options.editable_height ? this.options.editable_height : this.options.height))
|
||||||
.val(value);
|
.val(value);
|
||||||
this.setDOMNode(this.htmlNode[0]);
|
this.setDOMNode(this.htmlNode[0]);
|
||||||
this.init_editor();
|
this.init_editor();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user