Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identify Widget: nls support #302

Merged
merged 1 commit into from
Nov 15, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions viewer/js/gis/dijit/Identify.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ define([
'esri/tasks/IdentifyParameters',
'esri/dijit/PopupTemplate',
'dojo/text!./Identify/templates/Identify.html',
'dojo/i18n!./Identify/nls/resource',

'dijit/form/Form',
'dijit/form/FilteringSelect',
'xstyle/css!./Identify/css/Identify.css'
], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, MenuItem, lang, array, all, topic, Memory, IdentifyTask, IdentifyParameters, PopupTemplate, IdentifyTemplate) {
], function (declare, _WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin, MenuItem, lang, array, all, topic, Memory, IdentifyTask, IdentifyParameters, PopupTemplate, IdentifyTemplate, i18n) {
return declare([_WidgetBase, _TemplatedMixin, _WidgetsInTemplateMixin], {
widgetsInTemplate: true,
templateString: IdentifyTemplate,
baseClass: 'gis_IdentifyDijit',
i18n: i18n,

mapClickMode: null,
identifies: {},
Expand Down Expand Up @@ -110,7 +113,7 @@ define([
this.mapRightClick = evt;
}));
this.mapRightClickMenu.addChild(new MenuItem({
label: 'Identify here',
label: this.i18n.rightClickMenuItem.label,
onClick: lang.hitch(this, 'handleRightClick')
}));
},
Expand Down Expand Up @@ -140,7 +143,7 @@ define([
}));

if (identifies.length > 0) {
this.map.infoWindow.setTitle('Identifying...');
this.map.infoWindow.setTitle( this.i18n.mapInfoWindow.identifyingTitle );
this.map.infoWindow.setContent('<div class="loading"></div>');
this.map.infoWindow.show(mapPoint);
all(identifies).then(lang.hitch(this, 'identifyCallback', identifiedlayers), lang.hitch(this, 'identifyError'));
Expand Down Expand Up @@ -408,7 +411,7 @@ define([
this.identifyLayerDijit.set('disabled', (identifyItems.length < 1));
if (identifyItems.length > 0) {
identifyItems.unshift({
name: '*** All Visible Layers ***',
name: this.i18n.labels.allVisibleLayers,
id: '***'
});
if (!id) {
Expand Down
14 changes: 14 additions & 0 deletions viewer/js/gis/dijit/Identify/nls/resource.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
define ({
root: {
labels: {
selectLayer: 'Choose "All Visible Layers" or a single layer for identify:',
allVisibleLayers: '*** All Visible Layers ***'
},
rightClickMenuItem: {
label: 'Identify here'
},
mapInfoWindow: {
identifyingTitle: 'Identifying...'
}
}
});
2 changes: 1 addition & 1 deletion viewer/js/gis/dijit/Identify/templates/Identify.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="gis_IdentifyDijit">
<div class="formContainer">
<div data-dojo-type="dijit/form/Form" data-dojo-attach-point="identifyFormDijit">
<label>Choose "All Visible Layers" or a<br/>single layer for identify:</label><br/>
<label>${i18n.labels.selectLayer}</label><br/>
<input type="select" data-dojo-type="dijit/form/FilteringSelect" data-dojo-props="name:'identifyLayer',autoComplete:true,required:true,searchAttr:'name',maxHeight:250,'class':'identifySelect'"
data-dojo-attach-point="identifyLayerDijit" />
</div>
Expand Down