diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index 004919c6f..f647c3c80 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -126,6 +126,12 @@ angular.module('OpenSlidesApp.agenda.site', ['OpenSlidesApp.agenda']) $state.go(item.content_object.collection.replace('/','.')+'.detail', {id: item.content_object.id}); }; + // cancel QuickEdit mode + $scope.cancelQuickEdit = function (item) { + // revert all changes by restore (refresh) original item object from server + Agenda.refresh(item); + item.quickEdit = false; + }; // save changed item $scope.save = function (item) { Agenda.save(item).then( diff --git a/openslides/agenda/static/templates/agenda/item-list.html b/openslides/agenda/static/templates/agenda/item-list.html index 1a8735249..4ced3496b 100644 --- a/openslides/agenda/static/templates/agenda/item-list.html +++ b/openslides/agenda/static/templates/agenda/item-list.html @@ -168,42 +168,40 @@ -

{{ item.getTitle() }} – QuickEdit

- - {{ alert.msg }} - -
-
- - -
-
- - -
+ + {{ alert.msg }} + +
+
+ +
-
-
- - - Show as agenda item -
-
- - -
+
+ +
-
-   - - Edit ... +
+
+
+ + + Show as agenda item
- +
+ + +
+
+
+   + + Edit ... +
diff --git a/openslides/assignments/static/js/assignments/site.js b/openslides/assignments/static/js/assignments/site.js index 4f2c9bdda..d7e31e766 100644 --- a/openslides/assignments/static/js/assignments/site.js +++ b/openslides/assignments/static/js/assignments/site.js @@ -203,6 +203,12 @@ angular.module('OpenSlidesApp.assignments.site', ['OpenSlidesApp.assignments']) $scope.openDialog = function (assignment) { ngDialog.open(AssignmentForm.getDialog(assignment)); }; + // cancel QuickEdit mode + $scope.cancelQuickEdit = function (assignment) { + // revert all changes by restore (refresh) original assignment object from server + Assignment.refresh(assignment); + assignment.quickEdit = false; + }; // save changed assignment $scope.save = function (assignment) { Assignment.save(assignment).then( diff --git a/openslides/assignments/static/templates/assignments/assignment-list.html b/openslides/assignments/static/templates/assignments/assignment-list.html index 5da6398cf..6d266de11 100644 --- a/openslides/assignments/static/templates/assignments/assignment-list.html +++ b/openslides/assignments/static/templates/assignments/assignment-list.html @@ -162,7 +162,7 @@ - +

{{ assignment.title }} – Quick Edit

{{ alert.msg }} @@ -187,7 +187,7 @@
-  
-