From 8541cbd1248237b0450599cd34a3924fffe20f24 Mon Sep 17 00:00:00 2001 From: Just van den Broecke Date: Wed, 27 Aug 2014 17:47:44 +0200 Subject: [PATCH] issue #235 : enhancements CSW: set source record config field and i18N for Find Layers menu item --- src/script/locale/en.js | 4 +++- src/script/locale/nl.js | 4 +++- src/script/plugins/AddLayers.js | 9 ++++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/script/locale/en.js b/src/script/locale/en.js index 83c8384d..0591e95a 100644 --- a/src/script/locale/en.js +++ b/src/script/locale/en.js @@ -22,7 +22,9 @@ GeoExt.Lang.add("en", { doneText: "Done", uploadText: "Upload layers", addFeedActionMenuText: "Add feeds", - searchText: "Search for layers" + searchText: "Search for layers", + findActionMenuText: "Find layers", + findActionTip: "Find layers in catalogue" }, "gxp.plugins.BingSource.prototype": { diff --git a/src/script/locale/nl.js b/src/script/locale/nl.js index 38e90a5b..e1f2320c 100644 --- a/src/script/locale/nl.js +++ b/src/script/locale/nl.js @@ -13,7 +13,9 @@ GeoExt.Lang.add("nl", { availableLayersText: "Beschikbare kaartlagen", doneText: "Klaar", addFeedActionMenuText: "Add feeds", - searchText: "Zoek naar kaartlagen" + searchText: "Zoek naar kaartlagen", + findActionMenuText: "Zoek in catalogus", + findActionTip: "Zoek kaarten via CSW in catalogus metadata server" }, "gxp.plugins.BingSource.prototype": { diff --git a/src/script/plugins/AddLayers.js b/src/script/plugins/AddLayers.js index 16d3ee15..760738e1 100644 --- a/src/script/plugins/AddLayers.js +++ b/src/script/plugins/AddLayers.js @@ -61,6 +61,12 @@ gxp.plugins.AddLayers = Ext.extend(gxp.plugins.Tool, { */ addActionTip: "Add layers", + /** api: config[findActionTip] + * ``String`` + * Text for find action tooltip (i18n). + */ + findActionTip: "Find layers", + /** api: config[addActionText] * ``String`` * Text for the Add action. None by default. @@ -367,6 +373,7 @@ gxp.plugins.AddLayers = Ext.extend(gxp.plugins.Tool, { this.target.sources[this.initialConfig.search.selectedSource]) { var search = new Ext.menu.Item({ iconCls: 'gxp-icon-addlayers', + tooltip : this.findActionTip, text: this.findActionMenuText, handler: this.showCatalogueSearch, scope: this @@ -474,7 +481,7 @@ gxp.plugins.AddLayers = Ext.extend(gxp.plugins.Tool, { layerConfig.bbox = bbox.toArray(); } layerConfig.srs = mapProjection; - layerConfig.source = this.initialConfig.catalogSourceKey !== null ? + layerConfig.source = this.initialConfig.catalogSourceKey ? this.initialConfig.catalogSourceKey : sourceKey; var record = source.createLayerRecord(layerConfig);