From e33de4787b97d5efcc23a8a4d1524aa973d28b1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn?= Date: Fri, 12 Feb 2016 17:04:07 +0100 Subject: [PATCH] Feature #4317: Refactor user-inputs edition table --- .../form-panels/create/wizard-tabs/context.js | 141 ++---------------- .../create/wizard-tabs/context/html.hbs | 36 +---- src/sunstone/public/app/utils/user-inputs.js | 103 +++++++++++++ .../public/app/utils/user-inputs/row.hbs | 52 +++++++ .../public/app/utils/user-inputs/table.hbs | 22 +++ 5 files changed, 195 insertions(+), 159 deletions(-) create mode 100644 src/sunstone/public/app/utils/user-inputs/row.hbs create mode 100644 src/sunstone/public/app/utils/user-inputs/table.hbs diff --git a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js index 77f50662bf..2f8a7d8c47 100644 --- a/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js +++ b/src/sunstone/public/app/tabs/templates-tab/form-panels/create/wizard-tabs/context.js @@ -79,6 +79,7 @@ define(function(require) { function _html() { return TemplateHTML({ + 'userInputsHTML': UserInputs.html(), 'customTagsTableHTML': CustomTagsTable.html(), 'contextFilesTableHTML': this.contextFilesTable.dataTableHTML }); @@ -146,6 +147,7 @@ define(function(require) { opt.attr('selected', 'selected'); }); + UserInputs.setup(context); CustomTagsTable.setup(context); var selectOptions = { @@ -161,82 +163,6 @@ define(function(require) { that.contextFilesTable.initialize(selectOptions); that.contextFilesTable.refreshResourceTableSelect(); - - // TODO: bug, user_input_name pattern is ignored - - context.on("click", ".add_service_custom_attr", function() { - $(".service_custom_attrs tbody", context).append( - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '' + - '