-
Notifications
You must be signed in to change notification settings - Fork 416
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
Fix #2798 change configuration and make search icon clickable and configurable #2831
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -299,7 +299,8 @@ | |
}, { | ||
"name": "Search", | ||
"cfg": { | ||
"withToggle": ["max-width: 768px", "min-width: 768px"] | ||
"isSearchClickable": false, | ||
"withToggle": ["max-width: 768px", "min-width: 768px"] | ||
} | ||
}, { | ||
"name": "Toolbar", | ||
|
@@ -455,7 +456,13 @@ | |
"className": "navbar shadow navbar-home" | ||
} | ||
}, "ManagerMenu", "Login", "Language", "Attribution", "ScrollTop", "Notifications"], | ||
"maps": ["Header", "Fork", "MapSearch", "HomeDescription", "ThemeSwitcher", "CreateNewMap", | ||
"maps": ["Header", "Fork", | ||
{ | ||
"name": "MapSearch", | ||
"cfg": { | ||
"splitTools" : false | ||
} | ||
}, "HomeDescription", "ThemeSwitcher", "CreateNewMap", | ||
{ | ||
"name": "Maps", | ||
"cfg": { | ||
|
@@ -494,6 +501,16 @@ | |
"containerPosition": "columns" | ||
} | ||
}, "Dashboard"], | ||
"manager": ["Header", "Redirect", "Manager", "Home", "UserManager", "GroupManager", "Footer"] | ||
"manager": ["Header", "Redirect", { | ||
"name": "UserManager", | ||
"cfg": { | ||
"splitTools" : false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remove this config and set as default |
||
} | ||
},{ | ||
"name": "GroupManager", | ||
"cfg": { | ||
"splitTools" : false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please remove this config and set as default |
||
} | ||
}, "Home", "Manager", "Footer"] | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,8 @@ class GroupManager extends React.Component { | |
hideOnBlur: PropTypes.bool, | ||
placeholderMsgId: PropTypes.string, | ||
typeAhead: PropTypes.bool, | ||
splitTools: PropTypes.bool, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. set splitTools default to false |
||
isSearchClickable: PropTypes.bool, | ||
searchText: PropTypes.string, | ||
onSearch: PropTypes.func, | ||
onSearchReset: PropTypes.func, | ||
|
@@ -56,6 +58,8 @@ class GroupManager extends React.Component { | |
return (<div> | ||
<SearchBar | ||
className={this.props.className} | ||
splitTools={this.props.splitTools} | ||
isSearchClickable={this.props.isSearchClickable} | ||
hideOnBlur={this.props.hideOnBlur} | ||
placeholderMsgId ={this.props.placeholderMsgId} | ||
onSearch={this.props.onSearch} | ||
|
@@ -91,10 +95,11 @@ module.exports = { | |
onNewGroup: editGroup.bind(null, {}), | ||
onSearchTextChange: groupSearchTextChanged, | ||
onSearch: getUserGroups | ||
}, (stateProps, dispatchProps) => { | ||
}, (stateProps, dispatchProps, ownProps) => { | ||
return { | ||
...stateProps, | ||
...dispatchProps, | ||
...ownProps, | ||
onSearchReset: (text) => { | ||
let limit = stateProps.limit; | ||
let searchText = text && text !== "" ? "*" + text + "*" : "*"; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,8 @@ const {trim} = require('lodash'); | |
class UserManager extends React.Component { | ||
static propTypes = { | ||
onNewUser: PropTypes.func, | ||
splitTools: PropTypes.bool, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. set splitTools default to false |
||
isSearchClickable: PropTypes.bool, | ||
className: PropTypes.string, | ||
hideOnBlur: PropTypes.bool, | ||
placeholderMsgId: PropTypes.string, | ||
|
@@ -56,6 +58,8 @@ class UserManager extends React.Component { | |
return (<div> | ||
<SearchBar | ||
className={this.props.className} | ||
splitTools={this.props.splitTools} | ||
isSearchClickable={this.props.isSearchClickable} | ||
hideOnBlur={this.props.hideOnBlur} | ||
placeholderMsgId ={this.props.placeholderMsgId} | ||
onSearch={this.props.onSearch} | ||
|
@@ -90,10 +94,11 @@ module.exports = { | |
onNewUser: editUser.bind(null, {role: "USER", "enabled": true}), | ||
onSearchTextChange: usersSearchTextChanged, | ||
onSearch: getUsers | ||
}, (stateProps, dispatchProps) => { | ||
}, (stateProps, dispatchProps, ownProps) => { | ||
return { | ||
...stateProps, | ||
...dispatchProps, | ||
...ownProps, | ||
onSearchReset: (text) => { | ||
let limit = stateProps.limit; | ||
let searchText = text && text !== "" ? "*" + text + "*" : "*"; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please remove this config and set as default