[Commits] r2181 - in sandbox/cmoullet/ux/OpenAddressesSearchCombo: examples lib lib/GeoExt.ux lib/GeoExt.ux.openaddresses tests tests/lib tests/lib/GeoExt.ux tests/lib/GeoExt.ux.openaddresses
commits at geoext.org
commits at geoext.org
Wed May 12 12:19:18 CEST 2010
Author: elemoine
Date: 2010-05-12 12:19:18 +0200 (Wed, 12 May 2010)
New Revision: 2181
Added:
sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux/
sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux/OpenAddressesSearchCombo.js
sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux/
sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux/OpenAddressesSearchCombo.html
Removed:
sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.js
sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.html
Modified:
sandbox/cmoullet/ux/OpenAddressesSearchCombo/examples/OpenAddressesSearchComboExample.html
sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/list-tests.html
Log:
change namespace of OpenAddressesSearchCombo from GeoExt.ux.openaddresses to GeoExt.ux
Modified: sandbox/cmoullet/ux/OpenAddressesSearchCombo/examples/OpenAddressesSearchComboExample.html
===================================================================
--- sandbox/cmoullet/ux/OpenAddressesSearchCombo/examples/OpenAddressesSearchComboExample.html 2010-05-12 06:44:26 UTC (rev 2180)
+++ sandbox/cmoullet/ux/OpenAddressesSearchCombo/examples/OpenAddressesSearchComboExample.html 2010-05-12 10:19:18 UTC (rev 2181)
@@ -9,7 +9,7 @@
<link rel="stylesheet" type="text/css" href="http://svn.geoext.org/ext/3.1.0/examples/shared/examples.css" />
<script type="text/javascript" src="../../../trunk/openlayers/lib/OpenLayers.js"></script>
<script type="text/javascript" src="../../../trunk/geoext/lib/GeoExt.js"></script>
- <script type="text/javascript" src="../lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.js"></script>
+ <script type="text/javascript" src="../lib/GeoExt.ux/OpenAddressesSearchCombo.js"></script>
<script type="text/javascript" src="OpenAddressesSearchComboExample.js"></script>
</head>
Copied: sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux/OpenAddressesSearchCombo.js (from rev 2176, sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.js)
===================================================================
--- sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux/OpenAddressesSearchCombo.js (rev 0)
+++ sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux/OpenAddressesSearchCombo.js 2010-05-12 10:19:18 UTC (rev 2181)
@@ -0,0 +1,142 @@
+/**
+ * Copyright (c) 2008-2009 The Open Source Geospatial Foundation
+ *
+ * Published under the BSD license.
+ * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
+ * of the license.
+ */
+
+/** api: (define)
+ * module = GeoExt.ux
+ * class = OpenAddressesSearchCombo
+ * base_link = `Ext.form.ComboBox <http://extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox>`_
+ */
+
+Ext.namespace("GeoExt.ux");
+
+GeoExt.ux.OpenAddressesSearchCombo = Ext.extend(Ext.form.ComboBox, {
+ /** api: config[map]
+ * ``OpenLayers.Map or Object`` A configured map or a configuration object
+ * for the map constructor, required only if :attr:`zoom` is set to
+ * value greater than or equal to 0.
+ */
+ /** private: property[map]
+ * ``OpenLayers.Map`` The map object.
+ */
+ map: null,
+
+ /** api: config[width]
+ * See http://www.extjs.com/deploy/dev/docs/source/BoxComponent.html#cfg-Ext.BoxComponent-width,
+ * default value is 350.
+ */
+ width: 350,
+
+ /** api: config[listWidth]
+ * See http://www.extjs.com/deploy/dev/docs/source/Combo.html#cfg-Ext.form.ComboBox-listWidth,
+ * default value is 350.
+ */
+ listWidth: 350,
+
+ /** api: config[zoom]
+ * ``Number`` Zoom level for recentering the map after search, if set to
+ * a negative number the map isn't recentered, defaults to 8.
+ */
+ /** private: property[zoom]
+ * ``Number``
+ */
+ zoom: 18,
+
+ /** api: config[minChars]
+ * ``Number`` Minimum number of characters to be typed before
+ * search occurs, defaults to 1.
+ */
+ minChars: 1,
+
+ /** api: config[queryDelay]
+ * ``Number`` Delay before the search occurs, defaults to 50 ms.
+ */
+ queryDelay: 50,
+
+ /** api: config[maxRows]
+ * `String` The maximum number of rows in the responses, defaults to 20,
+ * maximum allowed value is 1000.
+ * See: http://www.geonames.org/export/geonames-search.html
+ */
+ /** private: property[maxRows]
+ * ``String``
+ */
+ maxRows: '20',
+
+ /** api: config[tpl]
+ * ``Ext.XTemplate or String`` Template for presenting the result in the
+ * list (see http://www.extjs.com/deploy/dev/docs/output/Ext.XTemplate.html),
+ * if not set a default value is provided.
+ */
+ tpl: '<tpl for="."><div class="x-combo-list-item">{street} {housenumber}, {city}</div></tpl>',
+
+ /** api: config[lang]
+ * ``String`` Place name and country name will be returned in the specified
+ * language. Default is English (en).
+ */
+ /** private: property[lang]
+ * ``String``
+ */
+ lang: 'en',
+
+ /** private: property[hideTrigger]
+ * Hide trigger of the combo.
+ */
+ hideTrigger: true,
+
+ /** private: property[url]
+ * Url of the OpenAddresses service
+ */
+ url: 'http://www.openaddresses.org/addresses/',
+
+ /** private: constructor
+ */
+ initComponent: function() {
+ this.emptyText = OpenLayers.i18n('Search address in OpenAddresses');
+ this.loadingText = OpenLayers.i18n('Search in OpenAddresses...');
+ GeoExt.ux.OpenAddressesSearchCombo.superclass.initComponent.apply(this, arguments);
+
+ this.store = new Ext.data.Store({
+ proxy: new Ext.data.ScriptTagProxy({
+ url: this.url,
+ method: 'GET'
+ }),
+ baseParams: {
+ limit: this.maxRows,
+ lang: this.lang,
+ attrs: "street,housenumber,city"
+ },
+ reader: new Ext.data.JsonReader({
+ root: 'features',
+ fields: [
+ {name: 'geometry'},
+ {name: 'properties'},
+ {name: 'street', mapping: 'properties.street'},
+ {name: 'city', mapping: 'properties.city'},
+ {name: 'housenumber', mapping: 'properties.housenumber'}
+ ]
+ })
+ });
+
+ if(this.zoom > 0) {
+ this.on("select", function(combo, record, index) {
+ var position = new OpenLayers.LonLat(
+ record.data.geometry.coordinates[0], record.data.geometry.coordinates[1]
+ );
+ position.transform(
+ new OpenLayers.Projection("EPSG:4326"),
+ this.map.getProjectionObject()
+ );
+ this.setValue(record.data.street + ' ' + record.data.housenumber + ' ' + record.data.city);
+ this.map.setCenter(position, this.zoom);
+ }, this);
+ }
+ }
+});
+
+/** api: xtype = gxux_openaddressessearchcombo */
+Ext.reg('gxux_openaddressessearchcombo', GeoExt.ux.OpenAddressesSearchCombo);
Deleted: sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.js
===================================================================
--- sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.js 2010-05-12 06:44:26 UTC (rev 2180)
+++ sandbox/cmoullet/ux/OpenAddressesSearchCombo/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.js 2010-05-12 10:19:18 UTC (rev 2181)
@@ -1,142 +0,0 @@
-/**
- * Copyright (c) 2008-2009 The Open Source Geospatial Foundation
- *
- * Published under the BSD license.
- * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
- * of the license.
- */
-
-/** api: (define)
- * module = GeoExt.ux
- * class = OpenAddressesSearchCombo
- * base_link = `Ext.form.ComboBox <http://extjs.com/deploy/dev/docs/?class=Ext.form.ComboBox>`_
- */
-
-Ext.namespace("GeoExt.ux");
-
-GeoExt.ux.OpenAddressesSearchCombo = Ext.extend(Ext.form.ComboBox, {
- /** api: config[map]
- * ``OpenLayers.Map or Object`` A configured map or a configuration object
- * for the map constructor, required only if :attr:`zoom` is set to
- * value greater than or equal to 0.
- */
- /** private: property[map]
- * ``OpenLayers.Map`` The map object.
- */
- map: null,
-
- /** api: config[width]
- * See http://www.extjs.com/deploy/dev/docs/source/BoxComponent.html#cfg-Ext.BoxComponent-width,
- * default value is 350.
- */
- width: 350,
-
- /** api: config[listWidth]
- * See http://www.extjs.com/deploy/dev/docs/source/Combo.html#cfg-Ext.form.ComboBox-listWidth,
- * default value is 350.
- */
- listWidth: 350,
-
- /** api: config[zoom]
- * ``Number`` Zoom level for recentering the map after search, if set to
- * a negative number the map isn't recentered, defaults to 8.
- */
- /** private: property[zoom]
- * ``Number``
- */
- zoom: 18,
-
- /** api: config[minChars]
- * ``Number`` Minimum number of characters to be typed before
- * search occurs, defaults to 1.
- */
- minChars: 1,
-
- /** api: config[queryDelay]
- * ``Number`` Delay before the search occurs, defaults to 50 ms.
- */
- queryDelay: 50,
-
- /** api: config[maxRows]
- * `String` The maximum number of rows in the responses, defaults to 20,
- * maximum allowed value is 1000.
- * See: http://www.geonames.org/export/geonames-search.html
- */
- /** private: property[maxRows]
- * ``String``
- */
- maxRows: '20',
-
- /** api: config[tpl]
- * ``Ext.XTemplate or String`` Template for presenting the result in the
- * list (see http://www.extjs.com/deploy/dev/docs/output/Ext.XTemplate.html),
- * if not set a default value is provided.
- */
- tpl: '<tpl for="."><div class="x-combo-list-item">{street} {housenumber}, {city}</div></tpl>',
-
- /** api: config[lang]
- * ``String`` Place name and country name will be returned in the specified
- * language. Default is English (en).
- */
- /** private: property[lang]
- * ``String``
- */
- lang: 'en',
-
- /** private: property[hideTrigger]
- * Hide trigger of the combo.
- */
- hideTrigger: true,
-
- /** private: property[url]
- * Url of the OpenAddresses service
- */
- url: 'http://www.openaddresses.org/addresses/',
-
- /** private: constructor
- */
- initComponent: function() {
- this.emptyText = OpenLayers.i18n('Search address in OpenAddresses');
- this.loadingText = OpenLayers.i18n('Search in OpenAddresses...');
- GeoExt.ux.OpenAddressesSearchCombo.superclass.initComponent.apply(this, arguments);
-
- this.store = new Ext.data.Store({
- proxy: new Ext.data.ScriptTagProxy({
- url: this.url,
- method: 'GET'
- }),
- baseParams: {
- limit: this.maxRows,
- lang: this.lang,
- attrs: "street,housenumber,city"
- },
- reader: new Ext.data.JsonReader({
- root: 'features',
- fields: [
- {name: 'geometry'},
- {name: 'properties'},
- {name: 'street', mapping: 'properties.street'},
- {name: 'city', mapping: 'properties.city'},
- {name: 'housenumber', mapping: 'properties.housenumber'}
- ]
- })
- });
-
- if(this.zoom > 0) {
- this.on("select", function(combo, record, index) {
- var position = new OpenLayers.LonLat(
- record.data.geometry.coordinates[0], record.data.geometry.coordinates[1]
- );
- position.transform(
- new OpenLayers.Projection("EPSG:4326"),
- this.map.getProjectionObject()
- );
- this.setValue(record.data.street + ' ' + record.data.housenumber + ' ' + record.data.city);
- this.map.setCenter(position, this.zoom);
- }, this);
- }
- }
-});
-
-/** api: xtype = gxux_openaddressessearchcombo */
-Ext.reg('gxux_openaddressessearchcombo', GeoExt.ux.OpenAddressesSearchCombo);
Copied: sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux/OpenAddressesSearchCombo.html (from rev 2176, sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.html)
===================================================================
--- sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux/OpenAddressesSearchCombo.html (rev 0)
+++ sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux/OpenAddressesSearchCombo.html 2010-05-12 10:19:18 UTC (rev 2181)
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html debug="true">
+<head>
+
+ <script type="text/javascript" src="http://svn.geoext.org/ext/3.1.0/adapter/ext/ext-base.js"></script>
+ <script type="text/javascript" src="http://svn.geoext.org/ext/3.1.0/ext-all.js"></script>
+ <link rel="stylesheet" type="text/css" href="http://svn.geoext.org/ext/3.1.0/resources/css/ext-all.css" />
+ <link rel="stylesheet" type="text/css" href="http://svn.geoext.org/ext/3.1.0/examples/shared/examples.css" />
+ <script type="text/javascript" src="../../../../../trunk/openlayers/lib/OpenLayers.js"></script>
+ <script type="text/javascript" src="../../../../../trunk/geoext/lib/GeoExt.js"></script>
+ <script type="text/javascript" src="../../../lib/GeoExt.ux/OpenAddressesSearchCombo.js"></script>
+
+ <script type="text/javascript">
+ function test_ctor(t) {
+ t.plan(4);
+
+ // set up
+
+ var c, map = {};
+
+ // test
+
+ c = new GeoExt.ux.OpenAddressesSearchCombo({
+ renderTo: "OpenAddressesSearch",
+ map: map
+ });
+ t.ok(c instanceof GeoExt.ux.OpenAddressesSearchCombo,
+ "ctor creates a GeoExt.ux.OpenAddressesSearchCombo object");
+ t.ok(c instanceof Ext.form.ComboBox,
+ "ctor creates an Ext.form.ComboBox object");
+ t.ok(c.hasListener("select"),
+ "ctor registers a \"select\" listener");
+ t.eq(c.map, map,
+ "ctor sets map in instance");
+ c.destroy();
+ }
+ </script>
+<body>
+ <div id="OpenAddressesSearch"></div>
+</body>
+</html>
Deleted: sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.html
===================================================================
--- sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.html 2010-05-12 06:44:26 UTC (rev 2180)
+++ sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.html 2010-05-12 10:19:18 UTC (rev 2181)
@@ -1,41 +0,0 @@
-<!DOCTYPE html>
-<html debug="true">
-<head>
-
- <script type="text/javascript" src="http://svn.geoext.org/ext/3.1.0/adapter/ext/ext-base.js"></script>
- <script type="text/javascript" src="http://svn.geoext.org/ext/3.1.0/ext-all.js"></script>
- <link rel="stylesheet" type="text/css" href="http://svn.geoext.org/ext/3.1.0/resources/css/ext-all.css" />
- <link rel="stylesheet" type="text/css" href="http://svn.geoext.org/ext/3.1.0/examples/shared/examples.css" />
- <script type="text/javascript" src="../../../../../trunk/openlayers/lib/OpenLayers.js"></script>
- <script type="text/javascript" src="../../../../../trunk/geoext/lib/GeoExt.js"></script>
- <script type="text/javascript" src="../../../lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.js"></script>
-
- <script type="text/javascript">
- function test_ctor(t) {
- t.plan(4);
-
- // set up
-
- var c, map = {};
-
- // test
-
- c = new GeoExt.ux.OpenAddressesSearchCombo({
- renderTo: "OpenAddressesSearch",
- map: map
- });
- t.ok(c instanceof GeoExt.ux.OpenAddressesSearchCombo,
- "ctor creates a GeoExt.ux.OpenAddressesSearchCombo object");
- t.ok(c instanceof Ext.form.ComboBox,
- "ctor creates an Ext.form.ComboBox object");
- t.ok(c.hasListener("select"),
- "ctor registers a \"select\" listener");
- t.eq(c.map, map,
- "ctor sets map in instance");
- c.destroy();
- }
- </script>
-<body>
- <div id="OpenAddressesSearch"></div>
-</body>
-</html>
Modified: sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/list-tests.html
===================================================================
--- sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/list-tests.html 2010-05-12 06:44:26 UTC (rev 2180)
+++ sandbox/cmoullet/ux/OpenAddressesSearchCombo/tests/list-tests.html 2010-05-12 10:19:18 UTC (rev 2181)
@@ -1,3 +1,3 @@
<ul id="testlist">
- <li>lib/GeoExt.ux.openaddresses/OpenAddressesSearchCombo.html</li>
+ <li>lib/GeoExt.ux/OpenAddressesSearchCombo.html</li>
</ul>
More information about the Commits
mailing list