Skip to content
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 148 commits into from
Apr 7, 2015
Merged
Show file tree
Hide file tree
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 Jun 6, 2014
4dfa467
Let `loadRawData` fire load-event in ExtJS 4 & 5.
marcjansen Jun 6, 2014
c8abdab
Replace removeAllListeners w/ clearListeners.
marcjansen Jun 12, 2014
94724bf
Adjust access of raw data for Ext5 compatibility.
marcjansen Jun 11, 2014
cdb75aa
Make FeatureReader compatible w/ ExtJS 4/5.
marcjansen Jun 12, 2014
00dd4bb
Change inclusion method of ExtJS libs&resources
KaiVolland Jun 12, 2014
3f9afaf
Remove deprecated addEvents-call.
marcjansen Jun 12, 2014
83ce2c5
Adjust remove-handler to work with ExtJS 4 & 5.
marcjansen Jun 13, 2014
e742502
Add require for MapPanel layout.
marcjansen Jun 13, 2014
1d2a83c
Adjust Popup-example for ExtJS5 requirements.
marcjansen Jun 13, 2014
6659963
Ensure store.remove is called with array.
marcjansen Jun 23, 2014
dc8cab9
Adjust onFeatureModified for ExtJS 4 & 5.
marcjansen Jun 23, 2014
ddb89de
Use setters for compatibility with Ext 4 & 5.
marcjansen Jun 23, 2014
c51c488
Use getters when possible, adjust for Ext 5
marcjansen Jun 23, 2014
236aed1
Prevent against multiple read()-calls
marcjansen Jun 23, 2014
2c9ef36
Make loading of libraries in tests dynamic.
marcjansen Jun 23, 2014
36916df
Use utility script for dynamic library loading.
marcjansen Jun 23, 2014
0b72212
Use override to ensure Menus can be constructed.
marcjansen Jun 23, 2014
8d1ad8d
Remove end-of-line whitespace.
marcjansen Jun 23, 2014
7472ea0
Adjust event mockup
marcjansen Jun 23, 2014
907fa85
Show / hide test iframe.
marcjansen Jun 23, 2014
a34d3a6
Delay test-page loading / change hiding of iframe.
marcjansen Jun 23, 2014
839eef5
Load all testfile variants with Ext 4 and 5.
marcjansen Jun 23, 2014
65b8567
Create variable with URL to local image.
marcjansen Jun 23, 2014
c037861
Add local image to testfolder.
marcjansen Jun 23, 2014
f5b252b
Use variable with URL to local image.
marcjansen Jun 23, 2014
c8844ee
Adjust test for compatibility w/ ExtJS 5.
marcjansen Jun 23, 2014
b140a7b
Use getters in AttributeStore test.
marcjansen Jun 23, 2014
8eb5a14
Adjust access of raw data for Ext5 compatibility.
marcjansen Jun 24, 2014
dea3eb9
Correct wording of test message.
marcjansen Jun 24, 2014
1a2cdfe
Fix referencing of `map`-variable.
marcjansen Jun 24, 2014
c3a1c1c
Harmonize map-creation across examples.
marcjansen Jun 24, 2014
3522703
Remove deprecated addEvents-call.
marcjansen Jun 24, 2014
02dd738
More docs with regard to raw-property.
marcjansen Jun 24, 2014
3607ea7
Load variants when testing headless.
marcjansen Jun 24, 2014
eba74bb
Better error message format.
marcjansen Jun 24, 2014
80764d8
Remove commented code.
marcjansen Jun 24, 2014
e8f2322
Disable ExtJS 5 when running headless tests.
marcjansen Jun 24, 2014
7e1cb3b
Remove error-prone id for test components.
marcjansen Jun 24, 2014
9e30b0e
Handle multiple records in remove-event.
marcjansen Jun 24, 2014
b1f14b3
Better API-docs for private remove-handlers.
marcjansen Jun 24, 2014
736bb1b
Remove error-prone id for test components.
marcjansen Jun 24, 2014
670e9b8
Adjust test for compatibility w/ ExtJS 5.
marcjansen Jun 24, 2014
16bca0d
Adhere to stricter rules for itemId property.
marcjansen Jun 25, 2014
4b5c727
Move event documentation out of constructor.
marcjansen Jun 25, 2014
191f1c6
Use getProxyConfiguration to support Ext 4 & 5.
marcjansen Jun 25, 2014
e2a8448
Remove dangling whitespace.
marcjansen Jun 25, 2014
85ec41b
Fix typo in documentation.
marcjansen Jun 25, 2014
9f8dcb2
Handle multiple records in remove-event.
marcjansen Jun 25, 2014
ff65943
Tests for GeoExt.isExt4 & GeoExt.isExt5.
marcjansen Jun 25, 2014
1aa620a
Don't use fixed ids in test.
marcjansen Jun 27, 2014
e577f9f
Port printextent-example to ExtJS 5
KaiVolland Nov 11, 2014
10d8ff0
Fixed the test for PrintExtent
KaiVolland Nov 11, 2014
6e69b53
Rename bind and unbind functions in Slider classes
Nov 13, 2014
74b932f
ZoomSlider and LayerOpacitySlider tests for ExtJS5
Nov 13, 2014
a2a8052
Port printform-example to ExtJS 5
KaiVolland Nov 11, 2014
f125311
Port printpreview-example to ExtJS 5
KaiVolland Nov 12, 2014
0809c73
Port renderer-example to ExtJS 5.0.1
KaiVolland Nov 12, 2014
a479466
Use ExtJS utility methods.
KaiVolland Nov 12, 2014
00c47e3
Port stylegrid-example to ExtJS 5
KaiVolland Nov 12, 2014
230fe4b
Port wfscapabilities-example to ExtJS 5
KaiVolland Nov 13, 2014
0bb5a9f
Port wmscapabilities-example to ExtJS 5
KaiVolland Nov 13, 2014
d1f3b75
Port tree-example to ExtJS 5
KaiVolland Nov 18, 2014
2546bad
Rename bind and unbind functions in LayerStore
KaiVolland Nov 18, 2014
176a5b8
Adhere to stricter rules for itemId property
KaiVolland Nov 18, 2014
a71e7fb
Cleaned constructor arguments
KaiVolland Nov 18, 2014
31985b8
Add TODO wrt missing method afterEdit
KaiVolland Nov 18, 2014
7ad323c
Handle multiple records in remove-event.
KaiVolland Nov 18, 2014
d5633a9
Minor cleanups (Readability, Ext-Methods, ...)
KaiVolland Nov 18, 2014
eb7658d
fixed test for LayerStore
KaiVolland Nov 18, 2014
6034042
Made the printextent-example backwards compatible
KaiVolland Nov 18, 2014
288cf0b
Remove dangling whitespace
KaiVolland Jan 30, 2015
c7987bf
Adjust protocol proxy for Ext JS 5
KaiVolland Jan 30, 2015
9eb8f2a
Use setters for models in reader classes
KaiVolland Jan 30, 2015
5bf24b7
Rename bind and unbind functions in FeatureModel
KaiVolland Jan 30, 2015
e835827
Adjust proxy protocol test for ExtJS5
KaiVolland Jan 30, 2015
8811f00
Adjust attribute reader test for ExtJS5
KaiVolland Jan 30, 2015
2d3fc12
Adjust column symbolizer test for ExtJS5
KaiVolland Jan 30, 2015
0fff213
FIXUP Rename bind and unbind functions in FeatureModel
marcjansen Jan 30, 2015
97e052d
Adjust layer container test for ExtJS5
KaiVolland Jan 30, 2015
ea8fd32
Using the new lib-inclusion method for the tests
KaiVolland Jan 30, 2015
5e890b0
Changed inclusion method for the headless tests
KaiVolland Nov 24, 2014
9d91d87
Refer to correct version when explaining loading.
marcjansen Nov 24, 2014
3fb5818
Fix the failing test in v.4 and v.5
marcjansen Nov 24, 2014
fa31ca7
Fixed the test for attribute reader
KaiVolland Nov 25, 2014
f15d54a
Fixed the test for data/reader/WfsCapabilities.js
KaiVolland Dec 9, 2014
c0fd017
Changed the form/Basic Test
KaiVolland Dec 16, 2014
a16d2e9
Fixed selection/FeatureModel test
KaiVolland Dec 16, 2014
4039023
ExtJS 5.1.0 Support
KaiVolland Dec 17, 2014
0c24045
Use ExtJS 5.1.0 in tests.
marcjansen Jan 10, 2015
1beff37
Use beforedestroy for internal cleanup logic.
marcjansen Jan 10, 2015
5cfc3e5
Call the constructor of the mixin in ExtJS 5.
marcjansen Jan 10, 2015
2e07162
Use getTotal when testing result of read in Ext5.
marcjansen Jan 10, 2015
b5613c3
Use preserveRawData in readers.
marcjansen Jan 11, 2015
30647c6
Make tree compatible to ExtJS 5
chrismayer Jan 10, 2015
9e29bb5
Adapt tests for tree/LayerContainer to work w/ ExtJS 4 and 5
chrismayer Jan 13, 2015
8ed2138
Refactor protocol proxy to support ExtJS 4 and 5.
marcjansen Jan 14, 2015
19faf3f
Be more cautious when setting zIndex of subitems.
marcjansen Jan 15, 2015
f0cf9d4
Pass config as array when calling parent method.
marcjansen Jan 16, 2015
12f89dd
Harmonize the initConfig overwrite and docs.
marcjansen Jan 19, 2015
ca89e28
Load ExtJS 5.1.0 in headless tests.
marcjansen Jan 19, 2015
c333035
Round width/height when syncing the size.
marcjansen Jan 22, 2015
48b3692
Default to v5.1.0 when loading ExtJS.
marcjansen Jan 30, 2015
3eea6d6
Add API docs for own events.
marcjansen Jan 30, 2015
5739865
Remove unused utility script.
marcjansen Jan 30, 2015
53b34fd
Rename bind and unbind functions in FeatureModel
KaiVolland Jan 30, 2015
d1a6c27
Adjust proxy protocol test for ExtJS5
KaiVolland Jan 30, 2015
2083e5b
Adjust attribute reader test for ExtJS5
KaiVolland Jan 30, 2015
6450bf6
Adjust column symbolizer test for ExtJS5
KaiVolland Jan 30, 2015
cbb7441
Adjust layer container test for ExtJS5
KaiVolland Jan 30, 2015
4105ffa
Using the new lib-inclusion method for the tests
KaiVolland Jan 30, 2015
b216e14
Changed inclusion method for the headless tests
KaiVolland Nov 24, 2014
1cb4d67
Refer to correct version when explaining loading.
marcjansen Nov 24, 2014
4be2801
Fix the failing test in v.4 and v.5
marcjansen Nov 24, 2014
047bba2
Fixed the test for attribute reader
KaiVolland Nov 25, 2014
4170bd0
Fixed the test for data/reader/WfsCapabilities.js
KaiVolland Dec 9, 2014
78efd4c
Changed the form/Basic Test
KaiVolland Dec 16, 2014
d809ded
Fixed selection/FeatureModel test
KaiVolland Dec 16, 2014
36a34f6
ExtJS 5.1.0 Support
KaiVolland Dec 17, 2014
bbfe6f2
Use ExtJS 5.1.0 in tests.
marcjansen Jan 10, 2015
4800b36
Use beforedestroy for internal cleanup logic.
marcjansen Jan 10, 2015
46cbeb3
Call the constructor of the mixin in ExtJS 5.
marcjansen Jan 10, 2015
67ef30c
Use getTotal when testing result of read in Ext5.
marcjansen Jan 10, 2015
a6bf83f
Use preserveRawData in readers.
marcjansen Jan 11, 2015
771aa52
Make tree compatible to ExtJS 5
chrismayer Jan 10, 2015
0c375fe
Adapt tests for tree/LayerContainer to work w/ ExtJS 4 and 5
chrismayer Jan 13, 2015
d9e0c8e
Refactor protocol proxy to support ExtJS 4 and 5.
marcjansen Jan 14, 2015
a71b242
Be more cautious when setting zIndex of subitems.
marcjansen Jan 15, 2015
b34e702
Pass config as array when calling parent method.
marcjansen Jan 16, 2015
effef88
Harmonize the initConfig overwrite and docs.
marcjansen Jan 19, 2015
693342f
Load ExtJS 5.1.0 in headless tests.
marcjansen Jan 19, 2015
ba3f00b
Round width/height when syncing the size.
marcjansen Jan 22, 2015
577b345
Default to v5.1.0 when loading ExtJS.
marcjansen Jan 30, 2015
82c8612
Add API docs for own events.
marcjansen Jan 30, 2015
430d6fd
Remove unused utility script.
marcjansen Jan 30, 2015
1275ea0
Merge branch 'master' of https://github.com/geoext/geoext2 into merge…
marcjansen Mar 20, 2015
965ff71
Merge branch 'mergeable-extjs5' of https://github.com/marcjansen/geoe…
marcjansen Mar 20, 2015
ad0ce0d
The default for the options bar is 5.1.0.
marcjansen Mar 20, 2015
225e15e
Remove stray comma.
marcjansen Mar 21, 2015
7c25faa
Use the ExtJS loader in all examples.
marcjansen Mar 21, 2015
36de5ff
Add package description to make testing easier.
marcjansen Mar 25, 2015
f6cfb26
Simplify travis build configuration.
marcjansen Mar 25, 2015
281a517
Explain the changes to include-ext.js.
marcjansen Apr 7, 2015
fb067a9
Add missing semicolons and a TODO.
marcjansen Apr 7, 2015
e95eae9
Fix typo in comment, reformat TODO.
marcjansen Apr 7, 2015
986487a
Clarify comment.
marcjansen Apr 7, 2015
16f920e
Refactor FeatureModel::bindComponent.
marcjansen Apr 7, 2015
ef5bf1c
Make tree utility methods public and add docs.
marcjansen Apr 7, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions .travis.yml
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
28 changes: 13 additions & 15 deletions examples/action/mappanel_with_actions.html
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>
2 changes: 1 addition & 1 deletion examples/action/mappanel_with_actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Ext.application({
name: 'ActionExample',
launch: function(){

var map = new OpenLayers.Map({});
var map = new OpenLayers.Map({allOverlays: true, fallThrough: true});
map.addControl(new OpenLayers.Control.LayerSwitcher());
var wms = new OpenLayers.Layer.WMS(
"OpenStreetMap WMS",
Expand Down
2 changes: 1 addition & 1 deletion examples/app/simple/app/view/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Ext.define('CF.view.Map', {
items = [],
ctrl;

var map = new OpenLayers.Map();
var map = new OpenLayers.Map({allOverlays: true, fallThrough: true});

// ZoomToMaxExtent control, a "button" control
items.push(Ext.create('Ext.button.Button', Ext.create('GeoExt.Action', {
Expand Down
9 changes: 3 additions & 6 deletions examples/geocoder/geocoder.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@
<title>GeoExt GeocoderComboBox Example</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>
<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" />

<!-- 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="geocoder.js"></script>

</head>
<body>
<h1>GeoExt.form.field.GeocoderComboBox</h1>
Expand Down
8 changes: 3 additions & 5 deletions examples/grid/feature-grid-w-proxy.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@
<title>GeoExt WFS FeatureStore in an Ext Grid</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>
<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" />

<style>
div.olControlAttribution {
background-color: rgb(237,237,237);
Expand Down
7 changes: 2 additions & 5 deletions examples/grid/feature-grid.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@
<title>GeoExt FeatureStore in an Ext Grid</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>
<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" />

Expand All @@ -17,7 +15,6 @@

<script type="text/javascript" src="../loader.js"></script>
<script type="text/javascript" src="feature-grid.js"></script>

</head>
<body>
<h1>Grid Panel configured with a GeoExt.data.FeatureStore</h1>
Expand Down
11 changes: 6 additions & 5 deletions examples/grid/feature-grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Ext.application({
name: 'Feature Grid - GeoExt2',
launch: function() {
// create map instance
var map = new OpenLayers.Map();
var map = new OpenLayers.Map({allOverlays: true, fallThrough: true});
var wmsLayer = new OpenLayers.Layer.WMS(
"OpenStreetMap WMS",
"http://ows.terrestris.de/osm/service?",
Expand Down Expand Up @@ -93,13 +93,14 @@ Ext.application({
{
name: 'symbolizer',
convert: function(v, r) {
return r.raw.layer.styleMap.createSymbolizer(r.raw, 'default');
var dataKey = GeoExt.isExt4 ? 'raw' : 'data',
data = r[dataKey];
return data.layer.styleMap.createSymbolizer(data, 'default');
}
},
{name: 'name', type: 'string'},
{name: 'elevation', type: 'float'}
],
autoLoad: true
]
});

// create grid panel configured with feature store
Expand All @@ -114,7 +115,7 @@ Ext.application({
width: 30,
xtype: 'gx_symbolizercolumn',
dataIndex: "symbolizer"
},{
}, {
header: "Name",
width: 200,
dataIndex: "name"
Expand Down
101 changes: 101 additions & 0 deletions examples/include-ext.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
/**
* Modified from ext-5.0.0/shared/include-ext.js
Copy link
Member

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?

Copy link
Member Author

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 and v5
  • load the debug-variants of the resources

I'll add a commit explaining the differences.

*
* 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>');
}
}

})();
12 changes: 5 additions & 7 deletions examples/layeropacityslider/layeropacityslider.html
Original file line number Diff line number Diff line change
@@ -1,28 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<title>GeoExt LayerOpacitySlider</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>
<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" />

<!-- 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="layeropacityslider.js"></script>

<style type="text/css">
.x-tree-node-leaf .gx-tree-layer-icon {
width: 0px;
}
</style>

<script type="text/javascript" src="layeropacityslider.js"></script>
</head>
<body>
<h1>GeoExt.LayerOpacitySlider</h1>
Expand Down
21 changes: 9 additions & 12 deletions examples/legendpanel/legendpanel.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,25 @@
<title>GeoExt Legend Panel</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>
<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" />

<!-- 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="legendpanel.js"></script>

<style type="text/css">
.mylabel {
font-weight: bold;
color: red;
display: block;
width: 100%;
}

.mylabel {
font-weight: bold;
color: red;
display: block;
width: 100%;
}
</style>
</head>
<body>
Expand Down
4 changes: 1 addition & 3 deletions examples/legendpanel/legendpanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ Ext.require([
Ext.application({
name: 'LegendPanel GeoExt2',
launch: function() {
var map = new OpenLayers.Map({
allOverlays: true
});
var map = new OpenLayers.Map({allOverlays: true, fallThrough: true});
map.addLayers([
new OpenLayers.Layer.WMS(
"OpenStreetMap WMS",
Expand Down
3 changes: 1 addition & 2 deletions examples/loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ Ext.Loader.setConfig({
enabled: true,
disableCaching: false,
paths: {
GeoExt: "../../src/GeoExt",
Ext: "http://cdn.sencha.com/ext/gpl/4.2.1/src"
GeoExt: "../../src/GeoExt"
}
});
Loading