Skip to content

Commit 853cf85

Browse files
committed
allow button labels to be show from i18n
move "Stop Drawing" button to the end of the buttons instead of in the middle
1 parent c2ae85c commit 853cf85

File tree

2 files changed

+61
-41
lines changed

2 files changed

+61
-41
lines changed

widgets/Search/nls/Search.js

+48-12
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,54 @@ define({
2626
}
2727
},
2828
Buttons: {
29-
search: 'Search',
30-
openQueryBuilder: 'Query Builder',
31-
stopDrawing: 'Stop Drawing',
32-
selectByRectangle: 'Select By Rectangle',
33-
selectByCircle: 'Select By Circle',
34-
selectByPoint: 'Select By Point',
35-
selectByPolyline: 'Select By Line',
36-
selectByFreehandPolyline: 'Select By Freehand Line',
37-
selectByPolygon: 'Select By Polygon',
38-
selectByFreehandPolygon: 'Select By Freehand Polygon',
39-
selectByIdentify: 'Select By Identified Feature(s)',
40-
selectBySelected: 'Select By Selected Feature(s)'
29+
search: {
30+
label: 'Search',
31+
showLabel: true
32+
},
33+
openQueryBuilder: {
34+
label: 'Query Builder',
35+
showLabel: true
36+
},
37+
stopDrawing: {
38+
label: 'Stop Drawing',
39+
showLabel: true
40+
},
41+
selectByRectangle: {
42+
label: 'Select By Rectangle',
43+
showLabel: false
44+
},
45+
selectByCircle: {
46+
label: 'Select By Circle',
47+
showLabel: false
48+
},
49+
selectByPoint: {
50+
label: 'Select By Point',
51+
showLabel: false
52+
},
53+
selectByPolyline: {
54+
label: 'Select By Line',
55+
showLabel: false
56+
},
57+
selectByFreehandPolyline: {
58+
label: 'Select By Freehand Line',
59+
showLabel: false
60+
},
61+
selectByPolygon: {
62+
label: 'Select By Polygon',
63+
showLabel: false
64+
},
65+
selectByFreehandPolygon: {
66+
label: 'Select By Freehand Polygon',
67+
showLabel: false
68+
},
69+
selectByIdentify: {
70+
label: 'Select By Identified Feature(s)',
71+
showLabel: false
72+
},
73+
selectBySelected: {
74+
label: 'Select By Selected Feature(s)',
75+
showLabel: false
76+
}
4177
}
4278
}
4379
});

widgets/Search/templates/Search.html

