Skip to content

Commit 6187467

Browse files
committed
clean up config file and set up correct defaults
1 parent fded8f4 commit 6187467

6 files changed

Lines changed: 15 additions & 22 deletions

File tree

web/client/components/mapcontrols/search/SearchBar.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ class SearchBar extends React.Component {
100100
blurResetDelay: 300,
101101
autoFocusOnSelect: true,
102102
splitTools: true,
103-
isSearchClickable: true,
103+
isSearchClickable: false,
104104
hideOnBlur: true,
105105
typeAhead: true,
106106
searchText: ""

web/client/localConfig.json

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@
158158
}, {
159159
"name": "Search",
160160
"cfg": {
161-
"withToggle": ["max-width: 768px", "min-width: 768px"]
161+
"withToggle": ["max-width: 768px", "min-width: 768px"]
162162
}
163163
}, {
164164
"name": "Toolbar",
@@ -299,7 +299,6 @@
299299
}, {
300300
"name": "Search",
301301
"cfg": {
302-
"isSearchClickable": false,
303302
"withToggle": ["max-width: 768px", "min-width: 768px"]
304303
}
305304
}, {
@@ -425,7 +424,7 @@
425424
}, {
426425
"name": "Search",
427426
"cfg": {
428-
"withToggle": ["max-width: 768px", "min-width: 768px"]
427+
"withToggle": ["max-width: 768px", "min-width: 768px"]
429428
}
430429
}, {
431430
"name": "Toolbar",
@@ -456,13 +455,7 @@
456455
"className": "navbar shadow navbar-home"
457456
}
458457
}, "ManagerMenu", "Login", "Language", "Attribution", "ScrollTop", "Notifications"],
459-
"maps": ["Header", "Fork",
460-
{
461-
"name": "MapSearch",
462-
"cfg": {
463-
"splitTools" : false
464-
}
465-
}, "HomeDescription", "ThemeSwitcher", "CreateNewMap",
458+
"maps": ["Header", "Fork", "MapSearch", "HomeDescription", "ThemeSwitcher", "CreateNewMap",
466459
{
467460
"name": "Maps",
468461
"cfg": {
@@ -501,16 +494,6 @@
501494
"containerPosition": "columns"
502495
}
503496
}, "Dashboard"],
504-
"manager": ["Header", "Redirect", {
505-
"name": "UserManager",
506-
"cfg": {
507-
"splitTools" : false
508-
}
509-
},{
510-
"name": "GroupManager",
511-
"cfg": {
512-
"splitTools" : false
513-
}
514-
}, "Home", "Manager", "Footer"]
497+
"manager": ["Header", "Redirect", "UserManager", "GroupManager", "Home", "Manager", "Footer"]
515498
}
516499
}

web/client/plugins/MapSearch.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ const SearchBar = connect((state) => ({
2727
hideOnBlur: false,
2828
placeholderMsgId: "maps.search",
2929
typeAhead: false,
30+
splitTools: false,
31+
isSearchClickable: true,
3032
start: state && state.maps && state.maps.start,
3133
limit: state && state.maps && state.maps.limit,
3234
searchText: state.maps && state.maps.searchText !== '*' && state.maps.searchText || ""

web/client/plugins/Search.jsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ const SearchPlugin = connect((state) => ({
156156
}))(
157157
class extends React.Component {
158158
static propTypes = {
159+
splitTools: PropTypes.bool,
160+
isSearchClickable: PropTypes.bool,
159161
fitResultsToMapSize: PropTypes.bool,
160162
searchOptions: PropTypes.object,
161163
resultsStyle: PropTypes.object,
@@ -171,6 +173,8 @@ class extends React.Component {
171173
searchOptions: {
172174
services: [{type: "nominatim"}]
173175
},
176+
isSearchClickable: false,
177+
splitTools: true,
174178
resultsStyle: {
175179
color: '#3388ff',
176180
weight: 4,

web/client/plugins/manager/GroupManager.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class GroupManager extends React.Component {
3939
static defaultProps = {
4040
className: "user-search",
4141
hideOnBlur: false,
42+
isSearchClickable: true,
43+
splitTools: false,
4244
placeholderMsgId: "usergroups.searchGroups",
4345
typeAhead: false,
4446
searchText: "",

web/client/plugins/manager/UserManager.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ class UserManager extends React.Component {
3939
static defaultProps = {
4040
className: "user-search",
4141
hideOnBlur: false,
42+
isSearchClickable: true,
43+
splitTools: false,
4244
placeholderMsgId: "users.searchUsers",
4345
typeAhead: false,
4446
searchText: "",

0 commit comments

Comments
 (0)