[Commits] r986 - apps/opengeo/geoexplorer/trunk/lib
commits at geoext.org
commits at geoext.org
Thu Jun 4 20:20:43 CEST 2009
Author: dwins
Date: 2009-06-04 20:20:43 +0200 (Thu, 04 Jun 2009)
New Revision: 986
Modified:
apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
Log:
Hide options that depend on a proxy when no proxy is configured.
Modified: apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js
===================================================================
--- apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-06-04 18:15:16 UTC (rev 985)
+++ apps/opengeo/geoexplorer/trunk/lib/GeoExplorer.js 2009-06-04 18:20:43 UTC (rev 986)
@@ -730,31 +730,38 @@
capGridPanel.reconfigure(record.data.store, baseCapGridPanel.getColumnModel());
}, this);
- var capGridToolbar = [
- new Ext.Toolbar.TextItem({
- text: "View available data from:"
- }),
- sourceComboBox,
- new Ext.Button({
+ var capGridToolbar = null;
+ var baseCapGridToolbar = null;
+
+ if (this.proxy || this.layerSources.getCount() > 1) {
+ capGridToolbar = [
+ new Ext.Toolbar.TextItem({
+ text: "View available data from:"
+ }),
+ sourceComboBox
+ ];
+ baseCapGridToolbar = [
+ new Ext.Toolbar.TextItem({
+ text: "View available data from:"
+ }),
+ baseSourceComboBox
+ ];
+ };
+
+ if (this.proxy) {
+ capGridToolbar.push(new Ext.Button({
text: "or add a new server.",
handler: function() {
newSourceWindow.show();
}
- })
- ];
-
- var baseCapGridToolbar = [
- new Ext.Toolbar.TextItem({
- text: "View available data from:"
- }),
- baseSourceComboBox,
- new Ext.Button({
+ }));
+ baseCapGridToolbar.push(new Ext.Button({
text: "or add a new server.",
handler: function() {
newSourceWindow.show();
}
- })
- ];
+ }));
+ }
var newSourceWindow = new GeoExplorer.NewSourceWindow();
More information about the Commits
mailing list