Skip to content

Commit

Permalink
feat(UX): IE copatibility
Browse files Browse the repository at this point in the history
Make compatible with IE11

#75
  • Loading branch information
andree1985 committed Apr 10, 2019
1 parent d9d0524 commit 84f6ffd
Show file tree
Hide file tree
Showing 20 changed files with 203 additions and 145 deletions.
12 changes: 4 additions & 8 deletions NDAO_API/NDAO_API/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,10 @@ public void ConfigureServices(IServiceCollection services)
options.AddPolicy("CORSPolicy",
builder =>
{
builder.WithOrigins(
"http://localhost:8085", //NCCRD LOCAL
"http://localhost:8091", //CCIS LOCAL
"http://app01.saeon.ac.za/ccis", //CCIS LIVE
"http://app01.saeon.ac.za/nccrdsite" //NCCRD LIVE
)
.AllowAnyHeader()
.AllowAnyMethod();
builder
.AllowAnyOrigin()
.AllowAnyHeader()
.AllowAnyMethod();
});
});

Expand Down
4 changes: 2 additions & 2 deletions NDAO_Client_React/app/js/components/input/FileUpload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class FileUpload extends React.Component {

//Remove
try {
let res = await fetch(apiBaseURL + "RemoveFile", {
let res = await globalFunctions.CustomFetch(apiBaseURL + "RemoveFile", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -114,7 +114,7 @@ class FileUpload extends React.Component {

//Upload
try {
let res = await fetch(apiBaseURL + "UploadFile", {
let res = await globalFunctions.CustomFetch(apiBaseURL + "UploadFile", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,17 @@ class AME extends React.Component {
</Row>
<br />
<Row>
{selectedGoal === 1 && <Goal1Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 2 && <Goal2Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 3 && <Goal3Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 4 && <Goal4Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 5 && <Goal5Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 6 && <Goal6Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 7 && <Goal7Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 8 && <Goal8Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 9 && <Goal9Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
<Col>
{selectedGoal === 1 && <Goal1Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 2 && <Goal2Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 3 && <Goal3Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 4 && <Goal4Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 5 && <Goal5Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 6 && <Goal6Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 7 && <Goal7Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 8 && <Goal8Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
{selectedGoal === 9 && <Goal9Contrib editGoalId={editGoalId} resetEdit={this.resetEdit} />}
</Col>
</Row>
<hr />

Expand Down Expand Up @@ -248,10 +250,10 @@ class AME extends React.Component {

{/* Select goal modal */}
<Container>
<Modal
isOpen={ this.state.selectGoalModal }
toggle={() => { this.setState({ selectGoalModal: false }) }}
size="lg"
<Modal
isOpen={this.state.selectGoalModal}
toggle={() => { this.setState({ selectGoalModal: false }) }}
size="lg"
centered
>
<ModalHeader toggle={() => { this.setState({ selectGoalModal: false }) }}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'
//Images
import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
import { CustomFetch } from '../../../../globalFunctions.js';

const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
Expand Down Expand Up @@ -122,7 +123,7 @@ class Goal1Contrib extends React.Component {
})

try {
let res = await fetch(apiBaseURL + `Goals${query}`)
let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()

if (res.value && res.value.length > 0) {
Expand Down Expand Up @@ -249,7 +250,7 @@ class Goal1Contrib extends React.Component {

//Submit
try {
let res = await fetch(apiBaseURL + 'Goals', {
let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -396,7 +397,7 @@ class Goal1Contrib extends React.Component {
}

try {
let res = await fetch(metadataServiceURL, {
let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Expand Down Expand Up @@ -504,7 +505,7 @@ class Goal1Contrib extends React.Component {

try {

let res = await fetch(`${ccrdBaseURL}Projects${query}`)
let res = await CustomFetch(`${ccrdBaseURL}Projects${query}`)

if (!res.ok) {
//Get response body
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import checklist from '../../../../../images/Icons/checklist.png'

//Content
import OrganogramTemplate from '../../../../../content/OrganogramTemplate.pptx'
import { CustomFetch } from '../../../../globalFunctions.js';

const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
Expand Down Expand Up @@ -181,7 +182,7 @@ class Goal2Contrib extends React.Component {
})

try {
let res = await fetch(apiBaseURL + `Goals${query}`)
let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
Expand Down Expand Up @@ -336,7 +337,7 @@ class Goal2Contrib extends React.Component {

//Submit
try {
let res = await fetch(apiBaseURL + 'Goals', {
let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -478,7 +479,7 @@ class Goal2Contrib extends React.Component {
}

try {
let res = await fetch(metadataServiceURL, {
let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'antd/lib/slider/style/css'

import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
import { CustomFetch } from '../../../../globalFunctions.js';

const _gf = require('../../../../globalFunctions')

Expand Down Expand Up @@ -151,7 +152,7 @@ class Goal3Contrib extends React.Component {
})

try {
let res = await fetch(apiBaseURL + `Goals${query}`)
let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
Expand Down Expand Up @@ -223,7 +224,7 @@ class Goal3Contrib extends React.Component {

//Submit
try {
let res = await fetch(apiBaseURL + 'Goals', {
let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import 'antd/lib/slider/style/css'

import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
import { CustomFetch } from '../../../../globalFunctions.js';

const _gf = require('../../../../globalFunctions')

Expand Down Expand Up @@ -141,7 +142,7 @@ class Goal4Contrib extends React.Component {
})

try {
let res = await fetch(apiBaseURL + `Goals${query}`)
let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
Expand Down Expand Up @@ -211,7 +212,7 @@ class Goal4Contrib extends React.Component {

//Submit
try {
let res = await fetch(apiBaseURL + 'Goals', {
let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import 'antd/lib/slider/style/css'

import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
import { CustomFetch } from '../../../../globalFunctions.js';

const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
Expand Down Expand Up @@ -161,7 +162,7 @@ class Goal5Contrib extends React.Component {
})

try {
let res = await fetch(apiBaseURL + `Goals${query}`)
let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
Expand Down Expand Up @@ -310,7 +311,7 @@ class Goal5Contrib extends React.Component {

//Submit
try {
let res = await fetch(apiBaseURL + 'Goals', {
let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -452,7 +453,7 @@ class Goal5Contrib extends React.Component {
}

try {
let res = await fetch(metadataServiceURL, {
let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'

import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
import { CustomFetch } from '../../../../globalFunctions.js';

const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
Expand Down Expand Up @@ -152,7 +153,7 @@ class Goal6Contrib extends React.Component {
})

try {
let res = await fetch(apiBaseURL + `Goals${query}`)
let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
Expand Down Expand Up @@ -291,7 +292,7 @@ class Goal6Contrib extends React.Component {

//Submit
try {
let res = await fetch(apiBaseURL + 'Goals', {
let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -433,7 +434,7 @@ class Goal6Contrib extends React.Component {
}

try {
let res = await fetch(metadataServiceURL, {
let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'

import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
import { CustomFetch } from '../../../../globalFunctions.js';

const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
Expand Down Expand Up @@ -152,7 +153,7 @@ class Goal7Contrib extends React.Component {
})

try {
let res = await fetch(apiBaseURL + `Goals${query}`)
let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
Expand Down Expand Up @@ -291,7 +292,7 @@ class Goal7Contrib extends React.Component {

//Submit
try {
let res = await fetch(apiBaseURL + 'Goals', {
let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -433,7 +434,7 @@ class Goal7Contrib extends React.Component {
}

try {
let res = await fetch(metadataServiceURL, {
let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'

import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
import { CustomFetch } from '../../../../globalFunctions.js';

const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
Expand Down Expand Up @@ -152,7 +153,7 @@ class Goal8Contrib extends React.Component {
})

try {
let res = await fetch(apiBaseURL + `Goals${query}`)
let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
Expand Down Expand Up @@ -291,7 +292,7 @@ class Goal8Contrib extends React.Component {

//Submit
try {
let res = await fetch(apiBaseURL + 'Goals', {
let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -433,7 +434,7 @@ class Goal8Contrib extends React.Component {
}

try {
let res = await fetch(metadataServiceURL, {
let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import { metaDataCredentials } from '../../../../../js/secrets.js'

import gear from '../../../../../images/Icons/gear.png'
import checklist from '../../../../../images/Icons/checklist.png'
import { CustomFetch } from '../../../../globalFunctions.js';

const _gf = require('../../../../globalFunctions')
const _sf = require('./SharedFunctions.js')
Expand Down Expand Up @@ -152,7 +153,7 @@ class Goal9Contrib extends React.Component {
})

try {
let res = await fetch(apiBaseURL + `Goals${query}`)
let res = await CustomFetch(apiBaseURL + `Goals${query}`)
res = await res.json()
if (res.value && res.value.length > 0) {
let data = res.value[0]
Expand Down Expand Up @@ -291,7 +292,7 @@ class Goal9Contrib extends React.Component {

//Submit
try {
let res = await fetch(apiBaseURL + 'Goals', {
let res = await CustomFetch(apiBaseURL + 'Goals', {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down Expand Up @@ -433,7 +434,7 @@ class Goal9Contrib extends React.Component {
}

try {
let res = await fetch(metadataServiceURL, {
let res = await CustomFetch(metadataServiceURL, {
method: "POST",
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Expand Down
Loading

0 comments on commit 84f6ffd

Please sign in to comment.