From a5d234f4ed883b6a4f182def5b07b223056f7c93 Mon Sep 17 00:00:00 2001 From: chris2fr Date: Fri, 16 Oct 2020 16:17:46 +0200 Subject: [PATCH] OK for Delete and Reorder Profiles --- components/section_basics.js | 23 +++++++++++++++++++++++ index.html | 3 ++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/components/section_basics.js b/components/section_basics.js index 41240c8..1d0b15d 100644 --- a/components/section_basics.js +++ b/components/section_basics.js @@ -55,6 +55,29 @@ var sectionBasicsComponent = { { var item = models.newDefaultBasic(); this.$root.sections.basics.profiles.push(item); + }, + + deleteClicked: function(index) + { + var response = confirm("Are you sure you want to delete this interest?"); + + if (response == true) + { + this.$root.sections.basics.profiles.splice(index, 1); + } + }, + + + moveUpClicked: function(index) + { + this.$root.moveArrayPosition(this.$root.sections.basics.profiles, index, index - 1); + }, + + + moveDownClicked: function(index) + { + this.$root.moveArrayPosition(this.$root.sections.basics.profiles, index, index + 1); } + } }; \ No newline at end of file diff --git a/index.html b/index.html index c566449..f32b49a 100644 --- a/index.html +++ b/index.html @@ -237,7 +237,8 @@ Any social networks that you participate in. -
+ +