Univention Bugzilla – Bug 38824
Create CSS and JavaScript libraries for UCS theme styling and other features (e.g., i18n)
Last modified: 2017-04-04 18:28:50 CEST
We now have several packages that ship web code and show a UCS theme. It would be nice to bundle CSS and JavaScript code... probably into a separate package, although this would somewhat complicate the build process (i.e., it would mean building two packages to change a particular styling).
After discussing the different possibilities, we favored an implementation with a package containing common CSS styling and JavaScript code which can be shared across various web services (UMC, self service, UCS overview site, system activation etc.). Of course, each service will bring its own particular code (CSS + JS) in addition. Smaller web service will then not need to perform a full dojo build process themselves. This implementation will render the errata update process easier. In addition, the browser will be able to cache files across different web services. However, we will need to offer different build layers for the dojo build process, in order to allow web services to only include particular JavaScript/CSS functionality.
As discussed, please 1. rename univention-management-console-frontend-theme into univention-web-styles 2. split univention-management-console-frontend into univention-web-js, leave the specific HTML files in the univention-manangement-console-frontend package. The files should be stored underneath of /usr/share/univention-web/{js,css}/.
As further discussed, create one source package univention-web with the binary packages univention-web-styles and univention-web-js. I will move all UMC specific parts into the univention-management-console source package.
r 72145 univention-web (1.0.0-1) unstable; urgency=medium * Bug #38824: create univention-web package
univention-web (1.0.1-2): r72430 | Bug #38824: remove lessc as it is not used anymore
The i18n module name for the whole lib is currently still called umc/app. umc/tools still uses umc/app to open modules / check if modules exists. univention-web/umc/i18n.js: // e.g. "umc/i18n!umc/branding,umc/app". univention-web/umc/i18n.js: // | require(['umc/i18n!umc/branding,umc/app'], function(_) { univention-web/umc/i18n.js: // use 'umc.app' and 'umc.branding' as backup path to allow other class to override a univention-web/umc/i18n.js: scopes.push('umc/app'); univention-web/umc/tools.js: // to `umc/app::start()`. The following properties exist: univention-web/umc/tools.js: var module = require('umc/app').getModule(moduleId, moduleFlavor); univention-web/umc/tools.js: return lang.replace('<a href="javascript:void(0)" onclick=\'require("umc/app").openModule({module}, {flavor}, {props})\'>{link}</a>', args); univention-web/umc/widgets/Grid.js: i18nClass: 'umc.app', univention-web/umc/widgets/Page.js: i18nClass: 'umc.app',
Still buggy: <http://10.200.17.4/> {"status": 404, "message": "The path '/management/index.html' was not found.\n\nTraceback (most recent call last):\n File \"/usr/lib/python2.7/dist-packages/cherrypy/_cprequest.py\", line 670, in respond\n response.body = self.handler()\n File \"/usr/lib/python2.7/dist-packages/cherrypy/lib/encoding.py\", line 217, in __call__\n self.body = self.oldhandler(*args, **kwargs)\n File \"/usr/lib/python2.7/dist-packages/cherrypy/_cperror.py\", line 411, in __call__\n raise self\nNotFound: (404, \"The path '/management/index.html' was not found.\")\n"}
r 72630 | v 7.0.1-6A~4.2.0.201609151617 univention-management-console-module-udm (7.0.1-6) Bug #38824: * add dependency to _all.js for DetailPage widget * fix error for requiring udm wizards
dpkg: Fehler beim Bearbeiten des Archivs /var/cache/apt/archives/univention-management-console-frontend_9.0.13-3A~4.2.0.201612061505_all.deb (--unpack): Versuch, »/var/www/univention-management-console« zu überschreiben, welches auch in Paket univention-management-console-module-sysinfo 6.0.1-1.56.201511040006 ist r75310 | Bug #38824 umc: Fix conflict for /var/www/univention-management-console r75313 | Bug #38824 umc: Fix conflict for /var/www/univention-management-console Package: univention-management-console Version: 9.0.13-4A~4.2.0.201612151214 Version: 9.0.13-5A~4.2.0.201612151256 Branch: ucs_4.2-0
There is no de.po anymore in univention-management-console/ for the javascript files.
I added a generic config.js in univention-web which can be included in a index.html file. It provides getQuery(), getLocale(), getCookie() functions as well as a pre-defined dojoConfig variable. univention-web (1.0.14-1): r76440 | Bug #38824: use a generic config.js for Dojo Toolkit in index.html univention-management-console (9.0.23-1): r76440 | Bug #38824: use a generic config.js for Dojo Toolkit in index.html univention-portal (1.0.4-2): r76440 | Bug #38824: use a generic config.js for Dojo Toolkit in index.html
When opening the software update module there is a 404 request: dojo.js:10142 GET http://192.168.0.113/univention/dijit/themes/umc/form/images/error.svg 404 (Not Found)
GET http://192.168.0.113/univention/js/dijit/themes/images/icons-small-white.svg 404 (Not Found)
+ a little adjustment univention-web (1.0.14-2): r76447 | Bug #38824: make _getPackageName more robst
TODO: we also need to move some App Center related code (e.g., css styling) into univention-web
(In reply to Alexander Kläser from comment #14) > + a little adjustment > > univention-web (1.0.14-2): > r76447 | Bug #38824: make _getPackageName more robst - the little adjustment... the idea was not ideal. univention-web (1.0.14-3): r76448 | Bug #38824: undo last changes for _getPackageName()
(In reply to Florian Best from comment #10) > There is no de.po anymore in univention-management-console/ for the > javascript files. I created Bug 43594 for this. (In reply to Alexander Kläser from comment #15) > TODO: we also need to move some App Center related code (e.g., css styling) > into univention-web This will go into Bug 43528. This bug can then be RESOLVED for now. changelog-4.2-0.xml: r76894 | Bug #38824: added changelog entry NONE: r76648 | Bug #38824: Remove empty umc directory univention-web (1.0.26-5): r76754 | Bug #38824: fix package path r76489 | Bug #38824: fix missing semicolon r76459 | Bug #38824: added target build-live r76457 | Bug #38824: adjust Makefile build-dev target to create symlink to /var/www r76448 | Bug #38824: undo last changes for _getPackageName() r76447 | Bug #38824: make _getPackageName more robst r76440 | Bug #38824: use a generic config.js for Dojo Toolkit in index.html r72808 | Bug #38824: Fix build-dev r72602 | Bug #38824: Fix missing icons r72553 | Bug #38824: do not include images as symlinks in build directory r72520 | Bug #38824: make sure that package build works correctly r72515 | Bug #38824: WIP - update README + optimize Makefile r72514 | Bug #38824: WIP - update README + optimize Makefile r72513 | Bug #38824: WIP - Adapt Makefile to last changes r72511 | Bug #38824: WIP - replace "claro" with "umc" r72510 | Bug #38824: WIP - rename css/js directories r72464 | Bug #38824: WIP - adjust web Makefile and re-organize code files r72430 | Bug #38824: remove lessc as it is not used anymore r72145 | Bug #38824: create univention-web package univention-management-console-frontend-theme (???): r72146 | Bug #38824: remove univention-management-console-frontend{,-theme} as it is moved into univention-web univention-management-console-module-udm (7.0.5-1): r72630 | Bug #38824: r72605 | Bug #38824: fix dependency to widgets.js univention-management-console (9.0.35-1): r76440 | Bug #38824: use a generic config.js for Dojo Toolkit in index.html r75313 | Bug #38824 umc: Fix conflict for /var/www/univention-management-console r75310 | Bug #38824 umc: Fix conflict for /var/www/univention-management-console r72636 | Bug #38824: removed mod_rewrite rule for non existing files under r72627 | Bug #38824: r72560 | Bug #38824: remove dependency to app.css r72559 | Bug #38824: fix typo in .link file r72552 | Bug #38824: a few more tweaks for univention-web-js r72549 | Bug #38824: fix typo r72547 | Bug #38824: make UMC work with univention-web-js r72537 | Bug #38824: adjust paths and keep /usr/share/u-m-c-frontend/js r72519 | Bug #38824: adjust debia/*install files to avoid usr/share/u-m-c being included by 2 packages r72518 | Bug #38824: adjust debian/u-m-c-frontend.link and .install file r72464 | Bug #38824: WIP - adjust web Makefile and re-organize code files r72073 | Bug #38824: move univention-management-console-web-server into univention-management-console univention-portal (1.0.6-3): r76440 | Bug #38824: use a generic config.js for Dojo Toolkit in index.html univention-management-console-frontend (???): r72146 | Bug #38824: remove univention-management-console-frontend{,-theme} as it is moved into univention-web
This bug can be set to VERIFIED now.
UCS 4.2 has been released: https://docs.software-univention.de/release-notes-4.2-0-en.html https://docs.software-univention.de/release-notes-4.2-0-de.html If this error occurs again, please use "Clone This Bug".