From aa0791fc343c242fdd301d31c7d669bad0170f1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Tue, 14 Feb 2017 19:33:56 +0100 Subject: [PATCH] Added missing topic text to agenda csv export (Fixed #2954). --- openslides/agenda/static/js/agenda/base.js | 10 ++++++++++ openslides/agenda/static/js/agenda/csv.js | 2 +- openslides/topics/static/js/topics/base.js | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/openslides/agenda/static/js/agenda/base.js b/openslides/agenda/static/js/agenda/base.js index b92a6495b..ac60aeb0e 100644 --- a/openslides/agenda/static/js/agenda/base.js +++ b/openslides/agenda/static/js/agenda/base.js @@ -87,6 +87,16 @@ angular.module('OpenSlidesApp.agenda', ['OpenSlidesApp.users']) getAgendaTitle: function () { return this.title; }, + getCSVExportText: function () { + var text; + try { + text = this.getContentObject().getCSVExportText(); + } catch (e) { + // when the content object is not in the DS store + // or 'getCSVExportText' is not defined return nothing. + } + return text; + }, // link name which is shown in search result getSearchResultName: function () { return this.getAgendaTitle(); diff --git a/openslides/agenda/static/js/agenda/csv.js b/openslides/agenda/static/js/agenda/csv.js index 513c5d26c..863266f3f 100644 --- a/openslides/agenda/static/js/agenda/csv.js +++ b/openslides/agenda/static/js/agenda/csv.js @@ -26,7 +26,7 @@ angular.module('OpenSlidesApp.agenda.csv', []) { seconds: 'disabled', hours: 'enabled' }) : ''; row.push('"' + (item.title || '') + '"'); - row.push('"' + (item.text || '') + '"'); + row.push('"' + (item.getCSVExportText() || '') + '"'); row.push('"' + duration + '"'); row.push('"' + (item.comment || '') + '"'); row.push('"' + (item.is_hidden ? '1' : '') + '"'); diff --git a/openslides/topics/static/js/topics/base.js b/openslides/topics/static/js/topics/base.js index 5cb6e5cd6..c0491dedf 100644 --- a/openslides/topics/static/js/topics/base.js +++ b/openslides/topics/static/js/topics/base.js @@ -21,6 +21,9 @@ angular.module('OpenSlidesApp.topics', []) getAgendaTitle: function () { return this.title; }, + getCSVExportText: function () { + return this.text; + }, }, relations: { belongsTo: {