wysywyg field

This commit is contained in:
yuri
2015-09-24 17:30:39 +03:00
parent 13a2aa7f03
commit 4d32955e28
5 changed files with 40 additions and 7 deletions
@@ -93,7 +93,8 @@
"attachmentMultiple": "Attachment Multiple",
"rangeInt": "Range Integer",
"rangeFloat": "Range Float",
"rangeCurrency": "Range Currency"
"rangeCurrency": "Range Currency",
"wysiwyg": "Wysiwyg"
},
"fields": {
"type": "Type",
@@ -117,7 +118,8 @@
"entityList": "Entity List",
"isSorted": "Is Sorted (alphabetically)",
"audited": "Audited",
"trim": "Trim"
"trim": "Trim",
"height": "Height (px)"
},
"messages": {
"upgradeVersion": "Your EspoCRM will be upgraded to version <strong>{version}</strong>. This can take some time.",
@@ -111,9 +111,9 @@
"seeMoreDisabled": true
},
"body": {
"type": "text",
"view": "Fields.Wysiwyg",
"seeMoreDisabled": true
"type": "wysiwyg",
"seeMoreDisabled": true,
"height": 150
},
"isHtml": {
"type": "bool",
@@ -0,0 +1,29 @@
{
"params":[
{
"name": "required",
"type": "bool",
"default": false
},
{
"name": "default",
"type": "text"
},
{
"name": "maxLength",
"type": "int"
},
{
"name": "seeMoreDisabled",
"type": "bool"
},
{
"name": "height",
"type": "int"
}
],
"filter": true,
"fieldDefs":{
"type":"text"
}
}
+1
View File
@@ -47,6 +47,7 @@ Espo.define('Views.Fields.Text', 'Views.Fields.Base', function (Dep) {
},
setup: function () {
Dep.prototype.setup.call(this);
this.params.rows = this.params.rows || this.rowsDefault;
},
+3 -2
View File
@@ -23,18 +23,19 @@ Espo.define('views/fields/wysiwyg', ['views/fields/text', 'lib!Summernote'], fun
return Dep.extend({
type: 'wysiwyg',
detailTemplate: 'fields.wysiwyg.detail',
editTemplate: 'fields.wysiwyg.edit',
height: 150,
height: 250,
rowsDefault: 10,
setup: function () {
Dep.prototype.setup.call(this);
this.height = this.params.height || this.height;
this.toolbar = this.params.toolbar || [
['style', ['style']],