From 177056f222d69c37679f0ffe47b81a14b9311478 Mon Sep 17 00:00:00 2001 From: chris2fr Date: Mon, 26 Oct 2020 10:51:41 +0100 Subject: [PATCH] Better managerment of skills with generic sub-item controller --- components/section_projects.js | 21 ++++++++++++++++++++ index.html | 36 ++++++++++++++++------------------ 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/components/section_projects.js b/components/section_projects.js index 59e0ebf..9c85424 100644 --- a/components/section_projects.js +++ b/components/section_projects.js @@ -92,6 +92,27 @@ var sectionProjectsComponent = { moveDownClicked: function(index) { this.$root.moveArrayPosition(this.$root.sections.work, index, index + 1); + }, + + deleteClickedSubitem: function(mainitem, index) + { + var response = confirm("Are you sure you want to delete this keyword?"); + + if (response == true) + { + mainitem.splice(index, 1); + } + }, + + moveUpClickedSubitem: function(mainitem,index) + { + this.$root.moveArrayPosition(mainitem, index, index - 1); + }, + + + moveDownClickedSubitem: function(mainitem,index) + { + this.$root.moveArrayPosition(mainitem, index, index + 1); } } }; \ No newline at end of file diff --git a/index.html b/index.html index 55a71c0..e657feb 100644 --- a/index.html +++ b/index.html @@ -376,7 +376,7 @@ -
+