Skip to content

Commit b04d0b3

Browse files
author
Tibor Szakmany
committed
update versions, docs, setup, metadata
1 parent b3fafe4 commit b04d0b3

File tree

5 files changed

+55
-44
lines changed

5 files changed

+55
-44
lines changed

CHANGES.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@ Changelog
33

44
JQueryUI Changelog: https://jqueryui.com/changelog/
55

6+
4.0.0 (unreleased)
7+
------------------
8+
9+
- Provided resources directly from extracted jQueryUI ZIP file (with require patch)
10+
- Drop controlpanel using plone.app.registry to select plugins
11+
- Drop Python 2 and Plone 4 support
12+
[szakitibi]
13+
614
2.2.1 (unreleased)
715
------------------
816

docs/UPGRADE.txt

Lines changed: 44 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,62 @@
11
How to upgrade this package
22
===========================
33

4-
!IMPORTANT: Does not work like this any more! See https://github.com/collective/collective.js.jqueryui/issues/46
54

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.
86
- Click on "Download theme" in the left-side "Theme rollover".
9-
- At the bottom "Theme" update by "sunburst" in "Theme Folder Name" field.
107
- Download jquery-ui-X.custom.zip
118

129
Commands to execute::
1310

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
3315

3416
- increment the profile version in metadata.xml
3517

36-
- update the ugprade step::
18+
- provide ugprade step::
3719

3820
<genericsetup:upgradeStep
39-
source="*"
40-
destination="3001"
21+
source="4000"
22+
destination="4001"
4123
title=""
4224
description=""
4325
profile="collective.js.jqueryui:default"
44-
handler=".upgrades.common"
4526
/>
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.

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
setup(
1818
name="collective.js.jqueryui",
19-
version="2.2.1.dev0",
19+
version="4.0.0 (unreleased)",
2020
description="JQueryUI ready for Plone",
2121
long_description=long_description,
2222
# Get more from https://pypi.org/classifiers/
@@ -30,7 +30,6 @@
3030
"Framework :: Zope :: 4",
3131
"Framework :: Plone",
3232
"Framework :: Plone :: Addon",
33-
"Framework :: Plone :: 4.3",
3433
"Framework :: Plone :: 5.0",
3534
"Framework :: Plone :: 5.1",
3635
"Framework :: Plone :: 5.2",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
22
<metadata>
3-
<version>3204</version>
3+
<version>4000</version>
44
<dependencies>
55
</dependencies>
66
</metadata>

src/collective/js/jqueryui/viewlet.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -81,18 +81,5 @@ def update(self):
8181
self.jq_date_format = get_datepicker_date_format(self.request)
8282

8383
def render(self):
84-
# TODO: check if it is actually used
85-
# just short circuit for now, like datepicker is not activated
84+
# just short circuit for now, like datepicker is not activated
8685
return ""
87-
88-
# return """<script type="text/javascript">
89-
# jQuery(function($){{
90-
# if (typeof($.datepicker) != "undefined"){{
91-
# $.datepicker.setDefaults(
92-
# jQuery.extend($.datepicker.regional['{0}'],
93-
# {{dateFormat: '{1}'}}));
94-
# }}
95-
# }});
96-
# </script>""".format(
97-
# self.jq_language(), self.jq_date_format
98-
# )

0 commit comments

Comments
 (0)