diff --git a/www/css/main.diary.css b/www/css/main.diary.css index 18d004582..c5d5375e2 100644 --- a/www/css/main.diary.css +++ b/www/css/main.diary.css @@ -494,14 +494,13 @@ enketo-notes-list, .notes-list { } .notes-list { - padding: 0 5px 5px 5px; + padding: 0 15px 5px 15px; text-align: center; } .notes-list-entry { display: grid; grid-template-columns: 10fr 9fr 1fr; - place-items: center; overflow: hidden; font-size: 13px; height: 40px; @@ -509,4 +508,8 @@ enketo-notes-list, .notes-list { .notes-list-entry .icon { font-size: 24px; +} + +.notes-list-label { + text-align: left; } \ No newline at end of file diff --git a/www/js/survey/enketo/enketo-notes-list.js b/www/js/survey/enketo/enketo-notes-list.js index def92467c..ab2dc63ff 100644 --- a/www/js/survey/enketo/enketo-notes-list.js +++ b/www/js/survey/enketo/enketo-notes-list.js @@ -19,7 +19,7 @@ angular.module('emission.survey.enketo.notes-list', }; }) - .controller("NotesListCtrl", function ($scope, $state, $element, $window, EnketoSurveyLaunch) { + .controller("NotesListCtrl", function ($scope, $state, $element, $window, EnketoSurveyLaunch, $ionicPopup) { console.log("Notes List Controller called"); const getScrollElement = function() { @@ -42,6 +42,26 @@ angular.module('emission.survey.enketo.notes-list', return entry.displayTime = begin + " - " + stop; } + $scope.confirmDeleteEntry = (entry) => { + $scope.currEntry = entry; + $ionicPopup.show({title: 'Delete entry', + templateUrl: `templates/survey/enketo/delete-entry.html`, + scope: $scope, + buttons: [{ + text: 'Delete', + type: 'button-cancel', + onTap: function(e) { + return $scope.deleteEntry(entry); + } + },{ + text: 'Cancel', + type: 'button-stable', + }] + }); + + return; + } + $scope.deleteEntry = (entry) => { console.log("Deleting entry", entry); diff --git a/www/templates/diary/place_list_item.html b/www/templates/diary/place_list_item.html index 3a089e8e1..329076902 100644 --- a/www/templates/diary/place_list_item.html +++ b/www/templates/diary/place_list_item.html @@ -4,7 +4,7 @@
Are you sure you wish to delete this entry?
+{{currEntry.data.label}}
{{currEntry.displayTime || setDisplayTime(entry)}}