Skip to content

Commit

Permalink
create wild_card folder for public/images which are committed
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonYCHuang authored and PiTrem committed Jun 12, 2017
1 parent 49285be commit 0f79c55
Show file tree
Hide file tree
Showing 13 changed files with 16 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -50,6 +50,7 @@
!/public/images/research_plans/.keep

/public/images/*
!/public/images/wild_card/

/uploads/attachments/*
/uploads/thumbnails
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/components/PubchemLabels.js
Expand Up @@ -28,9 +28,9 @@ export default class PubchemLabels extends React.Component {
render() {
let {element, color} = this.props

let pubchemLogo = "/images/pubchem.svg"
let pubchemLogo = "/images/wild_card/pubchem.svg"
let pubchem = (
<img src={pubchemLogo} className="pubchem-logo" />
<img src={pubchemLogo} className="pubchem-logo" />
)

let labelStyle = {
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/ResearchPlanDetails.js
Expand Up @@ -24,7 +24,7 @@ export default class ResearchPlanDetails extends Component {
svgOrLoading(research_plan) {
let svgPath = "";
if (this.state.loadingMolecule) {
svgPath = "/images/loading-bubbles.svg";
svgPath = "/images/wild_card/loading-bubbles.svg";
} else {
svgPath = research_plan.svgPath;
}
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/SampleDetails.js
Expand Up @@ -181,7 +181,7 @@ export default class SampleDetails extends React.Component {
svgOrLoading(sample) {
let svgPath = "";
if (this.state.loadingMolecule) {
svgPath = "/images/loading-bubbles.svg";
svgPath = "/images/wild_card/loading-bubbles.svg";
} else {
svgPath = sample.svgPath;
}
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/components/SampleDetailsContainers.js
Expand Up @@ -103,8 +103,8 @@ export default class SampleDetailsContainers extends Component {

PreviewImg(container) {
const rawImg = container.preview_img
const noAttSvg = '/images/no_attachment.svg'
const noAvaSvg = '/images/not_available.svg'
const noAttSvg = '/images/wild_card/no_attachment.svg'
const noAvaSvg = '/images/wild_card/not_available.svg'
switch(rawImg) {
case null:
case undefined:
Expand Down
4 changes: 2 additions & 2 deletions app/assets/javascripts/components/models/Reaction.js
Expand Up @@ -443,7 +443,7 @@ export default class Reaction extends Element {
if(this.reaction_svg_file && this.reaction_svg_file != '***')
return `/images/reactions/${this.reaction_svg_file}`
else
return `images/no_image_180.svg`
return `images/wild_card/no_image_180.svg`
}

SMGroupValid() {
Expand Down Expand Up @@ -480,7 +480,7 @@ export default class Reaction extends Element {
let group = this['_' + cats[i]]
if (group) {
let index = group.findIndex(x => x.id == material.id)

if (index >= 0) {
this['_' + cats[i]][index] = new Sample(material)
break
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/models/ResearchPlan.js
Expand Up @@ -33,7 +33,7 @@ export default class ResearchPlan extends Element {
if (this.svg_file){
return `/images/research_plans/${this.svg_file}`;
} else {
return `/images/no_image_180.svg`
return `/images/wild_card/no_image_180.svg`
}
}
}
2 changes: 1 addition & 1 deletion app/assets/javascripts/components/models/Sample.js
Expand Up @@ -658,7 +658,7 @@ export default class Sample extends Element {
get svgPath() {
if (this.sample_svg_file){
if(this.sample_svg_file === '***')
return `/images/no_image_180.svg`
return `/images/wild_card/no_image_180.svg`
else
return `/images/samples/${this.sample_svg_file}`;
} else {
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/images/wild_card/no_attachment.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
1 change: 1 addition & 0 deletions public/images/wild_card/not_available.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes

0 comments on commit 0f79c55

Please sign in to comment.