From ec988d412187877c086e01ea007c1ce07d7b1860 Mon Sep 17 00:00:00 2001 From: Aaron Bohy Date: Tue, 11 Apr 2017 16:23:18 +0200 Subject: [FIX] web(_editor): field widget html The field widget html wasn't implemented yet in the new views. A very basic implementation was done in addon web. It only handled the readonly mode so that the field were displayed in studio. This commit removes this basic implementation from web, and re- introduced the old one, converted, in addon web_editor. --- addons/web/static/src/js/fields/basic_fields.js | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'addons/web/static/src/js/fields/basic_fields.js') diff --git a/addons/web/static/src/js/fields/basic_fields.js b/addons/web/static/src/js/fields/basic_fields.js index 15b8b3930df..af5d9bcf233 100644 --- a/addons/web/static/src/js/fields/basic_fields.js +++ b/addons/web/static/src/js/fields/basic_fields.js @@ -702,23 +702,6 @@ var FieldText = DebouncedField.extend({ }, }); -var FieldHtml = InputField.extend({ - supportedFieldTypes: ['html'], - text_to_html: function (text) { - var value = text || ""; - if (value.match(/^\s*$/)) { - value = '


'; - } else { - value = "

"+value.split(//).join("

")+"

"; - value = value.replace(/

<\/p>/g, '').replace('

', '

').replace('

', '

'); - } - return value; - }, - _render: function () { - this.$el.html(this.text_to_html(this.value)); - }, -}); - /** * Displays a handle to modify the sequence. */ @@ -2068,7 +2051,6 @@ return { FieldDomain: FieldDomain, FieldFloat: FieldFloat, FieldFloatTime: FieldFloatTime, - FieldHtml: FieldHtml, FieldInteger: FieldInteger, FieldMonetary: FieldMonetary, FieldPercentPie: FieldPercentPie, -- cgit v1.2.3