diff --git a/CHANGELOG b/CHANGELOG index 982f50190..077a0db34 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -48,6 +48,8 @@ Core: - Added success/error symbol to config to show if saving was successful. - Added UTF-8 byte order mark for every CSV export. - Moved full-text search to client-side (removed the server-side search engine Whoosh). +- Better dialog handling. Show dialog just in forground without changing the state url. + Added new dialog for profile, change password, tag and category update view. Motions: - Added adjustable line numbering mode (outside, inside, none) for each diff --git a/openslides/agenda/static/js/agenda/site.js b/openslides/agenda/static/js/agenda/site.js index f622bf870..b99ddf073 100644 --- a/openslides/agenda/static/js/agenda/site.js +++ b/openslides/agenda/static/js/agenda/site.js @@ -81,6 +81,7 @@ angular.module('OpenSlidesApp.agenda.site', [ '$filter', '$http', '$state', + '$injector', 'DS', 'operator', 'ngDialog', @@ -96,9 +97,9 @@ angular.module('OpenSlidesApp.agenda.site', [ 'osTableFilter', 'AgendaCsvExport', 'PdfCreate', - function($scope, $filter, $http, $state, DS, operator, ngDialog, Agenda, TopicForm, AgendaTree, Projector, - ProjectionDefault, AgendaContentProvider, PdfMakeDocumentProvider, gettextCatalog, gettext, osTableFilter, - AgendaCsvExport, PdfCreate) { + function($scope, $filter, $http, $state, $injector, DS, operator, ngDialog, Agenda, TopicForm, + AgendaTree, Projector, ProjectionDefault, AgendaContentProvider, PdfMakeDocumentProvider, + gettextCatalog, gettext, osTableFilter, AgendaCsvExport, PdfCreate) { // Bind agenda tree to the scope $scope.$watch(function () { return Agenda.lastModified(); @@ -268,13 +269,22 @@ angular.module('OpenSlidesApp.agenda.site', [ return false; } }; - $scope.getUpdateStatePrefix = function (item) { + $scope.getDetailStatePrefix = function (item) { var prefix = item.content_object.collection.replace('/','.'); // Hotfix for Issue 2566. // The changes could be reverted if Issue 2480 is closed. prefix = prefix.replace('motion-block', 'motionBlock'); return prefix; }; + $scope.edit = function (item) { + var formName = item.content_object.collection.split('/')[1]; + // Hotfix for Issue 2566. + // The changes could be reverted if Issue 2480 is closed. + formName = formName.replace('motion-block', 'motionBlock'); + formName = formName.charAt(0).toUpperCase() + formName.slice(1) + 'Form'; + var form = $injector.get(formName); + ngDialog.open(form.getDialog({id: item.content_object.id})); + }; // export $scope.pdfExport = function () { var filename = gettextCatalog.getString('Agenda') + '.pdf'; diff --git a/openslides/agenda/static/templates/agenda/item-list.html b/openslides/agenda/static/templates/agenda/item-list.html index 17ede633d..0ca7023d3 100644 --- a/openslides/agenda/static/templates/agenda/item-list.html +++ b/openslides/agenda/static/templates/agenda/item-list.html @@ -271,7 +271,7 @@