Merge pull request #3439 from FinnStutzenstein/PdfInsertFix
Fixed indention of inserted paragraphes
This commit is contained in:
commit
3c9ae628e8
@ -128,11 +128,14 @@ angular.module('OpenSlidesApp.core.pdf', [])
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//checks if str is valid HTML. Returns valid HTML if not,
|
//checks if str is valid HTML. Returns valid HTML if not,
|
||||||
//return emptystring if empty
|
//return emptystring if empty
|
||||||
HTMLValidizer.validize = function(str) {
|
HTMLValidizer.validize = function(str) {
|
||||||
if (str) {
|
if (str) {
|
||||||
str = HTMLValidizer.replaceMalformedUmlauts(str);
|
str = HTMLValidizer.replaceMalformedUmlauts(str);
|
||||||
|
// Sometimes, some \n are in the text instead of whitespaces. Replace them.
|
||||||
|
str = str.replace(/\n/g, ' ');
|
||||||
|
|
||||||
var a = document.createElement('div');
|
var a = document.createElement('div');
|
||||||
a.innerHTML = str;
|
a.innerHTML = str;
|
||||||
@ -143,7 +146,7 @@ angular.module('OpenSlidesApp.core.pdf', [])
|
|||||||
});
|
});
|
||||||
return "<p>" + str + "</p>";
|
return "<p>" + str + "</p>";
|
||||||
} else {
|
} else {
|
||||||
return ""; //needed for blank "reaons" field
|
return ""; //needed for blank "reasons" field
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return HTMLValidizer;
|
return HTMLValidizer;
|
||||||
@ -823,6 +826,9 @@ angular.module('OpenSlidesApp.core.pdf', [])
|
|||||||
if (classes.indexOf('os-split-before') === -1) {
|
if (classes.indexOf('os-split-before') === -1) {
|
||||||
currentParagraph.margin[1] = 8;
|
currentParagraph.margin[1] = 8;
|
||||||
}
|
}
|
||||||
|
if (classes.indexOf('insert') > -1) {
|
||||||
|
currentParagraph.margin[0] = 20;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
currentParagraph.lineHeight = 1.25;
|
currentParagraph.lineHeight = 1.25;
|
||||||
var stackP = create("stack");
|
var stackP = create("stack");
|
||||||
|
@ -505,6 +505,7 @@ angular.module('OpenSlidesApp.motions', [
|
|||||||
case 'create_poll':
|
case 'create_poll':
|
||||||
return (
|
return (
|
||||||
operator.hasPerms('motions.can_manage') &&
|
operator.hasPerms('motions.can_manage') &&
|
||||||
|
this.state &&
|
||||||
this.state.allow_create_poll
|
this.state.allow_create_poll
|
||||||
);
|
);
|
||||||
case 'support':
|
case 'support':
|
||||||
|
Loading…
Reference in New Issue
Block a user