Merge pull request #2880 from emanuelschuetze/issue2787

Moved CKEDITOR_BASEPATH into openslides-libs.js (Fixed #2787)
This commit is contained in:
Norman Jäckel 2017-01-15 13:34:10 +01:00 committed by GitHub
commit 26a4f7ad0c
3 changed files with 5 additions and 4 deletions

View File

@ -22,6 +22,7 @@ var argv = require('yargs').argv,
cssnano = require('gulp-cssnano'),
gulpif = require('gulp-if'),
gettext = require('gulp-angular-gettext'),
inject = require('gulp-inject-string'),
jshint = require('gulp-jshint'),
mainBowerFiles = require('main-bower-files'),
path = require('path'),
@ -61,6 +62,8 @@ gulp.task('js-libs', function () {
.pipe(sourcemaps.init())
.pipe(concat('openslides-libs.js'))
.pipe(sourcemaps.write())
.pipe(inject.prepend("/* set basepath of CKEditor */\n" +
"window.CKEDITOR_BASEPATH = '/static/ckeditor/';\n\n"))
.pipe(gulpif(argv.production, uglify()))
.pipe(gulp.dest(path.join(output_directory, 'js')));
});

View File

@ -10,10 +10,7 @@
<link rel="stylesheet" href="static/css/openslides-libs.css">
<link rel="stylesheet" href="static/css/app.css">
<link rel="icon" href="/static/img/favicon.png">
<!-- TODO (#2787): move into openslides-libs-->
<script>
window.CKEDITOR_BASEPATH = '/static/ckeditor/';
</script>
<script src="static/js/openslides-libs.js"></script>
<script src="static/js/openslides.js"></script>
<script src="static/js/openslides-templates.js"></script>

View File

@ -14,6 +14,7 @@
"gulp-concat": "~2.6.0",
"gulp-cssnano": "~2.1.0",
"gulp-if": "~2.0.0",
"gulp-inject-string": "~1.1.0",
"gulp-jshint": "~2.0.0",
"gulp-rename": "~1.2.2",
"gulp-sourcemaps": "~1.6.0",