$neutral-light-4: hsl(360, 100%, 50%);
$neutral-light-5: hsl(360, 100%, 50%);
-$neutral-dark-1: hsl(360, 100%, 50%);
-$neutral-dark-2: hsl(360, 100%, 50%);
+$neutral-dark-1: hsl(0, 0%, 63.7%);
+$neutral-dark-2: hsl(0, 0%, 56.7%);
$neutral-dark-3: hsl(0, 0%, 49.7%);
$neutral-dark-4: hsl(0, 0%, 42.7%);
$neutral-dark-5: hsl(0, 0%, 35.7%);
/* Focus */
&:focus {
/* box-shadow: $focus-shadow;*/
- border: 1px solid red;
+ border: 1px solid;
+ border-color: darken($normalHoverBackground, 10%);
}
/* SIZES
export class PanelWrapper extends Component {
render() {
+ let wrapperClass = 'skyquakePanelWrapper';
+ let {className, ...props} = this.props;
+ if(className) {
+ wrapperClass = `${wrapperClass} ${className}`
+ }
return (
- <div className={'skyquakePanelWrapper ' + this.props.className} style={this.props.style}>
+ <div className={wrapperClass} {...props}>
{this.props.children}
</div>)
}
});
}
}
-
+ evaluateSubmit = (e) => {
+ if (e.keyCode == 13) {
+ if (this.props.isEdit) {
+ this.updateUser(e);
+ } else {
+ this.createUser(e);
+ }
+ e.preventDefault();
+ e.stopPropagation();
+ }
+ }
onTransitionEnd = (e) => {
this.actions.handleHideColumns(e);
console.log('transition end')
Domain
</div>
</div>
- {state.users.map((u, k) => {
+ {state.users && state.users.map((u, k) => {
let platformRoles = [];
for(let role in u.platformRoles) {
platformRoles.push(<div>{`${role}: ${u.platformRoles[role]}`}</div>)
}
return (
- <div className={`tableRow tableRow--data ${((self.state.activeIndex == k) && !self.state.userOpen) ? 'tableRow--data-active' : ''}`} key={k}>
+ <div className={`tableRow tableRow--data ${((self.state.activeIndex == k) && self.state.userOpen) ? 'tableRow--data-active' : ''}`} key={k}>
<div
className={`userName userName-header ${((self.state.activeIndex == k) && self.state.userOpen) ? 'activeUser' : ''}`}
onClick={self.viewUser.bind(null, u, k)}>
<Button label="Add User" onClick={this.addUser} />
</ButtonGroup>
</PanelWrapper>
- <PanelWrapper
+ <PanelWrapper onKeyUp={this.evaluateSubmit}
className={`userAdmin column`}>
<Panel
title={state.isEdit ? state['user-name'] : 'Create User'}
state.isEdit ?
(
<ButtonGroup className="buttonGroup">
- <Button label="Update" onClick={this.updateUser} />
+ <Button label="Update" type="submit" onClick={this.updateUser} />
<Button label="Delete" onClick={this.deleteUser} />
</ButtonGroup>
)
: (
<ButtonGroup className="buttonGroup">
- <Button label="Create" onClick={this.createUser} />
+ <Button label="Create" type="submit" onClick={this.createUser} />
</ButtonGroup>
)
}
-
</PanelWrapper>
</PanelWrapper>
display:-ms-flexbox;
display:flex;
-ms-flex-wrap: nowrap;
- flex-wrap: nowrap;
+ flex-wrap: nowrap;
+ padding: 0.25rem;
+ margin: .125rem 0;
>div {
padding:0.25rem 1rem 0.25rem 0;
-ms-flex: 1 1 33%;
font-weight:bold;
}
&--data {
- &:hover, .activeUser{
+ &:hover, .activeUser, &-active{
cursor:pointer;
- background:$neutral-dark-3;
+ background:$neutral-dark-1;
color:white;
}
+
}
}
}
updateUserSuccess() {
this.alt.actions.global.hideScreenLoader.defer();
- let users = this.users;
+ let users = this.users || [];
users[this.activeIndex] = {
'user-name': this['user-name'],
'user-domain': this['user-domain'],
}
createUserSuccess() {
this.alt.actions.global.hideScreenLoader.defer();
- let users = this.users;
+ let users = this.users || [];
users.push({
'user-name': this['user-name'],
'user-domain': this['user-domain'],