Merge pull request #1615 from boehlke/master

Fix javascript syntax.
This commit is contained in:
Norman Jäckel 2015-09-05 16:19:16 +02:00
commit 7f90373176

View File

@ -117,10 +117,14 @@ class AppsJsView(utils_views.View):
return result.promise(); return result.promise();
}; };
""" + """ +
"angular.module('OpenSlidesApp.{app}', {angular_modules});" """
"var deferres = [];" angular.module('OpenSlidesApp.{app}', {angular_modules});
"{js_files}.forEach(function(js_file)deferres.push(loadScript(js_file)));" var deferres = [];
"$.when.apply(this,deferres).done(function()angular.bootstrap(document,['OpenSlidesApp.{app}']));" {js_files}.forEach( function(js_file) {{ deferres.push(loadScript(js_file)); }} );
$.when.apply(this,deferres).done(function() {{
angular.bootstrap(document,['OpenSlidesApp.{app}']);
}} );
"""
.format( .format(
app=kwargs.get('openslides_app'), app=kwargs.get('openslides_app'),
angular_modules=angular_modules, angular_modules=angular_modules,