source:
trunk/workshop-routing-foss4g/web/GeoExt/docs/_static/examples.js
@
78
Revision 76, 708 bytes checked in by djay, 13 years ago (diff) | |
---|---|
|
Line | |
---|---|
1 | Ext.onReady(function() { |
2 | var blocks = Ext.select("div.exampleblock"); |
3 | var loc = window.location.href; |
4 | var exbase = "../examples/" |
5 | if (/^http:\/\/(www\.)?geoext.org\/examples.html/.test(loc)) { |
6 | exbase = "http://api.geoext.org/" + docversion + "/examples/"; |
7 | } else if (/^http:\/\/dev.geoext.org\/docs\/examples.html/.test(loc)) { |
8 | exbase = "http://dev.geoext.org/trunk/geoext/examples/"; |
9 | } |
10 | blocks.each(function(el) { |
11 | el.wrap({ |
12 | tag: "a", |
13 | href: el.first().id.replace( |
14 | /^example-(.*)/, |
15 | exbase + "$1.html" |
16 | ), |
17 | cls: "examplelink", |
18 | target: "_blank" |
19 | }); |
20 | }); |
21 | }); |
Note: See TracBrowser
for help on using the repository browser.