[Commits] r1049 - apps/opengeo/geoexplorer/branches/0.1.x/lib
commits at geoext.org
commits at geoext.org
Thu Jun 11 23:47:23 CEST 2009
Author: tschaub
Date: 2009-06-11 23:47:23 +0200 (Thu, 11 Jun 2009)
New Revision: 1049
Modified:
apps/opengeo/geoexplorer/branches/0.1.x/lib/GeoExplorer.js
Log:
Use GeoExt.Action here.
Modified: apps/opengeo/geoexplorer/branches/0.1.x/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/branches/0.1.x/lib/GeoExplorer.js 2009-06-11 21:44:17 UTC (rev 1048)
+++ apps/opengeo/geoexplorer/branches/0.1.x/lib/GeoExplorer.js 2009-06-11 21:47:23 UTC (rev 1049)
@@ -583,41 +583,25 @@
// create a navigation history control
var historyControl = new OpenLayers.Control.NavigationHistory();
- // create buttons for previous and next
- var navPreviousButton = new Ext.Button({
+ this.map.addControl(historyControl);
+
+ // create actions for previous and next
+ var navPreviousAction = new GeoExt.Action({
tooltip: "Zoom to Previous Extent",
+ text: "previous",
iconCls: "icon-zoom-previous",
disabled: true,
- handler: function() {
- historyControl.previous.trigger();
- }
+ control: historyControl.previous
});
- historyControl.previous.events.on({
- activate: function() {
- navPreviousButton.enable();
- },
- deactivate: function() {
- navPreviousButton.disable();
- }
- });
- var navNextButton = new Ext.Button({
+
+ var navNextAction = new GeoExt.Action({
tooltip: "Zoom to Next Extent",
+ text: "next",
iconCls: "icon-zoom-next",
disabled: true,
- handler: function() {
- historyControl.next.trigger();
- }
+ control: historyControl.next
});
- historyControl.next.events.on({
- activate: function() {
- navNextButton.enable();
- },
- deactivate: function() {
- navNextButton.disable();
- }
- });
- this.map.addControl(historyControl);
-
+
var toolGroup = "toolGroup";
// create a get feature info control
@@ -800,8 +784,8 @@
iconCls: "icon-zoom-out",
scope: this
}),
- navPreviousButton,
- navNextButton,
+ navPreviousAction,
+ navNextAction,
new Ext.Button({
tooltip: "Zoom to Visible Extent",
iconCls: "icon-zoom-visible",
More information about the Commits
mailing list