diff --git a/openslides/agenda/apps.py b/openslides/agenda/apps.py
index f6a935eb6..60f9aecab 100644
--- a/openslides/agenda/apps.py
+++ b/openslides/agenda/apps.py
@@ -4,6 +4,9 @@ from django.apps import AppConfig
class AgendaAppConfig(AppConfig):
name = 'openslides.agenda'
verbose_name = 'OpenSlides Agenda'
+ angular_site_module = True
+ angular_projector_module = True
+ js_files = ['js/agenda/agenda.js']
def ready(self):
# Load projector elements.
diff --git a/openslides/assignments/__init__.py b/openslides/assignments/__init__.py
index 3d09acb77..b26bfa2fe 100644
--- a/openslides/assignments/__init__.py
+++ b/openslides/assignments/__init__.py
@@ -1 +1 @@
-default_app_config = 'openslides.assignments.apps.AssignmentAppConfig'
+default_app_config = 'openslides.assignments.apps.AssignmentsAppConfig'
diff --git a/openslides/assignments/apps.py b/openslides/assignments/apps.py
index 2cc34758d..d00028cce 100644
--- a/openslides/assignments/apps.py
+++ b/openslides/assignments/apps.py
@@ -1,9 +1,12 @@
from django.apps import AppConfig
-class AssignmentAppConfig(AppConfig):
+class AssignmentsAppConfig(AppConfig):
name = 'openslides.assignments'
verbose_name = 'OpenSlides Assignments'
+ angular_site_module = True
+ angular_projector_module = True
+ js_files = ['js/assignments/assignments.js']
def ready(self):
# Load projector elements.
diff --git a/openslides/core/apps.py b/openslides/core/apps.py
index 13861e295..d180b7109 100644
--- a/openslides/core/apps.py
+++ b/openslides/core/apps.py
@@ -4,6 +4,9 @@ from django.apps import AppConfig
class CoreAppConfig(AppConfig):
name = 'openslides.core'
verbose_name = 'OpenSlides Core'
+ angular_site_module = True
+ angular_projector_module = True
+ js_files = ['js/core/core.js']
def ready(self):
# Load projector elements.
diff --git a/openslides/core/static/js/app.js b/openslides/core/static/js/app.js
deleted file mode 100644
index 7d26154e6..000000000
--- a/openslides/core/static/js/app.js
+++ /dev/null
@@ -1,52 +0,0 @@
-angular.module('OpenSlidesApp', [
- 'angular-loading-bar',
- 'js-data',
- 'gettext',
- 'ngAnimate',
- 'ui.bootstrap',
- 'ui.tree',
-]);
-
-angular.module('OpenSlidesApp.projector', [
- 'OpenSlidesApp',
- 'OpenSlidesApp.core.projector',
- 'OpenSlidesApp.agenda.projector',
- 'OpenSlidesApp.motions.projector',
- 'OpenSlidesApp.assignments.projector',
- 'OpenSlidesApp.users.projector',
- 'OpenSlidesApp.mediafiles',
-]);
-
-angular.module('OpenSlidesApp.site', [
- 'OpenSlidesApp',
- 'ui.router',
- 'ngBootbox',
- 'ngFabForm',
- 'ngMessages',
- 'ngCsvImport',
- 'ngSanitize', // TODO: remove this as global dependency
- 'ui.select',
- 'xeditable',
- 'OpenSlidesApp.core.site',
- 'OpenSlidesApp.agenda.site',
- 'OpenSlidesApp.motions.site',
- 'OpenSlidesApp.assignments.site',
- 'OpenSlidesApp.users.site',
- 'OpenSlidesApp.mediafiles.site',
-])
-
-.config(function($urlRouterProvider, $locationProvider) {
- // define fallback url and html5Mode
- $urlRouterProvider.otherwise('/');
- $locationProvider.html5Mode(true);
-})
-
-.config(function($httpProvider) {
- // Combine the django csrf system with the angular csrf system
- $httpProvider.defaults.xsrfCookieName = 'csrftoken';
- $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';
-})
-
-.config(function(uiSelectConfig) {
- uiSelectConfig.theme = 'bootstrap';
-});
diff --git a/openslides/core/static/js/core.js b/openslides/core/static/js/core/core.js
similarity index 95%
rename from openslides/core/static/js/core.js
rename to openslides/core/static/js/core/core.js
index 6b74a5291..ef605bd1c 100644
--- a/openslides/core/static/js/core.js
+++ b/openslides/core/static/js/core/core.js
@@ -1,5 +1,12 @@
// The core module used for the OpenSlides site and the projector
-angular.module('OpenSlidesApp.core', [])
+angular.module('OpenSlidesApp.core', [
+ 'angular-loading-bar',
+ 'js-data',
+ 'gettext',
+ 'ngAnimate',
+ 'ui.bootstrap',
+ 'ui.tree',
+])
.config(function(DSProvider) {
// Reloads everything after 5 minutes.
@@ -146,7 +153,33 @@ angular.module('OpenSlidesApp.core', [])
// The core module for the OpenSlides site
-angular.module('OpenSlidesApp.core.site', ['OpenSlidesApp.core'])
+angular.module('OpenSlidesApp.core.site', [
+ 'OpenSlidesApp.core',
+ 'ui.router',
+ 'ngBootbox',
+ 'ngFabForm',
+ 'ngMessages',
+ 'ngCsvImport',
+ 'ngSanitize', // TODO: only use this in functions that need it.
+ 'ui.select',
+ 'xeditable',
+])
+
+.config(function($urlRouterProvider, $locationProvider) {
+ // define fallback url and html5Mode
+ $urlRouterProvider.otherwise('/');
+ $locationProvider.html5Mode(true);
+})
+
+.config(function($httpProvider) {
+ // Combine the django csrf system with the angular csrf system
+ $httpProvider.defaults.xsrfCookieName = 'csrftoken';
+ $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';
+})
+
+.config(function(uiSelectConfig) {
+ uiSelectConfig.theme = 'bootstrap';
+})
.config(function($stateProvider, $urlMatcherFactoryProvider) {
// Make the trailing slash optional
diff --git a/openslides/core/static/templates/index.html b/openslides/core/static/templates/index.html
index 86fc41d22..51af20959 100644
--- a/openslides/core/static/templates/index.html
+++ b/openslides/core/static/templates/index.html
@@ -2,7 +2,7 @@
-
+