From e315cbad897a8102909e4813a42a8ad692aaa426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Wed, 2 Nov 2016 13:15:27 +0100 Subject: [PATCH] Fix regression with projector loading. Projector requires Editor provider in core/base.js instead of site.js because MotionComments (in motions/base.js) uses now Editor factory. --- openslides/core/static/js/core/base.js | 34 ++++++++++++++++++++++++++ openslides/core/static/js/core/site.js | 31 ----------------------- 2 files changed, 34 insertions(+), 31 deletions(-) diff --git a/openslides/core/static/js/core/base.js b/openslides/core/static/js/core/base.js index 646d1c5e3..5ced66b76 100644 --- a/openslides/core/static/js/core/base.js +++ b/openslides/core/static/js/core/base.js @@ -460,6 +460,40 @@ angular.module('OpenSlidesApp.core', [ } ]) +// Options for TinyMCE editor used in various create and edit views. +// Required in core/base.js because MotionComment factory which used this +// factory has to placed in motions/base.js. +.factory('Editor', [ + 'gettextCatalog', + function (gettextCatalog) { + return { + getOptions: function (images, inlineMode) { + if (inlineMode === undefined) { + inlineMode = false; + } + return { + language_url: '/static/tinymce/i18n/' + gettextCatalog.getCurrentLanguage() + '.js', + theme_url: '/static/js/openslides-libs.js', + skin_url: '/static/tinymce/skins/lightgray/', + inline: inlineMode, + statusbar: false, + browser_spellcheck: true, + image_advtab: true, + image_list: images, + plugins: [ + 'lists link autolink charmap preview searchreplace code fullscreen', + 'paste textcolor colorpicker image imagetools' + ], + menubar: '', + toolbar: 'undo redo searchreplace | styleselect | bold italic underline strikethrough ' + + 'forecolor backcolor removeformat | bullist numlist | outdent indent | ' + + 'link image charmap table | code preview fullscreen' + }; + } + }; + } +]) + /* Model for a projector. * * At the moment we use only one projector, so there will be only one object diff --git a/openslides/core/static/js/core/site.js b/openslides/core/static/js/core/site.js index a319f020f..20aca611c 100644 --- a/openslides/core/static/js/core/site.js +++ b/openslides/core/static/js/core/site.js @@ -405,37 +405,6 @@ angular.module('OpenSlidesApp.core.site', [ } ]) -// Options for TinyMCE editor used in various create and edit views. -.factory('Editor', [ - 'gettextCatalog', - function (gettextCatalog) { - return { - getOptions: function (images, inlineMode) { - if (inlineMode === undefined) { - inlineMode = false; - } - return { - language_url: '/static/tinymce/i18n/' + gettextCatalog.getCurrentLanguage() + '.js', - theme_url: '/static/js/openslides-libs.js', - skin_url: '/static/tinymce/skins/lightgray/', - inline: inlineMode, - browser_spellcheck: true, - image_advtab: true, - image_list: images, - plugins: [ - 'lists link autolink charmap preview searchreplace code fullscreen', - 'paste textcolor colorpicker image imagetools wordcount' - ], - menubar: '', - toolbar: 'undo redo searchreplace | styleselect | bold italic underline strikethrough ' + - 'forecolor backcolor removeformat | bullist numlist | outdent indent | ' + - 'link image charmap table | code preview fullscreen' - }; - } - }; - } -]) - // html-tag os-form-field to generate generic from fields // TODO: make it possible to use other fields then config fields .directive('osFormField', [