|
1 | 1 | How to upgrade this package
|
2 | 2 | ===========================
|
3 | 3 |
|
4 |
| -!IMPORTANT: Does not work like this any more! See https://github.com/collective/collective.js.jqueryui/issues/46 |
5 | 4 |
|
6 |
| -- Go to https://jqueryui.com/download |
7 |
| -- Go to the URL specified in the collective/js/jqueryui/css/sunburst/jqueryui.css file to pre-load current theme settings. |
| 5 | +- Go to the URL specified in the src/collective/js/jqueryui/jquery-ui-$VERSION.custom/jquery-ui.theme.css file to pre-load current theme settings. |
8 | 6 | - Click on "Download theme" in the left-side "Theme rollover".
|
9 |
| -- At the bottom "Theme" update by "sunburst" in "Theme Folder Name" field. |
10 | 7 | - Download jquery-ui-X.custom.zip
|
11 | 8 |
|
12 | 9 | Commands to execute::
|
13 | 10 |
|
14 |
| - PKG="/home/toutpt/workspace/collective.js.jqueryui/src/collective/js/jqueryui" |
15 |
| - VERSION="1.8.13" |
16 |
| - PREV="1.8.12" |
17 |
| - unzip ~/jquery-ui-$VERSION.custom.zip |
18 |
| - cd ~/jquery-ui-$VERSION.custom |
19 |
| - rm $PKG/jquery-ui-$PREV.custom.min.js |
20 |
| - rm $PKG/jquery-ui-$PREV.custom.js |
21 |
| - rm $PKG/js/* |
22 |
| - cp ui/jquery-ui.js $PKG/jquery-ui-$VERSION.custom.js |
23 |
| - cp ui/minified/jquery-ui.min.js $PKG/jquery-ui-$VERSION.custom.min.js |
24 |
| - cp ui/minified/i18n/jquery-ui-i18n.min.js $PKG/jquery-ui-i18n.js |
25 |
| - cp ui/minified/*.min.js $PKG/js/ |
26 |
| - |
27 |
| - rm $PKG/css/sunburst/images/* |
28 |
| - rm $PKG/css/sunburst/jqueryui.css |
29 |
| - cp css/sunburst/jquery-ui-$VERSION.custom.css $PKG/css/sunburst/jqueryui.css |
30 |
| - cp css/sunburst/images/* $PKG/css/sunburst/images/ |
31 |
| - |
32 |
| -- update version in README.txt and common.zcml and config.py |
| 11 | + unzip jquery-ui-$VERSION.custom.zip |
| 12 | + rm -R jquery-ui-$PREV.custom |
| 13 | + |
| 14 | +- update version in `config.py` and `configure.zcml` for resources |
33 | 15 |
|
34 | 16 | - increment the profile version in metadata.xml
|
35 | 17 |
|
36 |
| -- update the ugprade step:: |
| 18 | +- provide ugprade step:: |
37 | 19 |
|
38 | 20 | <genericsetup:upgradeStep
|
39 |
| - source="*" |
40 |
| - destination="3001" |
| 21 | + source="4000" |
| 22 | + destination="4001" |
41 | 23 | title=""
|
42 | 24 | description=""
|
43 | 25 | profile="collective.js.jqueryui:default"
|
44 |
| - handler=".upgrades.common" |
45 | 26 | />
|
| 27 | + |
| 28 | + |
| 29 | +Caveats/Issues: |
| 30 | +=============== |
| 31 | + |
| 32 | +!IMPORTANT: The old style configurable solution does not work any more! |
| 33 | +https://github.com/collective/collective.js.jqueryui/issues/46 |
| 34 | +This is a simplified 4.0.0 version, with different upgrade steps. |
| 35 | + |
| 36 | +make it work |
| 37 | +------------ |
| 38 | + |
| 39 | +The result of the unpacked jQuery UI zip with Plone 5.2.4 (5212) patterns require.js raises an error: |
| 40 | + |
| 41 | +``` |
| 42 | +Uncaught Error: Mismatched anonymous define() module: function(V){"use strict";V.ui=V.ui||{};V.ui.version="1.13.2"; ... require.js:168 |
| 43 | + at makeError (require.js:168:17) |
| 44 | + at intakeDefines (require.js:1254:36) |
| 45 | + at Object.localRequire [as require] (require.js:1446:21) |
| 46 | + at requirejs (require.js:1797:24) |
| 47 | + at patterns-compiled.js:15444:1 |
| 48 | +``` |
| 49 | + |
| 50 | +Solution was to manually remove from `jquery-ui-1.13.2.custom/jquery-ui.min.js` the ADM part (`"function"==typeof define&&define.amd?define(["jquery"],t):`) right at the start of the javascript code: |
| 51 | + |
| 52 | +`!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):t(jQuery)}(function(V){ ...` |
| 53 | + |
| 54 | +so we end up with: |
| 55 | + |
| 56 | +`!function(t){"use strict";t(jQuery)}(function(V){ ...` |
| 57 | + |
| 58 | + |
| 59 | +no more i18n datepicker |
| 60 | +----------------------- |
| 61 | + |
| 62 | +It does not work anymore, the viewlet is simply short circuited in its render method. It is left in the product in case it is used by other addons. |
0 commit comments