Merge pull request #3334 from emanuelschuetze/motion-fixes

Motion formatting and sort fixes
This commit is contained in:
Emanuel Schütze 2017-07-28 14:36:22 +02:00 committed by GitHub
commit 0cb4243891
3 changed files with 8 additions and 4 deletions

View File

@ -391,7 +391,8 @@ angular.module('OpenSlidesApp.core.pdf', [])
.factory('PdfMakeConverter', [
'HTMLValidizer',
function(HTMLValidizer) {
'Config',
function(HTMLValidizer, Config) {
/**
* Converter component for HTML->JSON for pdfMake
* @constructor
@ -906,19 +907,20 @@ angular.module('OpenSlidesApp.core.pdf', [])
},
/* Returns the object to push first into every column, that represents the given line. */
getLineNumberObject = function (line) {
var standardFontsize = Config.get('general_export_pdf_fontsize').value;
return {
width: 20,
text: [
{
text: ' ', // Add a blank with the normal font size here, so in rare cases the text
// is rendered on the next page and the linenumber on the previous page.
fontSize: 10,
fontSize: standardFontsize,
decoration: '',
},
{
text: line,
color: "gray",
fontSize: 8,
fontSize: standardFontsize - 2,
decoration: '',
},
],

View File

@ -248,7 +248,7 @@ angular.module('OpenSlidesApp.motions.pdf', ['OpenSlidesApp.core.pdf'])
// if pdfmake has fixed this.
var metaTableJsonString = {
table: {
widths: ['30%','70%'],
widths: ['35%','65%'],
body: metaTableBody,
},
margin: [0, 0, 0, 20],

View File

@ -896,6 +896,8 @@ angular.module('OpenSlidesApp.motions.site', [
return Motion.lastModified();
}, function () {
$scope.motions = Motion.getAll();
// always order by identifier (after custom ordering)
$scope.motions = _.orderBy($scope.motions, ['identifier']);
_.forEach($scope.motions, function (motion) {
motion.personalNote = PersonalNoteManager.getNote(motion);
// For filtering, we cannot filter for .personalNote.star