Skip to content

Commit

Permalink
added ver_1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
sujeetvkulkarni committed Oct 18, 2021
1 parent 57d45f6 commit ab68c47
Show file tree
Hide file tree
Showing 61 changed files with 3,594 additions and 1,482 deletions.
44 changes: 36 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
"protvista-sequence": "^2.10.0",
"protvista-tooltip": "^2.12.0",
"protvista-track": "^2.12.0",
"query-string": "^7.0.1",
"react": "^16.13.1",
"react-bootstrap": "^1.0.0-beta.16",
"react-bootstrap-table-next": "^3.3.3",
Expand Down
10 changes: 10 additions & 0 deletions public/downloads/citation/30715201.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@article{mehta2019glad,
title={GLAD: GLycan Array Dashboard, a visual analytics tool for glycan microarrays},
author={Mehta, Akul Y and Cummings, Richard D},
journal={Bioinformatics},
volume={35},
number={18},
pages={3536--3537},
year={2019},
publisher={Oxford University Press}
}
14 changes: 14 additions & 0 deletions public/downloads/citation/31616925.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@article{york2020glygen,
title={GlyGen: computational and informatics resources for
glycoscience},
author={York, William S and Mazumder, Raja and Ranzinger, Rene
and Edwards, Nathan and Kahsay, Robel and Aoki-Kinoshita, Kiyoko
F and Campbell, Matthew P and Cummings, Richard D and Feizi, Ten
and Martin, Maria and others},
journal={Glycobiology},
volume={30},
number={2},
pages={72--73},
year={2020},
publisher={Oxford University Press}
}
11 changes: 11 additions & 0 deletions public/downloads/citation/31841142.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@article{cao2020glymdb,
title={GlyMDB: Glycan Microarray Database and analysis toolset},
author={Cao, Yiwei and Park, Sang-Jun and Mehta, Akul Y and Cummings, Richard D and Im,
Wonpil},
journal={Bioinformatics},
volume={36},
number={8},
pages={2438--2442},
year={2020},
publisher={Oxford University Press}
}
10 changes: 10 additions & 0 deletions public/downloads/citation/32170934.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@article{mehta2020glycoglyph,
title={GlycoGlyph: a glycan visualizing, drawing and naming application},
author={Mehta, Akul Y and Cummings, Richard D},
journal={Bioinformatics},
volume={36},
number={11},
pages={3613--3614},
year={2020},
publisher={Oxford University Press}
}
8 changes: 8 additions & 0 deletions public/downloads/citation/32324859.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@article{kahsay2020glygen,
title={GlyGen data model and processing workflow},
author={Kahsay, Robel and Vora, Jeet and Navelkar, Rahi and Mousavi, Reza
and Fochtman, Brian and Holmes, Xavier and Pattabiraman, Nagarajan and
Ranzinger, Rene and Mahadik, Rupali and Williamson, Tatiana and others},
journal={Bioinformatics},
year={2020}
}
19 changes: 19 additions & 0 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -759,6 +759,18 @@ ul.office-details {
border-radius: 4px;
margin: 5px !important;
}
.gg-tooltip-hitscore {
background-color: #fff !important;
color: rgba(0, 0, 0, 0.87) !important;
font-size: 16px !important;
border: 1px solid #eee !important;
-webkit-box-shadow: 5px 10px 40px 0 rgba(0, 0, 0, 0.2);
box-shadow: 5px 10px 40px 0 rgba(0, 0, 0, 0.2);
border-radius: 4px;
margin: 5px !important;
padding: 15px !important;
max-width: 700px !important;
}
.gg-helpicon {
margin-right: 8px !important;
font-size: large !important;
Expand Down Expand Up @@ -1196,6 +1208,13 @@ sub {
justify-content: space-between;
}

.alert-text {
overflow: auto;
word-break: break-all;
word-wrap: break-word;
white-space: pre-line;
}

/*! does not work on Firefox */

/*! Other Browser */
Expand Down
55 changes: 55 additions & 0 deletions src/components/ClientTable.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import React from "react";
import "bootstrap/dist/css/bootstrap.min.css";
import "react-bootstrap-table-next/dist/react-bootstrap-table2.min.css";
import Table from 'react-bootstrap/Table'

/**
* ClientTable component with no pagination support. Supports footer for total.
*/
const ClientTable = ({
data,
columns,
totalName,
totalColspan,
total
}) => {

return (
<div>
<Table striped bordered hover responsive size="sm">
<thead style={{
backgroundColor: "#4B85B6",
color: "#FFFFFF",
height: "35px"
}}>
<tr>
{columns && (
columns.map((item) =>
<th>{item.name}</th>
)
)}
</tr>
</thead>
<tbody>
{data && (
data.map((dataItem) =>
<tr>
{columns && (
columns.map((item) =>
<td>{dataItem[item.dataField]}</td>
)
)}
</tr>
)
)}
<tr>
<th colSpan={totalColspan}>{totalName}</th>
<th>{total}</th>
</tr>
</tbody>
</Table>
</div>
);
};

export default ClientTable;
55 changes: 39 additions & 16 deletions src/components/FeedbackWidget.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FaRegLightbulb } from "react-icons/fa";
import { AiFillQuestionCircle } from "react-icons/ai";
import { AiFillBug } from "react-icons/ai";
import { postTo } from "../data/api";
import { validateEmail } from "../utils/common";
import { validateEmail, replaceSpecialCharacters } from "../utils/common";
import { Typography } from "@material-ui/core";
import CloseIcon from "@material-ui/icons/Close";

