Fixes #3092, fixes #2453 and fixed motion projection bug

This commit is contained in:
FinnStutzenstein 2017-03-17 11:19:17 +01:00
parent a33f0dd668
commit 4f84a9f752
5 changed files with 16 additions and 9 deletions

View File

@ -154,7 +154,7 @@ body {
.content {
position: absolute;
left: 50px;
top: 150px;
top: 100px;
right: 50px;
z-index: -1;
line-height: 1.3em;

View File

@ -7,6 +7,7 @@ angular.module('OpenSlidesApp.core', [
'js-data',
'gettext',
'ngAnimate',
'ngBootbox',
'ngSanitize', // TODO: only use this in functions that need it.
'ui.bootstrap',
'ui.bootstrap.datetimepicker',
@ -151,7 +152,8 @@ angular.module('OpenSlidesApp.core', [
'gettext',
'gettextCatalog',
'OpenSlidesPlugins',
function (gettext, gettextCatalog, OpenSlidesPlugins) {
'$ngBootbox',
function (gettext, gettextCatalog, OpenSlidesPlugins, $ngBootbox) {
return {
// get all available languages
getLanguages: function () {
@ -194,8 +196,17 @@ angular.module('OpenSlidesApp.core', [
if (language.code == lang) {
language.selected = true;
gettextCatalog.setCurrentLanguage(lang);
// Plugins
if (lang != 'en') {
gettextCatalog.loadRemote("static/i18n/" + lang + ".json");
gettextCatalog.loadRemote("static/i18n/" + lang + ".json").then(function (success) {
// translate ng-bootbox directives when the translations are available.
$ngBootbox.addLocale(lang, {
OK: gettextCatalog.getString('OK'),
CANCEL: gettextCatalog.getString('Cancel'),
CONFIRM: gettextCatalog.getString('OK'), // Yes, 'OK' is the original string.
});
$ngBootbox.setLocale(lang);
});
// load language files from plugins
angular.forEach(plugins, function (plugin) {
if (plugin.languages.indexOf(lang) != -1) {

View File

@ -171,7 +171,7 @@ angular.module('OpenSlidesApp.core.projector', ['OpenSlidesApp.core'])
var STEPS = 5;
$scope.scroll = 0;
var setScroll = function (scroll) {
scroll = -250 * scroll;
scroll = 250 * scroll;
if ($scope.scrollTimeout) {
$timeout.cancel($scope.scrollTimeout);
}

View File

@ -13,7 +13,6 @@ angular.module('OpenSlidesApp.core.site', [
'formly',
'formlyBootstrap',
'localytics.directives',
'ngBootbox',
'ngDialog',
'ngFileSaver',
'ngMessages',

View File

@ -79,12 +79,9 @@
<div><p>{{ config('motions_preamble') | translate }}</p></div><br>
<!-- Text -->
<!-- <div ng-bind-html="motion.getTextWithLineBreaks(null, line, scroll) | trusted"
class="motion-text line-numbers-{{ config('motions_default_line_numbering') }}"></div> -->
<!-- Original view -->
<div ng-if="mode == 'original'">
<div id="view-original-inline-editor" ng-bind-html="motion.getTextWithLineBreaks(null, line, scroll) | trusted"
<div id="view-original-inline-editor" ng-bind-html="motion.getTextWithLineBreaks(null, line) | trusted"
class="motion-text motion-text-original line-numbers-{{ config('motions_default_line_numbering') }}"
contenteditable="false"></div>
</div>