summaryrefslogtreecommitdiffstats
path: root/doc/javascript_css
diff options
context:
space:
mode:
authorChristian Klinger2016-06-15 16:43:17 +0200
committerChristian Klinger2016-06-15 16:43:17 +0200
commit2b18d0d0c49c3a75bd221ab86b7315f7bae98008 (patch)
tree7d44e103224c1a79e8ccdd5d0313f76180847303 /doc/javascript_css
parentsmall style changes (diff)
parent[sysconfignew] Move css from global file to module specific one (diff)
downloadslx-admin-2b18d0d0c49c3a75bd221ab86b7315f7bae98008.tar.gz
slx-admin-2b18d0d0c49c3a75bd221ab86b7315f7bae98008.tar.xz
slx-admin-2b18d0d0c49c3a75bd221ab86b7315f7bae98008.zip
Merge branch 'modularization' of git.openslx.org:openslx-ng/slx-admin into modularization
Conflicts: install/content.sql install/schema.sql
Diffstat (limited to 'doc/javascript_css')
-rw-r--r--doc/javascript_css19
1 files changed, 19 insertions, 0 deletions
diff --git a/doc/javascript_css b/doc/javascript_css
new file mode 100644
index 00000000..de4896d5
--- /dev/null
+++ b/doc/javascript_css
@@ -0,0 +1,19 @@
+In order to prevent the global ./style/default.css from growing until
+it's a complete mess, it is also possible to modularize css stylesheets
+and javascript files.
+
+If a module contains a file called style.css, it is automatically included
+in the generated HTML page of the module, or any module that declared this
+module as a dependency.
+The same goes for a file called clientscript.js. Any module containing such
+a file will have this script included in the generated HTML.
+
+This way you can have module specific CSS definitions. Some of the
+definitions in ./style/default.css should be moved into modules over
+time (TODO :)), since they are only used in one module.
+
+Thanks to the dependency mechanism it is possible to have dedicated css/js
+modules, like "js_chart" or "js_circles". An example is the module
+"statistics", which defines js_chart as a dependency in its config.json.
+The result is that js_chart/clientscript.js is automatically included
+in the HTML output of the statistics module.