Expand Down Expand Up @@ -45,15 +45,27 @@ const FeedbackWidget = (props) => {

const handleSubmit = (e) => {
e.preventDefault();
setContactUsResponseMessage();
setContactUsErrorMessage();

let firstName = fname;
let lastName = "not given";

let temp = fname.trim();
let index = temp.indexOf(" ");
if (index > 0){
firstName = temp.substring(0, index);
lastName = temp.substring(index+1).trim();
}

const formData = {
fname: fname,
lname: "not given",
fname: firstName,
lname: lastName,
email: email,
page: window.location.href,
page: escape(replaceSpecialCharacters(window.location.href)),
// page: window.location.href.split("?")[0],
subject: "Feedback Form " + subject,
message: message,
message: escape(replaceSpecialCharacters(message)),
};

const url = `/auth/contact?query=${JSON.stringify(formData)}`;
Expand All @@ -62,15 +74,14 @@ const FeedbackWidget = (props) => {
};
postTo(url, myHeaders)
.then((response) => {
setContactUsResponseMessage(response.data.message);
setContactUsResponseMessage("We have received your message and will make every effort to respond to you within a reasonable amount of time.");
resetForm();
})
.catch((error) => {
setContactUsErrorMessage(
"Oops, something went wrong! We did not receive your message. Please try again later."
);
});

resetForm();
};

const resetForm = () => {
Expand All @@ -93,7 +104,7 @@ const FeedbackWidget = (props) => {
};

const onlyText = (e) => {
e.target.value = e.target.value.replace(/[^a-zA-Z-]/g, "");
e.target.value = e.target.value.replace(/[^a-zA-Z- ]/g, "");
};

return (
Expand Down Expand Up @@ -129,7 +140,11 @@ const FeedbackWidget = (props) => {
>
<span
className={subject === "Problem" ? "active" : ""}
onClick={() => setSubject("Problem")}
onClick={() => {
setSubject("Problem")
setContactUsResponseMessage();
setContactUsErrorMessage();
}}
>
<AiFillBug /> Problem{" "}
</span>
Expand All @@ -145,7 +160,11 @@ const FeedbackWidget = (props) => {
>
<span
className={subject === "Question" ? "active" : ""}
onClick={() => setSubject("Question")}
onClick={() => {
setSubject("Question")
setContactUsResponseMessage();
setContactUsErrorMessage();
}}
>
<AiFillQuestionCircle /> Question
</span>
Expand All @@ -160,7 +179,11 @@ const FeedbackWidget = (props) => {
>
<span
className={subject === "Suggestion" ? "active" : " "}
onClick={() => setSubject("Suggestion")}
onClick={() => {
setSubject("Suggestion")
setContactUsResponseMessage();
setContactUsErrorMessage();
}}
>
<FaRegLightbulb /> Suggestion
</span>
Expand All @@ -182,7 +205,7 @@ const FeedbackWidget = (props) => {
placeholder="Your Feedback."
error={
(formValidated || messageValidated) &&
(message === "" || message.length < 5 || message.length > messageMaxLen)
(message.trim() === "" || message.length < 5 || message.length > messageMaxLen)
}
onChange={(e) => {
setMessage(e.target.value);
Expand All @@ -193,7 +216,7 @@ const FeedbackWidget = (props) => {
onBlur={() => setMessageValidated(true)}
helperText={
(formValidated || messageValidated) &&
((message === "" && "Please leave us a message.") ||
((message.trim() === "" && "Please leave us a message.") ||
((message.length < 5 || message.length > messageMaxLen) &&
`Message should be between 5 to ${messageMaxLen} characters`))
}
Expand Down Expand Up @@ -228,15 +251,15 @@ const FeedbackWidget = (props) => {
name="fname"
value={fname}
placeholder="Your Name (will not be published)"
error={(formValidated || fNameValidated) && fname === ""}
error={(formValidated || fNameValidated) && fname.trim() === ""}
onChange={(e) => {
setFName(e.target.value);
setContactUsResponseMessage();
setContactUsErrorMessage();
}}
onBlur={() => setFNameValidated(true)}
helperText={
(formValidated || fNameValidated) && fname === "" && "First name is required."
(formValidated || fNameValidated) && fname.trim() === "" && "Name is required."
}
onInput={(e) => onlyText(e)}
style={{ margin: "5px 0 15px 0" }}
Expand Down
Loading

0 comments on commit ab68c47

Please sign in to comment.