From d234b288128b9745a480ff5e2a47940a42c3c590 Mon Sep 17 00:00:00 2001 From: guerler Date: Wed, 11 Oct 2023 21:53:23 +0300 Subject: [PATCH 01/17] Remove legacy parameter matching condition from form elements --- client/src/components/Form/FormElement.vue | 8 -------- 1 file changed, 8 deletions(-) diff --git a/client/src/components/Form/FormElement.vue b/client/src/components/Form/FormElement.vue index 7a5841e7338b..208664bdb616 100644 --- a/client/src/components/Form/FormElement.vue +++ b/client/src/components/Form/FormElement.vue @@ -18,7 +18,6 @@ import FormHidden from "./Elements/FormHidden.vue"; import FormInput from "./Elements/FormInput.vue"; import FormNumber from "./Elements/FormNumber.vue"; import FormOptionalText from "./Elements/FormOptionalText.vue"; -import FormParameter from "./Elements/FormParameter.vue"; import FormRulesEdit from "./Elements/FormRulesEdit.vue"; import FormSelection from "./Elements/FormSelection.vue"; import FormTags from "./Elements/FormTags.vue"; @@ -300,13 +299,6 @@ const isOptional = computed(() => !isRequired.value && attrs.value["optional"] ! - Date: Wed, 11 Oct 2023 22:11:44 +0300 Subject: [PATCH 02/17] Remove legacy parameters factory --- .../components/Form/Elements/parameters.js | 52 ------------------- 1 file changed, 52 deletions(-) delete mode 100644 client/src/components/Form/Elements/parameters.js diff --git a/client/src/components/Form/Elements/parameters.js b/client/src/components/Form/Elements/parameters.js deleted file mode 100644 index 01729e887c0a..000000000000 --- a/client/src/components/Form/Elements/parameters.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - This class creates input elements. New input parameter types should be added to the types dictionary. -*/ -import Backbone from "backbone"; -import SelectFtp from "mvc/ui/ui-select-ftp"; -import SelectLibrary from "mvc/ui/ui-select-library"; - -// create form view -export default Backbone.View.extend({ - /** Available parameter types */ - types: { - library_data: "_fieldLibrary", - ftpfile: "_fieldFtp", - }, - - remove: function () { - this.field.remove(); - Backbone.View.prototype.remove.call(this); - }, - - /** Returns an input field for a given field type */ - create: function (input_def) { - var fieldClass = this.types[input_def.type]; - this.field = typeof this[fieldClass] === "function" ? this[fieldClass].call(this, input_def) : null; - if (input_def.value === undefined) { - input_def.value = null; - } - this.field.value(input_def.value); - this.setElement(input_def.el || "
"); - this.$el.append(this.field.$el); - }, - - /** Library dataset field */ - _fieldLibrary: function (input_def) { - return new SelectLibrary.View({ - id: input_def.id, - optional: input_def.optional, - multiple: input_def.multiple, - onchange: input_def.onchange, - }); - }, - - /** FTP file field */ - _fieldFtp: function (input_def) { - return new SelectFtp.View({ - id: input_def.id, - optional: input_def.optional, - multiple: input_def.multiple, - onchange: input_def.onchange, - }); - }, -}); From bf18eb096ad406fc57c18ec01d25cf7ae4adf336 Mon Sep 17 00:00:00 2001 From: guerler Date: Wed, 11 Oct 2023 22:12:50 +0300 Subject: [PATCH 03/17] Remove legacy ftpfile and library_data wrappers --- client/src/mvc/ui/ui-list.js | 148 ------------------------- client/src/mvc/ui/ui-select-ftp.js | 52 --------- client/src/mvc/ui/ui-select-library.js | 126 --------------------- 3 files changed, 326 deletions(-) delete mode 100644 client/src/mvc/ui/ui-list.js delete mode 100644 client/src/mvc/ui/ui-select-ftp.js delete mode 100644 client/src/mvc/ui/ui-select-library.js diff --git a/client/src/mvc/ui/ui-list.js b/client/src/mvc/ui/ui-list.js deleted file mode 100644 index e3a84db86775..000000000000 --- a/client/src/mvc/ui/ui-list.js +++ /dev/null @@ -1,148 +0,0 @@ -import Backbone from "backbone"; -import $ from "jquery"; -import Ui from "mvc/ui/ui-misc"; -import Utils from "utils/utils"; - -var View = Backbone.View.extend({ - initialize: function (options) { - this.options = options; - this.name = options.name || "element"; - this.multiple = options.multiple || false; - - // create message handler - this.message = new Ui.Message({ cls: "col mb-0" }); - - // create selections area - this.selections = $("
"); - - // create select field containing the options which can be inserted into the list - this.select = new Ui.Select.View({ optional: options.optional }); - - // create insert new list element button - this.$button = $(`