Skip to content
This repository has been archived by the owner on Dec 13, 2020. It is now read-only.

Commit

Permalink
#446 Changes after API implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
damianprzygodzki committed Mar 6, 2017
1 parent 597594a commit 15ab6b2
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 deletions.
5 changes: 3 additions & 2 deletions src/assets/css/inputs.css
Original file line number Diff line number Diff line change
Expand Up @@ -450,12 +450,13 @@ input:checked + .input-slider:before {

.input-error.input-primary,
.input-error.input-primary * {
background-color: $brand-danger-light-color;
border-color: $brand-danger-color !important;
background-color: $brand-danger-light-color !important;
}

.input-error.input-secondary,
.input-error.input-secondary * {
border-width: 2px;
border-color: $brand-danger-color !important;
}

.input-secondary .input-icon {
Expand Down
14 changes: 9 additions & 5 deletions src/components/widget/List/RawList.js
Original file line number Diff line number Diff line change
Expand Up @@ -266,17 +266,21 @@ class RawList extends Component {
'input-dropdown-container ' +
(readonly ? 'input-disabled ' : '') +
(rowId ? 'input-dropdown-container-static ' : '') +
((rowId && !isModal) ? 'input-table ' : '') +
(validStatus &&
!validStatus.valid &&
!isOpen ? 'input-error ' : '')
((rowId && !isModal) ? 'input-table ' : '')
}
>
<div className={
'input-dropdown input-block input-readonly input-' +
(rank ? rank : 'secondary') +
(updated ? ' pulse ' : ' ') +
((mandatory && !selected) ? 'input-mandatory ' : '')
((mandatory && !selected) ? 'input-mandatory ' : '') +
(validStatus &&
(
!validStatus.valid &&
!validStatus.initialValue

) &&
!isOpen ? 'input-error ' : '')
}>
<div className={
'input-editable input-dropdown-focused ' +
Expand Down
12 changes: 8 additions & 4 deletions src/components/widget/Lookup/Lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -389,16 +389,20 @@ class Lookup extends Component {
(isOpen ? 'input-focused ' : '') +
(readonly ? 'input-disabled ' : '') +
(rowId ? 'input-dropdown-container-static ' : '') +
((rowId && !isModal)? 'input-table ' : '') +
((validStatus &&
!validStatus.valid) ? 'input-error ' : '')
((rowId && !isModal)? 'input-table ' : '')
}
>
<div className={
'input-dropdown input-block input-' + (rank ? rank : 'primary') +
(updated ? ' pulse-on' : ' pulse-off') +
(filterWidget ? ' input-full' : '') +
(mandatory && isInputEmpty ? ' input-mandatory ' : '')
(mandatory && isInputEmpty ? ' input-mandatory ' : '') +
((validStatus &&
(
!validStatus.valid &&
!validStatus.initialValue
)
) ? 'input-error ' : '')
}>
<div className={
'input-editable ' +
Expand Down
8 changes: 5 additions & 3 deletions src/components/widget/RawWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ class RawWidget extends Component {
} = this.props;

const {isEdited} = this.state;

return 'input-block ' +
(icon ? 'input-icon-container ' : '') +
(widgetData[0].readonly || disabled ? 'input-disabled ' : '') +
((widgetData[0].validStatus &&
!widgetData[0].validStatus.valid &&
!isEdited) ? 'input-error ' : '') +
(
!widgetData[0].validStatus.valid &&
!widgetData[0].validStatus.initialValue
) &&
!isEdited) ? 'input-error ' : '') +
(widgetData[0].mandatory &&
widgetData[0].value &&
widgetData[0].value.length === 0 ? 'input-mandatory ' : '') +
Expand Down

0 comments on commit 15ab6b2

Please sign in to comment.