+13-29
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,8 @@
5252
</table>
5353
</div>
5454
<div class="searchSelector bottomButtons">
55-
<button data-dojo-attach-event="click:doAttributeSearch" data-dojo-attach-point="btnAttributeSearch" data-dojo-props="iconClass:'fa fa-search fa-fw',showLabel:true,disabled:true" data-dojo-type="dijit/form/Button">
56-
${i18n.Buttons.search}
57-
</button>
58-
<button data-dojo-attach-event="click:openQueryBuilder" data-dojo-attach-point="btnQueryBuilder" data-dojo-props="iconClass:'fa fa-wrench fa-fw',showLabel:true,disabled:true" data-dojo-type="dijit/form/Button">
59-
${i18n.Buttons.openQueryBuilder}
60-
</button>
55+
<button data-dojo-attach-event="click:doAttributeSearch" data-dojo-attach-point="btnAttributeSearch" data-dojo-props="iconClass:'fa fa-search fa-fw',class:'btn-attribute-search',showLabel:${i18n.Buttons.search.showLabel},disabled:true" data-dojo-type="dijit/form/Button" title="${i18n.Buttons.search.label}">${i18n.Buttons.search.label}</button>
56+
<button data-dojo-attach-event="click:openQueryBuilder" data-dojo-attach-point="btnQueryBuilder" data-dojo-props="iconClass:'fa fa-wrench fa-fw',class:'btn-query-builder',showLabel:${i18n.Buttons.openQueryBuilder.showLabel},disabled:true" data-dojo-type="dijit/form/Button" title="${i18n.Buttons.openQueryBuilder.label}">${i18n.Buttons.openQueryBuilder.label}</button>
6157
</div>
6258
</div>
6359
<div class="searchTab" data-dojo-attach-point="tabByShape" data-dojo-type="dijit/layout/ContentPane" title="${i18n.Labels.tabTitleByShape}">
@@ -104,26 +100,16 @@
104100
${i18n.Labels.selectFeaturesBy}:
105101
</label>
106102
<br/>
107-
<button data-dojo-attach-event="onClick:drawRectangle" data-dojo-attach-point="searchRectangleButtonDijit" data-dojo-props="iconClass:'draw-icon-rectangle',showLabel:false" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByRectangle}">
108-
</button>
109-
<button data-dojo-attach-event="onClick:drawCircle" data-dojo-attach-point="searchCircleButtonDijit" data-dojo-props="iconClass:'draw-icon-circle',showLabel:false" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByCircle}">
110-
</button>
111-
<button data-dojo-attach-event="onClick:drawPoint" data-dojo-attach-point="searchPointButtonDijit" data-dojo-props="iconClass:'draw-icon-point',showLabel:false" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByPoint}">
112-
</button>
113-
<button data-dojo-attach-event="onClick:drawPolyline" data-dojo-attach-point="searchPolylineButtonDijit" data-dojo-props="iconClass:'draw-icon-polyline',showLabel:false" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByPolyline}">
114-
</button>
115-
<button data-dojo-attach-event="onClick:drawFreehandPolyline" data-dojo-attach-point="searchFreehandPolylineButtonDijit" data-dojo-props="iconClass:'draw-icon-freehand-polyline',showLabel:false" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByFreehandPolyline}">
116-
</button>
117-
<button data-dojo-attach-event="onClick:drawPolygon" data-dojo-attach-point="searchPolygonButtonDijit" data-dojo-props="iconClass:'draw-icon-polygon',showLabel:false" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByPolygon}">
118-
</button>
119-
<button data-dojo-attach-event="onClick:drawFreehandPolygon" data-dojo-attach-point="searchFreehandPolygonButtonDijit" data-dojo-props="iconClass:'draw-icon-freehand-polygon',showLabel:false" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByFreehandPolygon}">
120-
</button>
121-
<button data-dojo-attach-event="onClick:stopDrawing" data-dojo-attach-point="searchStopDrawingButtonDijit" data-dojo-props="iconClass:'fa fa-stop',showLabel:false" data-dojo-type="dijit/form/Button" title="${i18n.Buttons.stopDrawing}">
122-
</button>
123-
<button data-dojo-attach-event="onClick:useIdentifiedFeatures" data-dojo-attach-point="searchIdentifyButtonDijit" data-dojo-props="iconClass:'fa fa-info-circle',showLabel:false,disabled:true" data-dojo-type="dijit/form/Button" title="${i18n.Buttons.selectByIdentify}">
124-
</button>
125-
<button data-dojo-attach-event="onClick:useSelectedFeatures" data-dojo-attach-point="searchSelectedButtonDijit" data-dojo-props="iconClass:'fa fa-binoculars',showLabel:false,disabled:true" data-dojo-type="dijit/form/Button" title="${i18n.Buttons.selectBySelected}">
126-
</button>
103+
<button data-dojo-attach-event="onClick:drawRectangle" data-dojo-attach-point="searchRectangleButtonDijit" data-dojo-props="iconClass:'draw-icon-rectangle',class:'btn-draw-rectangle',showLabel:${i18n.Buttons.selectByRectangle.showLabel}" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByRectangle.label}">${i18n.Buttons.selectByRectangle.label}</button>
104+
<button data-dojo-attach-event="onClick:drawCircle" data-dojo-attach-point="searchCircleButtonDijit" data-dojo-props="iconClass:'draw-icon-circle',class:'btn-draw-circle',showLabel:${i18n.Buttons.selectByCircle.showLabel}" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByCircle.label}">${i18n.Buttons.selectByCircle.label}</button>
105+
<button data-dojo-attach-event="onClick:drawPoint" data-dojo-attach-point="searchPointButtonDijit" data-dojo-props="iconClass:'draw-icon-point',class:'btn-draw-point',showLabel:${i18n.Buttons.selectByPoint.showLabel}" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByPoint.label}">${i18n.Buttons.selectByPoint.label}</button>
106+
<button data-dojo-attach-event="onClick:drawPolyline" data-dojo-attach-point="searchPolylineButtonDijit" data-dojo-props="iconClass:'draw-icon-polyline',class:'btn-draw-polyline',showLabel:${i18n.Buttons.selectByPolyline.showLabel}" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByPolyline.label}">${i18n.Buttons.selectByPolyline.label}</button>
107+
<button data-dojo-attach-event="onClick:drawFreehandPolyline" data-dojo-attach-point="searchFreehandPolylineButtonDijit" data-dojo-props="iconClass:'draw-icon-freehand-polyline',class:'btn-draw-freehand-polyline',showLabel:${i18n.Buttons.selectByFreehandPolyline.showLabel}" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByFreehandPolyline.label}">${i18n.Buttons.selectByFreehandPolyline.label}</button>
108+
<button data-dojo-attach-event="onClick:drawPolygon" data-dojo-attach-point="searchPolygonButtonDijit" data-dojo-props="iconClass:'draw-icon-polygon',class:'btn-draw-polygon',showLabel:${i18n.Buttons.selectByPolygon.showLabel}" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByPolygon.label}">${i18n.Buttons.selectByPolygon.label}</button>
109+
<button data-dojo-attach-event="onClick:drawFreehandPolygon" data-dojo-attach-point="searchFreehandPolygonButtonDijit" data-dojo-props="iconClass:'draw-icon-freehand-polygon',class:'btn-draw-freehand-polygon',showLabel:${i18n.Buttons.selectByFreehandPolygon.showLabel}" data-dojo-type="dijit/form/ToggleButton" title="${i18n.Buttons.selectByFreehandPolygon.label}">${i18n.Buttons.selectByFreehandPolygon.label}</button>
110+
<button data-dojo-attach-event="onClick:useIdentifiedFeatures" data-dojo-attach-point="searchIdentifyButtonDijit" data-dojo-props="iconClass:'fa fa-info-circle',class:'btn-select-by-identify',showLabel:${i18n.Buttons.selectByIdentify.showLabel},disabled:true" data-dojo-type="dijit/form/Button" title="${i18n.Buttons.selectByIdentify.label}">${i18n.Buttons.selectByIdentify.label}</button>
111+
<button data-dojo-attach-event="onClick:useSelectedFeatures" data-dojo-attach-point="searchSelectedButtonDijit" data-dojo-props="iconClass:'fa fa-binoculars',class:'btn-select-by-selected',showLabel:${i18n.Buttons.selectBySelected.showLabel},disabled:true" data-dojo-type="dijit/form/Button" title="${i18n.Buttons.selectBySelected.label}">${i18n.Buttons.selectBySelected.label}</button>
112+
<button data-dojo-attach-event="onClick:stopDrawing" data-dojo-attach-point="searchStopDrawingButtonDijit" data-dojo-props="iconClass:'fa fa-stop',class:'btn-stop-drawing',showLabel:${i18n.Buttons.stopDrawing.showLabel}" data-dojo-type="dijit/form/Button" title="${i18n.Buttons.stopDrawing.label}">${i18n.Buttons.stopDrawing.label}</button>
127113
</div>
128114
<div class="searchSelector" data-dojo-attach-point="divSpatialAddToExisting">
129115
<table>
@@ -140,9 +126,7 @@
140126
</table>
141127
</div>
142128
<div class="searchSelector bottomButtons">
143-
<button data-dojo-attach-event="click:doSpatialSearch" data-dojo-attach-point="btnSpatialSearch" data-dojo-props="iconClass:'fa fa-search fa-fw',showLabel:true,disabled:true" data-dojo-type="dijit/form/Button">
144-
${i18n.Buttons.search}
145-
</button>
129+
<button data-dojo-attach-event="click:doSpatialSearch" data-dojo-attach-point="btnSpatialSearch" data-dojo-props="iconClass:'fa fa-search fa-fw',class:'btn-spatial-search',showLabel:${i18n.Buttons.search.showLabel},disabled:true" data-dojo-type="dijit/form/Button" title="${i18n.Buttons.search.label}">${i18n.Buttons.search.label}</button>
146130
</div>
147131
</div>
148132
</div>

0 commit comments

Comments
 (0)