Skip to content

Commit

Permalink
issue planetfederal#235 : enhancements CSW: set source record config …
Browse files Browse the repository at this point in the history
…field and i18N for Find Layers menu item
  • Loading branch information
justb4 committed Aug 27, 2014
1 parent 00b6e2f commit 8541cbd
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/script/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 3 additions & 1 deletion src/script/locale/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
9 changes: 8 additions & 1 deletion src/script/plugins/AddLayers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 8541cbd

Please sign in to comment.