remove isHtml dependency

This commit is contained in:
Yuri Kuznetsov
2014-09-09 11:14:29 +03:00
parent 747aa2d882
commit 2d237eae29
+3 -3
View File
@@ -64,13 +64,13 @@ Espo.define('Views.Fields.Wysiwyg', 'Views.Fields.Text', function (Dep) {
}
if (this.mode == 'edit') {
if (this.model.has('isHtml') && this.model.get('isHtml')) {
if (!this.model.has('isHtml') || this.model.get('isHtml')) {
this.enableWysiwygMode();
}
}
if (this.mode == 'detail') {
if (this.model.has('isHtml') && this.model.get('isHtml')) {
if (!this.model.has('isHtml') || this.model.get('isHtml')) {
this.$el.find('iframe').removeClass('hidden');
var iframe = this.$el.find('iframe').get(0);
var document = iframe.contentWindow.document;
@@ -143,7 +143,7 @@ Espo.define('Views.Fields.Wysiwyg', 'Views.Fields.Text', function (Dep) {
fetch: function () {
var data = {};
if (this.model.has('isHtml') && this.model.get('isHtml')) {
if (!this.model.has('isHtml') || this.model.get('isHtml')) {
data[this.name] = this.$element.code();
} else {
data[this.name] = this.$element.val();