Skip to content

Commit

Permalink
Add unique parameter for Attribute searches - when present, the wid…
Browse files Browse the repository at this point in the history
…get will query the

layer for distinct values and populate the drop-down for the specific search field.

No longer limited to 5 search fields. Might need to adjust the css `height` when more fields are present.
  • Loading branch information
tmcgee committed Apr 1, 2016
1 parent 3dae7cc commit 82c6788
Show file tree
Hide file tree
Showing 5 changed files with 358 additions and 124 deletions.
14 changes: 5 additions & 9 deletions config/searchWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,7 @@ define([
name: 'Type of Damage',
label: 'Type of Damage',
expression: '(typdamage LIKE \'[value]%\')',
placeholder: 'Enter the text Destroyed, Major or Minor',
values: ['Destroyed', 'Major', 'Minor'],
minChars: 3
values: ['*', 'Destroyed', 'Major', 'Minor']
}
],

Expand Down Expand Up @@ -239,12 +237,10 @@ define([
name: 'Search For Police Station By Name',
searchFields: [
{
name: 'Police Station',
label: 'Name',
expression: '(PDNAME LIKE \'[value]%\')',
placeholder: 'Enter the Name of the Police Station',
required: true,
minChars: 3
name: 'PDNAME',
label: 'Station Name',
expression: '(PDNAME = \'[value]\')',
unique: true
}
],

Expand Down
Loading

0 comments on commit 82c6788

Please sign in to comment.