-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support both ExtJS 4.2.1 and ExtJS 5.1.0 #339
Conversation
These are the shortcuts to their counterparts in the GeoExt.Version namespace. In order to allow for different code-path depending on the major ExtJS version, these properties are introduced to make testing the environment easier.
ce302e8
to
306ea2c
Compare
b03849e
to
0a1da95
Compare
Replaced the old method of inlcuding local files with a copy of the include-ext.js from the ext-examples. It will now load sources from http://cdn.sencha.io. A little slower, but I think it's an enhancement, because a local Ext-Version will no longer be needed. The examples can now be loaded with the url param "extjs" to run either with 4.2.1 or 5.0.1 (maybe some other versions will work to). Default version is 5.0.1 if no param is passed. For example: foo/geoext2/examples/zoomslider/zoomslider.html?extjs=4.2.1 Some themes are only available in ExtJS4 (acces) or ExtJS5 (crisp/ crisp-touch/neptune-touch). So i made the options-toolbar (theme chooser) react on the param, too.
Agreed ...
... Agreed as well 😉 |
I just tested two of my productive applications which are more or less complex. Everything seems to be working. |
I tested one of our main and most complex application as well and everything seems to be working as expected. |
bb5cf40
to
f6cfb26
Compare
@marcjansen, I've tested it with the application I mentioned and I cannot find any regressions. |
Hi @bjornharrtell, |
Sounds good indeed, I pinged @bartvde, he'll have a look right now |
@@ -0,0 +1,101 @@ | |||
/** | |||
* Modified from ext-5.0.0/shared/include-ext.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What were the modifications and why were they needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They were minor:
- support query parameter 'extjs'
- default to 'neptune' theme, as this one exists in both
v4
andv5
- load the
debug
-variants of the resources
I'll add a commit explaining the differences.
nice and solid work, please merge when you get a chance to address my minor remarks |
As suggested by @bartvde: * Use `if/else` instead of `&&` when assigning variables * Use `me` instead of this
I added some commits addressing all the comments of @bartvde. I will merge this once travis is happy. |
Again: Thanks a lot to al those involved in this massive change! Will merge now. |
Support both ExtJS 4.2.1 and ExtJS 5.1.0
This PR makes GeoExt ready for working atop of ExtJS 4.2.1 or (at your choice) ExtJS 5.1.0.
The commit history is IMHO a little cleaner than the one of #274, but still it is a lot to review.
I'd be very glad if e.g. @bartvde, @chrismayer, @weskamm, @KaiVolland, @buehner, @dnlkoch, @bentrm, @hutzelknecht, @bjornharrtell, @annarieger & @juliensam had a look at the changes introduced here. Everybody else is invited to test this as well, of course. If you have any comments, just leave them in this PR.
This PR contains commits by @chrismayer, @KaiVolland and me. Thanks to everyone that was involved.
I will try to make reviewing this a little bit easier by giving some facts that possible reviewers may double check:
Some main changes, which may need another pair of eyes
?extjs=4.2.1
Specific changes that were needed:
GeoExt.isExt4
and its counterpartGeoExt.isExt5
for those parts where we need different code paths depending on the ExtJS version.addEvents
internally, but we only declare our events by documenting them, see e.g.src/GeoExt/FeatureRenderer.js
removeAllListeners
, but instead useclearListeners
GeoExt.container.VectorLegend
GeoExt.isExt4 ? 'raw' : 'data';
See e.g.src/GeoExt/data/FeatureStore.js
bind
. Instead more distinguishable names have been chosen. See e.g.src/GeoExt/data/LayerStore.js
loadRawData
method has different code paths for ExtJS 4 and 5. See e.g.src/GeoExt/data/LayerStore.js
src/GeoExt/data/OwsStore.js
readRecords
method (e.g. of the readers) now checks whether it gets called multiple times when the records already have been read and poscessed. See e.g.src/GeoExt/data/reader/Attribute.js
Other parts which may need special attention:
src/GeoExt/data/FeatureStore.js
see the comment in line 360ffsrc/GeoExt/data/LayerStore.js
see the comment in line 168ffsrc/GeoExt/data/proxy/Protocol.js
see the comment in line 58ff This should possibly have a follow up ticket. The same goes forsrc/GeoExt/data/reader/Attribute.js
line 106ff. Where a similar handling is donesrc/GeoExt/data/reader/Feature.js
the logic changed how we extract the record and create accesor.Other TODOs:
src/GeoExt/data/LayerTreeModel.js
&src/GeoExt/container/WmsLegend.js
which we want to have at one place. We can do this later.src/GeoExt/data/VectorStyleModel.js
has the logic of Version.js partly copyied. See line 62ff. We should check this again later.Again: It won't be easy to review this, but any feedback is very helpful.
Once we have this in
master
, we can start thinking about cooking av2.1.0-alpha.1
.