Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/components/containers/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ import { image } from './HeaderImage';
import '../../../config/styles';

export class App extends Component {

componentDidMount(){
// Has High Contrast Mode been enabled?
if (document.cookie.split(';').filter((item) => item.includes('enabledHighContrast=true')).length) {
let bodyTag = document.getElementsByTagName("body")[0];
bodyTag.classList.add("high-contrast");
}
}

render() {
const { requestError, patientsInfo } = this.props;
const isTouchDevice = (this.props.isTouchDevice) ? 'touch-device' : ('ontouchstart' in window) ? 'touch-device' : 'is-not-touch-device';
Expand Down
8 changes: 5 additions & 3 deletions src/components/containers/UserPanel/UserAccountPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,11 @@ export default class UserAccountPanel extends PureComponent {
<div className="user-profile-info">
<div
className="user-profile-info__item name"
onClick={() =>{
this.context.router.history.push(clientUrls.USER_PROFILE);
onClick('')
onClick={() => {
if (themeConfigs.isShowUserAccountPage) {
this.context.router.history.push(clientUrls.USER_PROFILE);
onClick('');
}
}}
>{user.given_name} {user.family_name}</div>
<div className="user-profile-info__descr">
Expand Down
6 changes: 4 additions & 2 deletions src/components/containers/UserPanel/UserPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ export default class UserPanel extends PureComponent {

//TODO: Should we remember this in a cookie?
if( bodyTag.classList.contains("high-contrast") ){
bodyTag.classList.remove("high-contrast")
bodyTag.classList.remove("high-contrast");
document.cookie = 'enabledHighContrast=false';
} else {
bodyTag.classList.add("high-contrast")
bodyTag.classList.add("high-contrast");
document.cookie = 'enabledHighContrast=true';
}
};

Expand Down
13 changes: 5 additions & 8 deletions src/components/pages/Allergies/Allergies.js
Original file line number Diff line number Diff line change
Expand Up @@ -323,14 +323,11 @@ export default class Allergies extends PureComponent {
const hiddenButtons = get(themeConfigs, 'buttonsToHide.allergies', []);

return (<section className="page-wrapper">
{!(isDetailPanelVisible || isCreatePanelVisible) ?
<PluginBanner
title='Allergies'
subTitle='Those things that your body reacts against , that you have an allergy to'
img={imageSource}
/>
: null
}
<PluginBanner
title='Allergies'
subTitle='Those things that your body reacts against , that you have an allergy to'
img={imageSource}
/>
<div className={classNames('section', { 'full-panel full-panel-main': isPanelMain, 'full-panel full-panel-details': (isPanelDetails || isPanelCreate) })}>
<Row>
{(isPanelMain || expandedPanel === 'all') ? <Col xs={12} className={classNames({ 'col-panel-main': isSecondPanel })}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ exports[`Component <Allergies /> should renders correctly and testing context an
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="Those things that your body reacts against , that you have an allergy to"
title="Allergies"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -280,6 +286,12 @@ exports[`Component <Allergies /> should renders correctly with allergiesDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="Those things that your body reacts against , that you have an allergy to"
title="Allergies"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -384,6 +396,12 @@ exports[`Component <Allergies /> should renders correctly with allergiesDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="Those things that your body reacts against , that you have an allergy to"
title="Allergies"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -488,6 +506,12 @@ exports[`Component <Allergies /> should renders correctly with allergiesDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="Those things that your body reacts against , that you have an allergy to"
title="Allergies"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -600,6 +624,12 @@ exports[`Component <Allergies /> should renders correctly with allergiesDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="Those things that your body reacts against , that you have an allergy to"
title="Allergies"
toRight={false}
/>
<div
className="section full-panel full-panel-details"
>
Expand Down Expand Up @@ -651,6 +681,12 @@ exports[`Component <Allergies /> should renders correctly with allergiesDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="Those things that your body reacts against , that you have an allergy to"
title="Allergies"
toRight={false}
/>
<div
className="section"
>
Expand Down
13 changes: 5 additions & 8 deletions src/components/pages/Contacts/Contacts.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,11 @@ export default class Contacts extends PureComponent {
}

return (<section className="page-wrapper">
{!(isDetailPanelVisible || isCreatePanelVisible) ?
<PluginBanner
title="Contacts"
subTitle="The key people in your life, that you keep in contact with on a regular basis"
img={imageSource}
/>
: null
}
<PluginBanner
title="Contacts"
subTitle="The key people in your life, that you keep in contact with on a regular basis"
img={imageSource}
/>
<div className={classNames('section', { 'full-panel full-panel-main': isPanelMain, 'full-panel full-panel-details': (isPanelDetails || isPanelCreate) })}>
<Row>
{(isPanelMain || expandedPanel === 'all') ? <Col xs={12} className={classNames({ 'col-panel-main': isSecondPanel })}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ exports[`Component <Contacts /> should renders correctly and testing context and
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key people in your life, that you keep in contact with on a regular basis"
title="Contacts"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -197,6 +203,12 @@ exports[`Component <Contacts /> should renders correctly with contactsDetail and
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key people in your life, that you keep in contact with on a regular basis"
title="Contacts"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -299,6 +311,12 @@ exports[`Component <Contacts /> should renders correctly with contactsDetail and
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key people in your life, that you keep in contact with on a regular basis"
title="Contacts"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -401,6 +419,12 @@ exports[`Component <Contacts /> should renders correctly with diagnosisDetail an
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key people in your life, that you keep in contact with on a regular basis"
title="Contacts"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -513,6 +537,12 @@ exports[`Component <Contacts /> should renders correctly with diagnosisDetail an
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key people in your life, that you keep in contact with on a regular basis"
title="Contacts"
toRight={false}
/>
<div
className="section full-panel full-panel-details"
>
Expand Down Expand Up @@ -565,6 +595,12 @@ exports[`Component <Contacts /> should renders correctly with diagnosisDetail an
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key people in your life, that you keep in contact with on a regular basis"
title="Contacts"
toRight={false}
/>
<div
className="section"
>
Expand Down
13 changes: 5 additions & 8 deletions src/components/pages/Diagnosis/Diagnosis.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,14 +315,11 @@ export default class ProblemsDiagnosis extends PureComponent {
const hiddenButtons = get(themeConfigs, 'buttonsToHide.diagnoses', []);

return (<section className="page-wrapper">
{!(isDetailPanelVisible || isCreatePanelVisible) ?
<PluginBanner
title={problemsTitle}
subTitle='The key problems that affect your health, some with clear diagnoses from your doctor'
img={imageSource}
/>
: null
}
<PluginBanner
title={problemsTitle}
subTitle='The key problems that affect your health, some with clear diagnoses from your doctor'
img={imageSource}
/>
<div className={classNames('section', { 'full-panel full-panel-main': isPanelMain, 'full-panel full-panel-details': (isPanelDetails || isPanelCreate) })}>
<Row>
{(isPanelMain || expandedPanel === 'all') ? <Col xs={12} className={classNames({ 'col-panel-main': isSecondPanel })}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ exports[`Component <Diagnosis /> should renders correctly and testing context an
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key problems that affect your health, some with clear diagnoses from your doctor"
title="Problems / Diagnosis"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -281,6 +287,12 @@ exports[`Component <Diagnosis /> should renders correctly with diagnosesDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key problems that affect your health, some with clear diagnoses from your doctor"
title="Problems / Diagnosis"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -386,6 +398,12 @@ exports[`Component <Diagnosis /> should renders correctly with diagnosesDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key problems that affect your health, some with clear diagnoses from your doctor"
title="Problems / Diagnosis"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -491,6 +509,12 @@ exports[`Component <Diagnosis /> should renders correctly with diagnosisDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key problems that affect your health, some with clear diagnoses from your doctor"
title="Problems / Diagnosis"
toRight={false}
/>
<div
className="section"
>
Expand Down Expand Up @@ -602,6 +626,12 @@ exports[`Component <Diagnosis /> should renders correctly with diagnosisDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key problems that affect your health, some with clear diagnoses from your doctor"
title="Problems / Diagnosis"
toRight={false}
/>
<div
className="section full-panel full-panel-details"
>
Expand Down Expand Up @@ -651,6 +681,12 @@ exports[`Component <Diagnosis /> should renders correctly with diagnosisDetail a
<section
className="page-wrapper"
>
<PluginBanner
img={null}
subTitle="The key problems that affect your health, some with clear diagnoses from your doctor"
title="Problems / Diagnosis"
toRight={false}
/>
<div
className="section full-panel full-panel-details"
>
Expand Down
13 changes: 5 additions & 8 deletions src/components/pages/Medications/Medications.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,11 @@ export default class Medications extends PureComponent {
const hiddenButtons = get(themeConfigs, 'buttonsToHide.medications', []);

return (<section className="page-wrapper">
{!(isDetailPanelVisible || isCreatePanelVisible) ?
<PluginBanner
title='Medications'
subTitle='The medical tablets and other medications that you take regularly for your health care'
img={imageSource}
/>
: null
}
<PluginBanner
title='Medications'
subTitle='The medical tablets and other medications that you take regularly for your health care'
img={imageSource}
/>
<div className={classNames('section', { 'full-panel full-panel-main': isPanelMain, 'full-panel full-panel-details': (isPanelDetails || isPanelCreate) })}>
<Row>
{(isPanelMain || expandedPanel === 'all') ? <Col xs={12} className={classNames({ 'col-panel-main': isSecondPanel })}>
Expand Down
Loading