Bug 38824 - Create CSS and JavaScript libraries for UCS theme styling and other features (e.g., i18n)
Create CSS and JavaScript libraries for UCS theme styling and other features ...
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC (Generic)
UCS 4.0
Other Linux
: P5 normal (vote)
: UCS 4.2
Assigned To: Johannes Keiser
Alexander Kläser
: interim-1
Depends on: 42321
Blocks: 41892 42172
  Show dependency treegraph
 
Reported: 2015-07-02 18:59 CEST by Alexander Kläser
Modified: 2017-04-04 18:28 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, Design
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Kläser univentionstaff 2015-07-02 18:59:56 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).
Comment 1 Alexander Kläser univentionstaff 2016-01-04 11:42:22 CET
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.
Comment 2 Florian Best univentionstaff 2016-08-30 15:46:06 CEST
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}/.
Comment 3 Florian Best univentionstaff 2016-08-30 16:11:09 CEST
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.
Comment 4 Johannes Keiser univentionstaff 2016-08-31 18:06:37 CEST
r 72145
univention-web (1.0.0-1) unstable; urgency=medium
   * Bug #38824: create univention-web package
Comment 5 Alexander Kläser univentionstaff 2016-09-08 13:40:32 CEST
univention-web (1.0.1-2):
r72430 | Bug #38824: remove lessc as it is not used anymore
Comment 6 Florian Best univentionstaff 2016-09-12 11:40:25 CEST
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',
Comment 7 Philipp Hahn univentionstaff 2016-09-12 15:43:22 CEST
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"}
Comment 8 Johannes Keiser univentionstaff 2016-09-15 18:28:17 CEST
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
Comment 9 Philipp Hahn univentionstaff 2016-12-15 13:25:45 CET
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
Comment 10 Florian Best univentionstaff 2017-02-02 18:26:33 CET
There is no de.po anymore in univention-management-console/ for the javascript files.
Comment 11 Alexander Kläser univentionstaff 2017-02-06 14:54:07 CET
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
Comment 12 Florian Best univentionstaff 2017-02-06 15:04:51 CET
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)
Comment 13 Florian Best univentionstaff 2017-02-06 15:16:07 CET
GET http://192.168.0.113/univention/js/dijit/themes/images/icons-small-white.svg 404 (Not Found)
Comment 14 Alexander Kläser univentionstaff 2017-02-06 15:19:20 CET
+ a little adjustment

univention-web (1.0.14-2):
r76447 | Bug #38824: make _getPackageName more robst
Comment 15 Alexander Kläser univentionstaff 2017-02-06 15:20:03 CET
TODO: we also need to move some App Center related code (e.g., css styling) into univention-web
Comment 16 Alexander Kläser univentionstaff 2017-02-06 15:42:42 CET
(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()
Comment 17 Alexander Kläser univentionstaff 2017-02-21 10:07:46 CET
(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
Comment 18 Alexander Kläser univentionstaff 2017-02-21 10:08:11 CET
This bug can be set to VERIFIED now.
Comment 19 Stefan Gohmann univentionstaff 2017-04-04 18:28:50 CEST
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".