From a7f66e3b7046250473042059a246969c44ad9403 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=92=9F=E8=BF=9B?= Date: Fri, 10 Jul 2020 06:06:38 +0000 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20widgets-form-factory.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../widgets/widgets-form/widgets-form-factory.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/assets/javascripts/builder/editor/widgets/widgets-form/widgets-form-factory.js b/lib/assets/javascripts/builder/editor/widgets/widgets-form/widgets-form-factory.js index 441bf53..6128110 100755 --- a/lib/assets/javascripts/builder/editor/widgets/widgets-form/widgets-form-factory.js +++ b/lib/assets/javascripts/builder/editor/widgets/widgets-form/widgets-form-factory.js @@ -17,6 +17,17 @@ var dataMap = { }); } }, + formula_mini: { + labelTranslationKey: 'editor.widgets.widgets-form.type.formula', + iconTemplate: require('builder/editor/widgets/widget-icon-formula.tpl'), + Class: require('./schema/widgets-form-formula-schema-model'), + checkIfValid: function (querySchemaModel) { + return querySchemaModel.columnsCollection.any(function (m) { + return m.get('type') === 'number'; + }); + } + }, + histogram: { labelTranslationKey: 'editor.widgets.widgets-form.type.histogram', iconTemplate: require('builder/editor/widgets/widget-icon-histogram.tpl'),