diff --git a/.gitignore b/.gitignore index b1fd6583..850a9164 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,7 @@ src/doc/lib/menu src/doc/lib/plugins src/doc/lib/widgets src/doc/lib/util.rst -build/ \ No newline at end of file +build/ +src/script/plugins/.DS_Store + +.DS_Store diff --git a/src/script/plugins/AddLayers.js b/src/script/plugins/AddLayers.js index 912099be..b3177135 100644 --- a/src/script/plugins/AddLayers.js +++ b/src/script/plugins/AddLayers.js @@ -251,6 +251,7 @@ gxp.plugins.AddLayers = Ext.extend(gxp.plugins.Tool, { tooltip : this.addActionTip, text: this.addActionText, menuText: this.addActionMenuText, + buttonText: this.addButtonText, disabled: true, iconCls: "gxp-icon-addlayers" }; diff --git a/src/script/plugins/FeatureEditor.js b/src/script/plugins/FeatureEditor.js index 034846cc..84d1409e 100644 --- a/src/script/plugins/FeatureEditor.js +++ b/src/script/plugins/FeatureEditor.js @@ -58,6 +58,12 @@ gxp.plugins.FeatureEditor = Ext.extend(gxp.plugins.ClickableFeatures, { */ splitButton: null, + /** api: config[showButtonText] + * Show the ``buttonText`` an action is configured with, if used as a + * button. Default is false. + */ + showButtonText: false, + /** api: config[iconClsAdd] * ``String`` * iconCls to use for the add button. @@ -623,6 +629,7 @@ gxp.plugins.FeatureEditor = Ext.extend(gxp.plugins.ClickableFeatures, { // backwards compatibility: only show text if configured menuText: this.initialConfig.createFeatureActionText, text: this.initialConfig.createFeatureActionText, + buttonText: this.createFeatureActionText, iconCls: this.iconClsAdd, disabled: true, hidden: this.modifyOnly || this.readOnly, @@ -720,6 +727,7 @@ gxp.plugins.FeatureEditor = Ext.extend(gxp.plugins.ClickableFeatures, { // backwards compatibility: only show text if configured text: this.initialConfig.editFeatureActionText, menuText: this.initialConfig.editFeatureActionText, + buttonText: this.editFeatureActionText, iconCls: this.iconClsEdit, disabled: true, toggleGroup: toggleGroup, @@ -748,7 +756,7 @@ gxp.plugins.FeatureEditor = Ext.extend(gxp.plugins.ClickableFeatures, { }) ]}, disabled: true, - buttonText: this.splitButtonText, + text: this.showButtonText ? this.splitButtonText : null, tooltip: this.splitButtonTooltip, iconCls: this.iconClsAdd, enableToggle: true, diff --git a/src/script/plugins/LayerProperties.js b/src/script/plugins/LayerProperties.js index 6dfde36c..f03a093f 100644 --- a/src/script/plugins/LayerProperties.js +++ b/src/script/plugins/LayerProperties.js @@ -29,6 +29,12 @@ gxp.plugins.LayerProperties = Ext.extend(gxp.plugins.Tool, { /** api: ptype = gxp_layerproperties */ ptype: "gxp_layerproperties", + + /** api: config[buttonText] + * ``String`` + * Text for layer properties button item (i18n). + */ + buttonText: "Layer Properties", /** api: config[menuText] * ``String`` @@ -69,6 +75,7 @@ gxp.plugins.LayerProperties = Ext.extend(gxp.plugins.Tool, { addActions: function() { var actions = gxp.plugins.LayerProperties.superclass.addActions.apply(this, [{ menuText: this.menuText, + buttonText: this.buttonText, iconCls: "gxp-icon-layerproperties", disabled: true, tooltip: this.toolTip, diff --git a/src/script/plugins/Legend.js b/src/script/plugins/Legend.js index e4a3e403..10cb42e1 100644 --- a/src/script/plugins/Legend.js +++ b/src/script/plugins/Legend.js @@ -31,6 +31,12 @@ gxp.plugins.Legend = Ext.extend(gxp.plugins.Tool, { /** api: ptype = gxp_legend */ ptype: "gxp_legend", + + /** api: config[buttonText] + * ``String`` + * Text for legend button item (i18n). + */ + buttonText: "Legend", /** api: config[menuText] * ``String`` @@ -70,6 +76,7 @@ gxp.plugins.Legend = Ext.extend(gxp.plugins.Tool, { addActions: function() { var actions = [{ menuText: this.menuText, + buttonText: this.buttonText, iconCls: "gxp-icon-legend", tooltip: this.tooltip, handler: function() { diff --git a/src/script/plugins/Measure.js b/src/script/plugins/Measure.js index 05ce9bec..d18f8987 100644 --- a/src/script/plugins/Measure.js +++ b/src/script/plugins/Measure.js @@ -44,6 +44,12 @@ gxp.plugins.Measure = Ext.extend(gxp.plugins.Tool, { */ outputTarget: "map", + /** api: config[showButtonText] + * Show the ``buttonText`` an action is configured with, if used as a + * button. Default is false. + */ + showButtonText: false, + /** api: config[buttonText] * ``String`` * Text for the Measure button (i18n). @@ -205,7 +211,7 @@ gxp.plugins.Measure = Ext.extend(gxp.plugins.Tool, { this.button = new Ext.SplitButton({ iconCls: "gxp-icon-measure-length", tooltip: this.measureTooltip, - buttonText: this.buttonText, + text: this.showButtonText ? this.buttonText : null, enableToggle: true, toggleGroup: this.toggleGroup, allowDepress: true, diff --git a/src/script/plugins/Navigation.js b/src/script/plugins/Navigation.js index f413b7d9..3ff0baf5 100644 --- a/src/script/plugins/Navigation.js +++ b/src/script/plugins/Navigation.js @@ -31,6 +31,12 @@ gxp.plugins.Navigation = Ext.extend(gxp.plugins.Tool, { /** api: ptype = gxp_navigation */ ptype: "gxp_navigation", + + /** api: config[buttonText] + * ``String`` + * Text for navigation button item (i18n). + */ + buttonText: "Pan", /** api: config[menuText] * ``String`` @@ -69,6 +75,7 @@ gxp.plugins.Navigation = Ext.extend(gxp.plugins.Tool, { var actions = [new GeoExt.Action({ tooltip: this.tooltip, menuText: this.menuText, + buttonText: this.buttonText, iconCls: "gxp-icon-pan", enableToggle: true, pressed: true, diff --git a/src/script/plugins/NavigationHistory.js b/src/script/plugins/NavigationHistory.js index 6aed078d..4ffa61a0 100644 --- a/src/script/plugins/NavigationHistory.js +++ b/src/script/plugins/NavigationHistory.js @@ -30,6 +30,18 @@ gxp.plugins.NavigationHistory = Ext.extend(gxp.plugins.Tool, { /** api: ptype = gxp_navigationhistory */ ptype: "gxp_navigationhistory", + + /** api: config[previousButtonText] + * ``String`` + * Text for zoom previous button item (i18n). + */ + previousButtonText: "Zoom Previous", + + /** api: config[nextButtonText] + * ``String`` + * Text for zoom next button item (i18n). + */ + nextButtonText: "Zoom Next", /** api: config[previousMenuText] * ``String`` @@ -68,12 +80,14 @@ gxp.plugins.NavigationHistory = Ext.extend(gxp.plugins.Tool, { this.target.mapPanel.map.addControl(historyControl); var actions = [new GeoExt.Action({ menuText: this.previousMenuText, + buttonText: this.previousButtonText, iconCls: "gxp-icon-zoom-previous", tooltip: this.previousTooltip, disabled: true, control: historyControl.previous }), new GeoExt.Action({ menuText: this.nextMenuText, + buttonText: this.nextButtonText, iconCls: "gxp-icon-zoom-next", tooltip: this.nextTooltip, disabled: true, diff --git a/src/script/plugins/RemoveLayer.js b/src/script/plugins/RemoveLayer.js index 49689d3a..a1e86503 100644 --- a/src/script/plugins/RemoveLayer.js +++ b/src/script/plugins/RemoveLayer.js @@ -30,6 +30,12 @@ gxp.plugins.RemoveLayer = Ext.extend(gxp.plugins.Tool, { /** api: ptype = gxp_removelayer */ ptype: "gxp_removelayer", + + /** api: config[buttonText] + * ``String`` + * Text for remove button item (i18n). + */ + buttonText: "Remove layer", /** api: config[removeMenuText] * ``String`` @@ -49,6 +55,7 @@ gxp.plugins.RemoveLayer = Ext.extend(gxp.plugins.Tool, { var selectedLayer; var actions = gxp.plugins.RemoveLayer.superclass.addActions.apply(this, [{ menuText: this.removeMenuText, + buttonText: this.buttonText, iconCls: "gxp-icon-removelayers", disabled: true, tooltip: this.removeActionTip, diff --git a/src/script/plugins/Styler.js b/src/script/plugins/Styler.js index 657d1406..393ed813 100644 --- a/src/script/plugins/Styler.js +++ b/src/script/plugins/Styler.js @@ -31,6 +31,12 @@ gxp.plugins.Styler = Ext.extend(gxp.plugins.Tool, { /** api: ptype = gxp_styler */ ptype: "gxp_styler", + + /** api: config[buttonText] + * ``String`` + * Text for layer properties button item (i18n). + */ + buttonText: "Edit Styles", /** api: config[menuText] * ``String`` @@ -117,6 +123,7 @@ gxp.plugins.Styler = Ext.extend(gxp.plugins.Tool, { var layerProperties; var actions = gxp.plugins.Styler.superclass.addActions.apply(this, [{ menuText: this.menuText, + buttonText: this.buttonText, iconCls: "gxp-icon-palette", disabled: true, tooltip: this.tooltip, diff --git a/src/script/plugins/Zoom.js b/src/script/plugins/Zoom.js index cf466d0f..7389fe9d 100644 --- a/src/script/plugins/Zoom.js +++ b/src/script/plugins/Zoom.js @@ -31,7 +31,25 @@ gxp.plugins.Zoom = Ext.extend(gxp.plugins.Tool, { /** api: ptype = gxp_zoom */ ptype: "gxp_zoom", - + + /** api: config[zoomButtonText] + * ``String`` + * Text for zoom box button item (i18n). + */ + zoomButtonText: "Zoom Box", + + /** api: config[zoomInButtonText] + * ``String`` + * Text for zoom in button item (i18n). + */ + zoomInButtonText: "Zoom In", + + /** api: config[zoomOutButtonText] + * ``String`` + * Text for zoom out button item (i18n). + */ + zoomOutButtonText: "Zoom Out", + /** api: config[zoomMenuText] * ``String`` * Text for zoom box menu item (i18n). @@ -92,6 +110,7 @@ gxp.plugins.Zoom = Ext.extend(gxp.plugins.Tool, { addActions: function() { var actions = [{ menuText: this.zoomInMenuText, + buttonText: this.zoomInButtonText, iconCls: "gxp-icon-zoom-in", tooltip: this.zoomInTooltip, handler: function() { @@ -100,6 +119,7 @@ gxp.plugins.Zoom = Ext.extend(gxp.plugins.Tool, { scope: this }, { menuText: this.zoomOutMenuText, + buttonText: this.zoomOutButtonText, iconCls: "gxp-icon-zoom-out", tooltip: this.zoomOutTooltip, handler: function() { @@ -109,7 +129,8 @@ gxp.plugins.Zoom = Ext.extend(gxp.plugins.Tool, { }]; if (this.showZoomBoxAction) { actions.unshift(new GeoExt.Action({ - menuText: this.zoomText, + menuText: this.zoomMenuText, + buttonText: this.zoomButtonText, iconCls: "gxp-icon-zoom", tooltip: this.zoomTooltip, control: new OpenLayers.Control.ZoomBox(this.controlOptions), diff --git a/src/script/plugins/ZoomToDataExtent.js b/src/script/plugins/ZoomToDataExtent.js index 3aa840e4..0bba2933 100644 --- a/src/script/plugins/ZoomToDataExtent.js +++ b/src/script/plugins/ZoomToDataExtent.js @@ -29,6 +29,12 @@ gxp.plugins.ZoomToDataExtent = Ext.extend(gxp.plugins.ZoomToExtent, { /** api: ptype = gxp_zoomtodataextent */ ptype: "gxp_zoomtodataextent", + + /** api: config[buttonText] + * ``String`` + * Text for zoom button item (i18n). + */ + buttonText: "Zoom layer extent", /** api: config[menuText] * ``String`` diff --git a/src/script/plugins/ZoomToExtent.js b/src/script/plugins/ZoomToExtent.js index 1d4df0e5..0ede8246 100644 --- a/src/script/plugins/ZoomToExtent.js +++ b/src/script/plugins/ZoomToExtent.js @@ -32,8 +32,10 @@ gxp.plugins.ZoomToExtent = Ext.extend(gxp.plugins.Tool, { ptype: "gxp_zoomtoextent", /** api: config[buttonText] - * ``String`` Text to show next to the zoom button + * ``String`` + * Text for zoom button item (i18n). */ + buttonText: "Zoom extend", /** api: config[menuText] * ``String`` @@ -85,8 +87,8 @@ gxp.plugins.ZoomToExtent = Ext.extend(gxp.plugins.Tool, { */ addActions: function() { return gxp.plugins.ZoomToExtent.superclass.addActions.apply(this, [{ - text: this.buttonText, menuText: this.menuText, + buttonText: this.buttonText, iconCls: this.iconCls, tooltip: this.tooltip, handler: function() { diff --git a/src/script/plugins/ZoomToLayerExtent.js b/src/script/plugins/ZoomToLayerExtent.js index a6214cc8..7f00d200 100644 --- a/src/script/plugins/ZoomToLayerExtent.js +++ b/src/script/plugins/ZoomToLayerExtent.js @@ -29,6 +29,12 @@ gxp.plugins.ZoomToLayerExtent = Ext.extend(gxp.plugins.ZoomToExtent, { /** api: ptype = gxp_zoomtolayerextent */ ptype: "gxp_zoomtolayerextent", + + /** api: config[buttonText] + * ``String`` + * Text for zoom button item (i18n). + */ + buttonText: "Zoom layer extent", /** api: config[menuText] * ``String`` diff --git a/src/script/plugins/ZoomToSelectedFeatures.js b/src/script/plugins/ZoomToSelectedFeatures.js index a2f88519..4e82546d 100644 --- a/src/script/plugins/ZoomToSelectedFeatures.js +++ b/src/script/plugins/ZoomToSelectedFeatures.js @@ -29,6 +29,12 @@ gxp.plugins.ZoomToSelectedFeatures = Ext.extend(gxp.plugins.ZoomToExtent, { /** api: ptype = gxp_zoomtoselectedfeatures */ ptype: "gxp_zoomtoselectedfeatures", + + /** api: config[buttonText] + * ``String`` + * Text for zoom button item (i18n). + */ + buttonText: "Zoom selected features", /** api: config[menuText] * ``String``