Skip to content

Commit

Permalink
clean up config file and set up correct defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
MV88 committed Apr 20, 2018
1 parent fded8f4 commit 6187467
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 22 deletions.
2 changes: 1 addition & 1 deletion web/client/components/mapcontrols/search/SearchBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ class SearchBar extends React.Component {
blurResetDelay: 300,
autoFocusOnSelect: true,
splitTools: true,
isSearchClickable: true,
isSearchClickable: false,
hideOnBlur: true,
typeAhead: true,
searchText: ""
Expand Down
25 changes: 4 additions & 21 deletions web/client/localConfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
}, {
"name": "Search",
"cfg": {
"withToggle": ["max-width: 768px", "min-width: 768px"]
"withToggle": ["max-width: 768px", "min-width: 768px"]
}
}, {
"name": "Toolbar",
Expand Down Expand Up @@ -299,7 +299,6 @@
}, {
"name": "Search",
"cfg": {
"isSearchClickable": false,
"withToggle": ["max-width: 768px", "min-width: 768px"]
}
}, {
Expand Down Expand Up @@ -425,7 +424,7 @@
}, {
"name": "Search",
"cfg": {
"withToggle": ["max-width: 768px", "min-width: 768px"]
"withToggle": ["max-width: 768px", "min-width: 768px"]
}
}, {
"name": "Toolbar",
Expand Down Expand Up @@ -456,13 +455,7 @@
"className": "navbar shadow navbar-home"
}
}, "ManagerMenu", "Login", "Language", "Attribution", "ScrollTop", "Notifications"],
"maps": ["Header", "Fork",
{
"name": "MapSearch",
"cfg": {
"splitTools" : false
}
}, "HomeDescription", "ThemeSwitcher", "CreateNewMap",
"maps": ["Header", "Fork", "MapSearch", "HomeDescription", "ThemeSwitcher", "CreateNewMap",
{
"name": "Maps",
"cfg": {
Expand Down Expand Up @@ -501,16 +494,6 @@
"containerPosition": "columns"
}
}, "Dashboard"],
"manager": ["Header", "Redirect", {
"name": "UserManager",
"cfg": {
"splitTools" : false
}
},{
"name": "GroupManager",
"cfg": {
"splitTools" : false
}
}, "Home", "Manager", "Footer"]
"manager": ["Header", "Redirect", "UserManager", "GroupManager", "Home", "Manager", "Footer"]
}
}
2 changes: 2 additions & 0 deletions web/client/plugins/MapSearch.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ const SearchBar = connect((state) => ({
hideOnBlur: false,
placeholderMsgId: "maps.search",
typeAhead: false,
splitTools: false,
isSearchClickable: true,
start: state && state.maps && state.maps.start,
limit: state && state.maps && state.maps.limit,
searchText: state.maps && state.maps.searchText !== '*' && state.maps.searchText || ""
Expand Down
4 changes: 4 additions & 0 deletions web/client/plugins/Search.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,8 @@ const SearchPlugin = connect((state) => ({
}))(
class extends React.Component {
static propTypes = {
splitTools: PropTypes.bool,
isSearchClickable: PropTypes.bool,
fitResultsToMapSize: PropTypes.bool,
searchOptions: PropTypes.object,
resultsStyle: PropTypes.object,
Expand All @@ -171,6 +173,8 @@ class extends React.Component {
searchOptions: {
services: [{type: "nominatim"}]
},
isSearchClickable: false,
splitTools: true,
resultsStyle: {
color: '#3388ff',
weight: 4,
Expand Down
2 changes: 2 additions & 0 deletions web/client/plugins/manager/GroupManager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class GroupManager extends React.Component {
static defaultProps = {
className: "user-search",
hideOnBlur: false,
isSearchClickable: true,
splitTools: false,
placeholderMsgId: "usergroups.searchGroups",
typeAhead: false,
searchText: "",
Expand Down
2 changes: 2 additions & 0 deletions web/client/plugins/manager/UserManager.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ class UserManager extends React.Component {
static defaultProps = {
className: "user-search",
hideOnBlur: false,
isSearchClickable: true,
splitTools: false,
placeholderMsgId: "users.searchUsers",
typeAhead: false,
searchText: "",
Expand Down

0 comments on commit 6187467

Please sign in to comment.