-
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
Merged
Merged
Changes from 142 commits
Commits
Show all changes
148 commits
Select commit
Hold shift + click to select a range
8b0c35c
Introduce `GeoExt.isExt4` & `GeoExt.isExt5`.
marcjansen 4dfa467
Let `loadRawData` fire load-event in ExtJS 4 & 5.
marcjansen c8abdab
Replace removeAllListeners w/ clearListeners.
marcjansen 94724bf
Adjust access of raw data for Ext5 compatibility.
marcjansen cdb75aa
Make FeatureReader compatible w/ ExtJS 4/5.
marcjansen 00dd4bb
Change inclusion method of ExtJS libs&resources
KaiVolland 3f9afaf
Remove deprecated addEvents-call.
marcjansen 83ce2c5
Adjust remove-handler to work with ExtJS 4 & 5.
marcjansen e742502
Add require for MapPanel layout.
marcjansen 1d2a83c
Adjust Popup-example for ExtJS5 requirements.
marcjansen 6659963
Ensure store.remove is called with array.
marcjansen dc8cab9
Adjust onFeatureModified for ExtJS 4 & 5.
marcjansen ddb89de
Use setters for compatibility with Ext 4 & 5.
marcjansen c51c488
Use getters when possible, adjust for Ext 5
marcjansen 236aed1
Prevent against multiple read()-calls
marcjansen 2c9ef36
Make loading of libraries in tests dynamic.
marcjansen 36916df
Use utility script for dynamic library loading.
marcjansen 0b72212
Use override to ensure Menus can be constructed.
marcjansen 8d1ad8d
Remove end-of-line whitespace.
marcjansen 7472ea0
Adjust event mockup
marcjansen 907fa85
Show / hide test iframe.
marcjansen a34d3a6
Delay test-page loading / change hiding of iframe.
marcjansen 839eef5
Load all testfile variants with Ext 4 and 5.
marcjansen 65b8567
Create variable with URL to local image.
marcjansen c037861
Add local image to testfolder.
marcjansen f5b252b
Use variable with URL to local image.
marcjansen c8844ee
Adjust test for compatibility w/ ExtJS 5.
marcjansen b140a7b
Use getters in AttributeStore test.
marcjansen 8eb5a14
Adjust access of raw data for Ext5 compatibility.
marcjansen dea3eb9
Correct wording of test message.
marcjansen 1a2cdfe
Fix referencing of `map`-variable.
marcjansen c3a1c1c
Harmonize map-creation across examples.
marcjansen 3522703
Remove deprecated addEvents-call.
marcjansen 02dd738
More docs with regard to raw-property.
marcjansen 3607ea7
Load variants when testing headless.
marcjansen eba74bb
Better error message format.
marcjansen 80764d8
Remove commented code.
marcjansen e8f2322
Disable ExtJS 5 when running headless tests.
marcjansen 7e1cb3b
Remove error-prone id for test components.
marcjansen 9e30b0e
Handle multiple records in remove-event.
marcjansen b1f14b3
Better API-docs for private remove-handlers.
marcjansen 736bb1b
Remove error-prone id for test components.
marcjansen 670e9b8
Adjust test for compatibility w/ ExtJS 5.
marcjansen 16bca0d
Adhere to stricter rules for itemId property.
marcjansen 4b5c727
Move event documentation out of constructor.
marcjansen 191f1c6
Use getProxyConfiguration to support Ext 4 & 5.
marcjansen e2a8448
Remove dangling whitespace.
marcjansen 85ec41b
Fix typo in documentation.
marcjansen 9f8dcb2
Handle multiple records in remove-event.
marcjansen ff65943
Tests for GeoExt.isExt4 & GeoExt.isExt5.
marcjansen 1aa620a
Don't use fixed ids in test.
marcjansen e577f9f
Port printextent-example to ExtJS 5
KaiVolland 10d8ff0
Fixed the test for PrintExtent
KaiVolland 6e69b53
Rename bind and unbind functions in Slider classes
74b932f
ZoomSlider and LayerOpacitySlider tests for ExtJS5
a2a8052
Port printform-example to ExtJS 5
KaiVolland f125311
Port printpreview-example to ExtJS 5
KaiVolland 0809c73
Port renderer-example to ExtJS 5.0.1
KaiVolland a479466
Use ExtJS utility methods.
KaiVolland 00c47e3
Port stylegrid-example to ExtJS 5
KaiVolland 230fe4b
Port wfscapabilities-example to ExtJS 5
KaiVolland 0bb5a9f
Port wmscapabilities-example to ExtJS 5
KaiVolland d1f3b75
Port tree-example to ExtJS 5
KaiVolland 2546bad
Rename bind and unbind functions in LayerStore
KaiVolland 176a5b8
Adhere to stricter rules for itemId property
KaiVolland a71e7fb
Cleaned constructor arguments
KaiVolland 31985b8
Add TODO wrt missing method afterEdit
KaiVolland 7ad323c
Handle multiple records in remove-event.
KaiVolland d5633a9
Minor cleanups (Readability, Ext-Methods, ...)
KaiVolland eb7658d
fixed test for LayerStore
KaiVolland 6034042
Made the printextent-example backwards compatible
KaiVolland 288cf0b
Remove dangling whitespace
KaiVolland c7987bf
Adjust protocol proxy for Ext JS 5
KaiVolland 9eb8f2a
Use setters for models in reader classes
KaiVolland 5bf24b7
Rename bind and unbind functions in FeatureModel
KaiVolland e835827
Adjust proxy protocol test for ExtJS5
KaiVolland 8811f00
Adjust attribute reader test for ExtJS5
KaiVolland 2d3fc12
Adjust column symbolizer test for ExtJS5
KaiVolland 0fff213
FIXUP Rename bind and unbind functions in FeatureModel
marcjansen 97e052d
Adjust layer container test for ExtJS5
KaiVolland ea8fd32
Using the new lib-inclusion method for the tests
KaiVolland 5e890b0
Changed inclusion method for the headless tests
KaiVolland 9d91d87
Refer to correct version when explaining loading.
marcjansen 3fb5818
Fix the failing test in v.4 and v.5
marcjansen fa31ca7
Fixed the test for attribute reader
KaiVolland f15d54a
Fixed the test for data/reader/WfsCapabilities.js
KaiVolland c0fd017
Changed the form/Basic Test
KaiVolland a16d2e9
Fixed selection/FeatureModel test
KaiVolland 4039023
ExtJS 5.1.0 Support
KaiVolland 0c24045
Use ExtJS 5.1.0 in tests.
marcjansen 1beff37
Use beforedestroy for internal cleanup logic.
marcjansen 5cfc3e5
Call the constructor of the mixin in ExtJS 5.
marcjansen 2e07162
Use getTotal when testing result of read in Ext5.
marcjansen b5613c3
Use preserveRawData in readers.
marcjansen 30647c6
Make tree compatible to ExtJS 5
chrismayer 9e29bb5
Adapt tests for tree/LayerContainer to work w/ ExtJS 4 and 5
chrismayer 8ed2138
Refactor protocol proxy to support ExtJS 4 and 5.
marcjansen 19faf3f
Be more cautious when setting zIndex of subitems.
marcjansen f0cf9d4
Pass config as array when calling parent method.
marcjansen 12f89dd
Harmonize the initConfig overwrite and docs.
marcjansen ca89e28
Load ExtJS 5.1.0 in headless tests.
marcjansen c333035
Round width/height when syncing the size.
marcjansen 48b3692
Default to v5.1.0 when loading ExtJS.
marcjansen 3eea6d6
Add API docs for own events.
marcjansen 5739865
Remove unused utility script.
marcjansen 53b34fd
Rename bind and unbind functions in FeatureModel
KaiVolland d1a6c27
Adjust proxy protocol test for ExtJS5
KaiVolland 2083e5b
Adjust attribute reader test for ExtJS5
KaiVolland 6450bf6
Adjust column symbolizer test for ExtJS5
KaiVolland cbb7441
Adjust layer container test for ExtJS5
KaiVolland 4105ffa
Using the new lib-inclusion method for the tests
KaiVolland b216e14
Changed inclusion method for the headless tests
KaiVolland 1cb4d67
Refer to correct version when explaining loading.
marcjansen 4be2801
Fix the failing test in v.4 and v.5
marcjansen 047bba2
Fixed the test for attribute reader
KaiVolland 4170bd0
Fixed the test for data/reader/WfsCapabilities.js
KaiVolland 78efd4c
Changed the form/Basic Test
KaiVolland d809ded
Fixed selection/FeatureModel test
KaiVolland 36a34f6
ExtJS 5.1.0 Support
KaiVolland bbfe6f2
Use ExtJS 5.1.0 in tests.
marcjansen 4800b36
Use beforedestroy for internal cleanup logic.
marcjansen 46cbeb3
Call the constructor of the mixin in ExtJS 5.
marcjansen 67ef30c
Use getTotal when testing result of read in Ext5.
marcjansen a6bf83f
Use preserveRawData in readers.
marcjansen 771aa52
Make tree compatible to ExtJS 5
chrismayer 0c375fe
Adapt tests for tree/LayerContainer to work w/ ExtJS 4 and 5
chrismayer d9e0c8e
Refactor protocol proxy to support ExtJS 4 and 5.
marcjansen a71b242
Be more cautious when setting zIndex of subitems.
marcjansen b34e702
Pass config as array when calling parent method.
marcjansen effef88
Harmonize the initConfig overwrite and docs.
marcjansen 693342f
Load ExtJS 5.1.0 in headless tests.
marcjansen ba3f00b
Round width/height when syncing the size.
marcjansen 577b345
Default to v5.1.0 when loading ExtJS.
marcjansen 82c8612
Add API docs for own events.
marcjansen 430d6fd
Remove unused utility script.
marcjansen 1275ea0
Merge branch 'master' of https://github.com/geoext/geoext2 into merge…
marcjansen 965ff71
Merge branch 'mergeable-extjs5' of https://github.com/marcjansen/geoe…
marcjansen ad0ce0d
The default for the options bar is 5.1.0.
marcjansen 225e15e
Remove stray comma.
marcjansen 7c25faa
Use the ExtJS loader in all examples.
marcjansen 36de5ff
Add package description to make testing easier.
marcjansen f6cfb26
Simplify travis build configuration.
marcjansen 281a517
Explain the changes to include-ext.js.
marcjansen fb067a9
Add missing semicolons and a TODO.
marcjansen e95eae9
Fix typo in comment, reformat TODO.
marcjansen 986487a
Clarify comment.
marcjansen 16f920e
Refactor FeatureModel::bindComponent.
marcjansen ef5bf1c
Make tree utility methods public and add docs.
marcjansen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
language: node_js | ||
node_js: 0.10 | ||
# installs dependencies for testing | ||
install: npm install -g [email protected] | ||
# command to run tests | ||
script: casperjs test tests/headless/run-testsuite.js | ||
node_js: | ||
- node | ||
- iojs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,11 +139,11 @@ prior to submitting your changes. Thanks. | |
You can also run the above tests headlessly through casperjs. | ||
|
||
```bash | ||
# Install casperjs via npm in the GeoExt 2 clone dir (only first time) | ||
npm install [email protected] | ||
# Install dependencies via npm in the GeoExt 2 clone dir (only first time) | ||
npm install | ||
|
||
# Run the suite in the root of the repository | ||
./node_modules/casperjs/bin/casperjs test tests/headless/run-testsuite.js | ||
npm test | ||
``` | ||
|
||
These tests are also run though [travis](https://travis-ci.org/geoext/geoext2). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,20 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>GeoExt2 - Action</title> | ||
<head> | ||
<title>GeoExt2 - Action</title> | ||
|
||
<!-- ExtJS --> | ||
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/include-ext.js"></script> | ||
<script type="text/javascript" src="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/options-toolbar.js"></script> | ||
<!-- ExtJS --> | ||
<script type="text/javascript" src="../include-ext.js"></script> | ||
<script type="text/javascript" src="../options-toolbar.js"></script> | ||
|
||
<!-- Shared --> | ||
<link rel="stylesheet" type="text/css" href="http://cdn.sencha.com/ext/gpl/4.2.1/examples/shared/example.css" /> | ||
<!-- Basic example styling --> | ||
<link rel="stylesheet" type="text/css" href="../shared/example.css" /> | ||
<!-- Basic example styling --> | ||
<link rel="stylesheet" type="text/css" href="../shared/example.css" /> | ||
|
||
<!-- You should definitely consider using a custom single-file version of OpenLayers --> | ||
<script src="http://openlayers.org/api/2.13.1/OpenLayers.js"></script> | ||
<!-- You should definitely consider using a custom single-file version of OpenLayers --> | ||
<script src="http://openlayers.org/api/2.13.1/OpenLayers.js"></script> | ||
|
||
<script type="text/javascript" src="../loader.js"></script> | ||
<script type="text/javascript" src="mappanel_with_actions.js"></script> | ||
</head> | ||
<body></body> | ||
<script type="text/javascript" src="../loader.js"></script> | ||
<script type="text/javascript" src="mappanel_with_actions.js"></script> | ||
</head> | ||
<body></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
/** | ||
* Modified from ext-5.0.0/shared/include-ext.js | ||
* | ||
* This file includes the required ext-all js and css files based upon "theme" and "rtl" | ||
* url parameters. It first searches for these parameters on the page url, and if they | ||
* are not found there, it looks for them on the script tag src query string. | ||
* For example, to include the neptune flavor of ext from an index page in a subdirectory | ||
* of extjs/examples/: | ||
* <script type="text/javascript" src="../../examples/shared/include-ext.js?theme=neptune"></script> | ||
*/ | ||
(function() { | ||
function getQueryParam(name) { | ||
var regex = RegExp('[?&]' + name + '=([^&]*)'); | ||
|
||
var match = regex.exec(location.search) || regex.exec(path); | ||
return match && decodeURIComponent(match[1]); | ||
} | ||
|
||
function hasOption(opt, queryString) { | ||
var s = queryString || location.search; | ||
var re = new RegExp('(?:^|[&?])' + opt + '(?:[=]([^&]*))?(?:$|[&])', 'i'); | ||
var m = re.exec(s); | ||
|
||
return m ? (m[1] === undefined || m[1] === '' ? true : m[1]) : false; | ||
} | ||
|
||
function getCookieValue(name){ | ||
var cookies = document.cookie.split('; '), | ||
i = cookies.length, | ||
cookie, value; | ||
|
||
while(i--) { | ||
cookie = cookies[i].split('='); | ||
if (cookie[0] === name) { | ||
value = cookie[1]; | ||
} | ||
} | ||
|
||
return value; | ||
} | ||
|
||
var scriptEls = document.getElementsByTagName('script'), | ||
v = getQueryParam('extjs') ? getQueryParam('extjs') : '5.1.0', | ||
basePath = 'http://cdn.sencha.com/ext/gpl/'+ v, | ||
path = (v[0] == 4) ? basePath : basePath + '/build', | ||
rtl = getQueryParam('rtl'), | ||
theme = getQueryParam('theme') || 'neptune', | ||
includeCSS = !hasOption('nocss', path), | ||
hasOverrides = !hasOption('nooverrides', path) && !!{ | ||
// TODO: remove neptune | ||
neptune: 1, | ||
classic: 1, | ||
gray: 1, | ||
'neptune-touch': 1, | ||
crisp: 1, | ||
'crisp-touch': 1 | ||
}[theme], | ||
repoDevMode = getCookieValue('ExtRepoDevMode'), | ||
packagePath, | ||
themePath, | ||
i = 3, | ||
overridePath; | ||
|
||
rtl = rtl && rtl.toString() === 'true'; | ||
|
||
theme = 'ext-theme-' + theme; | ||
packagePath = path + '/packages/' + theme + '/build/'; | ||
themePath = packagePath + 'resources/' + theme + (rtl ? '-all-rtl' : '-all'); | ||
|
||
if (includeCSS) { | ||
document.write('<link rel="stylesheet" type="text/css" href="' + | ||
themePath + '-debug.css"/>'); | ||
} | ||
|
||
document.write('<script type="text/javascript" src="' + path + '/ext-all' + | ||
(rtl ? '-rtl' : '') + '-debug.js"></script>'); | ||
|
||
if (hasOverrides) { | ||
// since document.write('<script>') does not block execution in IE, we need to | ||
// makes sure we prevent ext-theme-neptune.js from executing before ext-all.js | ||
// normally this can be done using the defer attribute on the script tag, however | ||
// this method does not work in IE when in repoDevMode. It seems the reason for | ||
// this is because in repoDevMode ext-all.js is simply a script that loads other | ||
// scripts and so Ext is still undefined when the neptune overrides are executed. | ||
// To work around this we use the _beforereadyhandler hook to load the neptune | ||
// overrides dynamically after Ext has been defined. | ||
overridePath = packagePath + theme + (repoDevMode ? '-debug' : '') + '.js'; | ||
|
||
if (repoDevMode && window.ActiveXObject) { | ||
Ext = { | ||
_beforereadyhandler: function() { | ||
Ext.Loader.loadScript({ url: overridePath }); | ||
} | ||
}; | ||
} else { | ||
document.write('<script type="text/javascript" src="' + | ||
overridePath + '" defer></script>'); | ||
} | ||
} | ||
|
||
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
v4
andv5
debug
-variants of the resourcesI'll add a commit explaining the differences.