mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
information added to forms and delete form title changed, acl information component created, information text is added to the constants
This commit is contained in:
parent
434d852666
commit
b4b05b3161
@ -173,8 +173,8 @@ let AclButton = React.createClass({
|
|||||||
{this.sanitizeAction()}
|
{this.sanitizeAction()}
|
||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
handleSuccess={aclProps.handleSuccess}
|
handleSuccess = {aclProps.handleSuccess}
|
||||||
title={aclProps.title}>
|
title = {aclProps.title}>
|
||||||
{aclProps.form}
|
{aclProps.form}
|
||||||
</ModalWrapper>
|
</ModalWrapper>
|
||||||
);
|
);
|
||||||
|
@ -4,8 +4,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import classnames from 'classnames';
|
import classnames from 'classnames';
|
||||||
|
|
||||||
import { getLangText } from '../../utils/lang_utils';
|
import AclInformation from '../ascribe_information/acl_information';
|
||||||
|
|
||||||
import Button from 'react-bootstrap/lib/Button';
|
import Button from 'react-bootstrap/lib/Button';
|
||||||
|
|
||||||
let AclInformationButton = React.createClass({
|
let AclInformationButton = React.createClass({
|
||||||
@ -13,78 +12,14 @@ let AclInformationButton = React.createClass({
|
|||||||
return {isVisible: false};
|
return {isVisible: false};
|
||||||
},
|
},
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
//let rows = [];
|
console.log('Information button being launched');
|
||||||
let titleStyle = {
|
|
||||||
color: '#02B6A3',
|
|
||||||
fontSize: '11px',
|
|
||||||
lineHeight: '3px'
|
|
||||||
};
|
|
||||||
|
|
||||||
let infoStyle = {
|
|
||||||
color: '#333333',
|
|
||||||
fontSize: '11px',
|
|
||||||
lineHeight: '3px'
|
|
||||||
};
|
|
||||||
|
|
||||||
let exampleStyle = {
|
|
||||||
color: '#B2B2B2',
|
|
||||||
fontSize: '11px',
|
|
||||||
lineHeight: '3px'
|
|
||||||
};
|
|
||||||
|
|
||||||
let paragraphStyle = {
|
|
||||||
margin: '0.1em',
|
|
||||||
lineHeight: '15px'
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
let enabledIndices = this.props.verbs;
|
|
||||||
let titleList = ['TRANSFER', 'CONSIGN', 'LOAN', 'SHARE', 'DELETE'];
|
|
||||||
|
|
||||||
let infoSentenceList = [
|
|
||||||
' - Changes ownership of an Edition. As with a physical piece of work, ' +
|
|
||||||
'transferring ownership of an Edition does not transfer copyright in the Work.',
|
|
||||||
|
|
||||||
' - Lets someone represent you in dealing with the work, under the terms you agree to.',
|
|
||||||
|
|
||||||
' - Lets someone use or put the Work on display for a limited amount of time.',
|
|
||||||
|
|
||||||
' - Lets someone view the Work or Edition, but does not give rights to publish or display it.',
|
|
||||||
|
|
||||||
' - Removes the Work from your Wallet. Note that the previous registration and transfer ' +
|
|
||||||
'history will still exist on the blockchain and cannot be deleted.'];
|
|
||||||
|
|
||||||
let exampleSentenceList = [
|
|
||||||
'(e.g. a musician Transfers limited edition 1 of 10 of her new album to a very happy fan)',
|
|
||||||
|
|
||||||
'(e.g. an artist Consigns 10 Editions of her new Work to a gallery ' +
|
|
||||||
'so the gallery can sell them on her behalf, under the terms the artist and the gallery have agreed to)',
|
|
||||||
|
|
||||||
'(e.g. a collector Loans a Work to a gallery for one month for display in the gallery\'s show)',
|
|
||||||
|
|
||||||
'(e.g. a photographer Shares proofs of a graduation photo with the graduate\'s grandparents)',
|
|
||||||
|
|
||||||
'(e.g. an artist uploaded the wrong file and doesn\'t want it cluttering his Wallet, so he Deletes it)'];
|
|
||||||
|
|
||||||
|
|
||||||
let createJSXTextSnippet = function(title, info, example){
|
|
||||||
return (<p style={paragraphStyle}> <span style={titleStyle}> {title} </span>
|
|
||||||
<span style={infoStyle}> {info} <br/> </span>
|
|
||||||
<span style={exampleStyle}> {example} </span> </p>);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.rows = enabledIndices.map((i)=>{
|
|
||||||
return (createJSXTextSnippet(getLangText(titleList[i]), getLangText(infoSentenceList[i]),
|
|
||||||
getLangText(exampleSentenceList[i]),
|
|
||||||
titleStyle, infoStyle, exampleStyle));
|
|
||||||
});
|
|
||||||
|
|
||||||
this.dropdownButtonStyle = {
|
this.dropdownButtonStyle = {
|
||||||
background: 'none',
|
background: 'none',
|
||||||
color: 'black',
|
color: 'black',
|
||||||
padding: 0,
|
padding: 0,
|
||||||
border: 'none'
|
border: 'none'
|
||||||
};
|
};
|
||||||
|
|
||||||
this.dropdownListStyle = {
|
this.dropdownListStyle = {
|
||||||
textAlign: 'justify',
|
textAlign: 'justify',
|
||||||
width: '80.8%',
|
width: '80.8%',
|
||||||
@ -103,7 +38,7 @@ let AclInformationButton = React.createClass({
|
|||||||
},
|
},
|
||||||
showInformation() {
|
showInformation() {
|
||||||
if (this.state.isVisible) {
|
if (this.state.isVisible) {
|
||||||
return this.rows;
|
return (<AclInformation aim={'button'} verbs={this.props.verbs}/>);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
|
@ -42,10 +42,10 @@ let DeleteButton = React.createClass({
|
|||||||
|
|
||||||
if(this.props.piece && !this.props.editions) {
|
if(this.props.piece && !this.props.editions) {
|
||||||
content = <PieceDeleteForm pieceId={this.props.piece.id}/>;
|
content = <PieceDeleteForm pieceId={this.props.piece.id}/>;
|
||||||
title = getLangText('Remove Piece');
|
title = getLangText('Delete Piece');
|
||||||
} else {
|
} else {
|
||||||
content = <EditionDeleteForm editions={this.props.editions}/>;
|
content = <EditionDeleteForm editions={this.props.editions}/>;
|
||||||
title = getLangText('Remove Edition');
|
title = getLangText('Delete Edition');
|
||||||
}
|
}
|
||||||
|
|
||||||
btnDelete = <Button bsStyle="danger" className="btn-delete" bsSize="small">{getLangText('DELETE')}</Button>;
|
btnDelete = <Button bsStyle="danger" className="btn-delete" bsSize="small">{getLangText('DELETE')}</Button>;
|
||||||
|
@ -251,7 +251,7 @@ let EditionSummary = React.createClass({
|
|||||||
Object.keys(acl).forEach((key) => {
|
Object.keys(acl).forEach((key) => {
|
||||||
let index = verbsToCheck.indexOf(key);
|
let index = verbsToCheck.indexOf(key);
|
||||||
if (acl[key] === true && index !== -1) {
|
if (acl[key] === true && index !== -1) {
|
||||||
verbListIndices.push(index);
|
verbListIndices.push(verbsToCheck[index].slice(4));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
return verbListIndices;
|
return verbListIndices;
|
||||||
|
@ -288,10 +288,8 @@ let Form = React.createClass({
|
|||||||
{this.renderChildren()}
|
{this.renderChildren()}
|
||||||
{this.getButtons()}
|
{this.getButtons()}
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
export default Form;
|
export default Form;
|
||||||
|
@ -10,7 +10,7 @@ import InputTextAreaToggable from './input_textarea_toggable';
|
|||||||
|
|
||||||
import AppConstants from '../../constants/application_constants';
|
import AppConstants from '../../constants/application_constants';
|
||||||
import { getLangText } from '../../utils/lang_utils.js';
|
import { getLangText } from '../../utils/lang_utils.js';
|
||||||
|
import AclInformation from '../ascribe_information/acl_information';
|
||||||
|
|
||||||
let ConsignForm = React.createClass({
|
let ConsignForm = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
@ -45,6 +45,7 @@ let ConsignForm = React.createClass({
|
|||||||
<div className="modal-footer">
|
<div className="modal-footer">
|
||||||
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_small.gif'} />
|
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_small.gif'} />
|
||||||
</div>}>
|
</div>}>
|
||||||
|
<AclInformation aim={'form'} verbs={'consign'}/>
|
||||||
<Property
|
<Property
|
||||||
name='consignee'
|
name='consignee'
|
||||||
label={getLangText('Email')}>
|
label={getLangText('Email')}>
|
||||||
|
@ -8,7 +8,7 @@ import ApiUrls from '../../constants/api_urls';
|
|||||||
import AppConstants from '../../constants/application_constants';
|
import AppConstants from '../../constants/application_constants';
|
||||||
|
|
||||||
import { getLangText } from '../../utils/lang_utils';
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
|
import AclInformation from '../ascribe_information/acl_information';
|
||||||
|
|
||||||
let EditionDeleteForm = React.createClass({
|
let EditionDeleteForm = React.createClass({
|
||||||
|
|
||||||
@ -58,6 +58,7 @@ let EditionDeleteForm = React.createClass({
|
|||||||
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_small.gif'} />
|
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_small.gif'} />
|
||||||
</div>
|
</div>
|
||||||
}>
|
}>
|
||||||
|
<AclInformation aim={'form'} verbs={'delete'}/>
|
||||||
<p>{getLangText('Are you sure you would like to permanently delete this edition')}?</p>
|
<p>{getLangText('Are you sure you would like to permanently delete this edition')}?</p>
|
||||||
<p>{getLangText('This is an irrevocable action%s', '.')}</p>
|
<p>{getLangText('This is an irrevocable action%s', '.')}</p>
|
||||||
</Form>
|
</Form>
|
||||||
|
@ -19,7 +19,7 @@ import AppConstants from '../../constants/application_constants';
|
|||||||
|
|
||||||
import { mergeOptions } from '../../utils/general_utils';
|
import { mergeOptions } from '../../utils/general_utils';
|
||||||
import { getLangText } from '../../utils/lang_utils';
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
|
import AclInformation from '../ascribe_information/acl_information';
|
||||||
|
|
||||||
let LoanForm = React.createClass({
|
let LoanForm = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
@ -227,6 +227,8 @@ let LoanForm = React.createClass({
|
|||||||
<div className={classnames({'ascribe-form-header': true, 'hidden': !this.props.loanHeading})}>
|
<div className={classnames({'ascribe-form-header': true, 'hidden': !this.props.loanHeading})}>
|
||||||
<h3>{this.props.loanHeading}</h3>
|
<h3>{this.props.loanHeading}</h3>
|
||||||
</div>
|
</div>
|
||||||
|
<AclInformation aim={'form'} verbs={'loan'}/>
|
||||||
|
<br></br>
|
||||||
<Property
|
<Property
|
||||||
name='loanee'
|
name='loanee'
|
||||||
label={getLangText('Loanee Email')}
|
label={getLangText('Loanee Email')}
|
||||||
|
@ -9,7 +9,7 @@ import InputTextAreaToggable from './input_textarea_toggable';
|
|||||||
import Button from 'react-bootstrap/lib/Button';
|
import Button from 'react-bootstrap/lib/Button';
|
||||||
|
|
||||||
import AppConstants from '../../constants/application_constants';
|
import AppConstants from '../../constants/application_constants';
|
||||||
|
import AclInformation from '../ascribe_information/acl_information';
|
||||||
import { getLangText } from '../../utils/lang_utils.js';
|
import { getLangText } from '../../utils/lang_utils.js';
|
||||||
|
|
||||||
|
|
||||||
@ -49,6 +49,8 @@ let ShareForm = React.createClass({
|
|||||||
<div className="modal-footer">
|
<div className="modal-footer">
|
||||||
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_small.gif'} />
|
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_small.gif'} />
|
||||||
</div>}>
|
</div>}>
|
||||||
|
{console.log('hoho')}
|
||||||
|
<AclInformation aim={'form'} verbs={'share'}/>
|
||||||
<Property
|
<Property
|
||||||
name='share_emails'
|
name='share_emails'
|
||||||
label={getLangText('Emails')}>
|
label={getLangText('Emails')}>
|
||||||
|
@ -9,7 +9,7 @@ import Form from './form';
|
|||||||
import Property from './property';
|
import Property from './property';
|
||||||
import InputTextAreaToggable from './input_textarea_toggable';
|
import InputTextAreaToggable from './input_textarea_toggable';
|
||||||
|
|
||||||
|
import AclInformation from '../ascribe_information/acl_information';
|
||||||
import AppConstants from '../../constants/application_constants';
|
import AppConstants from '../../constants/application_constants';
|
||||||
import { getLangText } from '../../utils/lang_utils.js';
|
import { getLangText } from '../../utils/lang_utils.js';
|
||||||
|
|
||||||
@ -50,6 +50,7 @@ let TransferForm = React.createClass({
|
|||||||
<div className="modal-footer">
|
<div className="modal-footer">
|
||||||
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_small.gif'} />
|
<img src={AppConstants.baseUrl + 'static/img/ascribe_animated_small.gif'} />
|
||||||
</div>}>
|
</div>}>
|
||||||
|
<AclInformation aim={'form'} verbs={'transfer'}/>
|
||||||
<Property
|
<Property
|
||||||
name='transferee'
|
name='transferee'
|
||||||
label={getLangText('Email')}>
|
label={getLangText('Email')}>
|
||||||
|
89
js/components/ascribe_information/acl_information.js
Normal file
89
js/components/ascribe_information/acl_information.js
Normal file
@ -0,0 +1,89 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
import informationTexts from '../../constants/information_text';
|
||||||
|
import { getLangText } from '../../utils/lang_utils';
|
||||||
|
import { replaceSubstringAtIndex } from '../../utils/general_utils';
|
||||||
|
|
||||||
|
let AclInformation = React.createClass({
|
||||||
|
render() {
|
||||||
|
let titleStyle = {
|
||||||
|
color: '#02B6A3',
|
||||||
|
fontSize: '11px',
|
||||||
|
lineHeight: '3px'
|
||||||
|
};
|
||||||
|
|
||||||
|
let infoStyle = {
|
||||||
|
color: '#333333',
|
||||||
|
fontSize: '11px',
|
||||||
|
lineHeight: '3px'
|
||||||
|
};
|
||||||
|
|
||||||
|
let exampleStyle = {
|
||||||
|
color: '#B2B2B2',
|
||||||
|
fontSize: '11px',
|
||||||
|
lineHeight: '3px'
|
||||||
|
};
|
||||||
|
|
||||||
|
let paragraphStyle = {
|
||||||
|
margin: '0.1em',
|
||||||
|
lineHeight: '15px',
|
||||||
|
align: 'justify'
|
||||||
|
};
|
||||||
|
let enabledIndices = this.props.verbs;
|
||||||
|
let aim = this.props.aim;
|
||||||
|
let titleList = informationTexts.title;
|
||||||
|
let infoSentenceList = informationTexts.informationSentence;
|
||||||
|
let exampleSentenceList = informationTexts.exampleSentence;
|
||||||
|
let createJSXTextSnippet = function(title, info, example){
|
||||||
|
if (aim) {
|
||||||
|
if (aim === 'form') {
|
||||||
|
return (<p style={paragraphStyle}>
|
||||||
|
<span style={infoStyle}> {replaceSubstringAtIndex(info.slice(2), 's ', ' ')} <br/> </span>
|
||||||
|
<span style={exampleStyle}> {example} </span></p>);
|
||||||
|
}
|
||||||
|
else if (aim === 'button') {
|
||||||
|
return (<p style={paragraphStyle}><span style={titleStyle}> {title} </span>
|
||||||
|
<span style={infoStyle}> {info} <br/> </span>
|
||||||
|
<span style={exampleStyle}> {example} </span></p>);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log('Aim is required when you want to place information text');
|
||||||
|
}
|
||||||
|
};
|
||||||
|
let rows = null;
|
||||||
|
let sortedIndices = ['share', 'transfer', 'consign', 'loan', 'delete'];
|
||||||
|
let tempIndices = [];
|
||||||
|
for (let i = 0; i < sortedIndices.length; i++){
|
||||||
|
if (enabledIndices.indexOf(sortedIndices[i]) === -1){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
tempIndices.push(sortedIndices[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
enabledIndices = tempIndices;
|
||||||
|
if(Array.isArray(enabledIndices)) {
|
||||||
|
rows = enabledIndices.map((i)=> {
|
||||||
|
return (createJSXTextSnippet(getLangText(titleList[i]), getLangText(infoSentenceList[i]),
|
||||||
|
getLangText(exampleSentenceList[i]),
|
||||||
|
titleStyle, infoStyle, exampleStyle));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (typeof enabledIndices === 'string'){
|
||||||
|
rows = (createJSXTextSnippet(getLangText(titleList[enabledIndices]), getLangText(infoSentenceList[enabledIndices]),
|
||||||
|
getLangText(exampleSentenceList[enabledIndices]),
|
||||||
|
titleStyle, infoStyle, exampleStyle));
|
||||||
|
}
|
||||||
|
else if (typeof enabledIndices === 'undefined'){
|
||||||
|
console.log('Verbs come undefined maybe you wrote verb instead of verbs?');
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
console.log('You need to supply an array of strings or string as verbs to AclInformation');
|
||||||
|
}
|
||||||
|
return (<span>{rows}</span>);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export default AclInformation;
|
@ -17,7 +17,7 @@ let ModalWrapper = React.createClass({
|
|||||||
children: React.PropTypes.oneOfType([
|
children: React.PropTypes.oneOfType([
|
||||||
React.PropTypes.arrayOf(React.PropTypes.element),
|
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||||
React.PropTypes.element
|
React.PropTypes.element
|
||||||
])
|
]),
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
@ -55,17 +55,29 @@ let ModalWrapper = React.createClass({
|
|||||||
// this adds the onClick method show of modal_wrapper to the trigger component
|
// this adds the onClick method show of modal_wrapper to the trigger component
|
||||||
// which is in most cases a button.
|
// which is in most cases a button.
|
||||||
let trigger = React.cloneElement(this.props.trigger, {onClick: this.show});
|
let trigger = React.cloneElement(this.props.trigger, {onClick: this.show});
|
||||||
|
let modalHeaderAscribe = {
|
||||||
|
paddingTop: '15px',
|
||||||
|
paddingBottom: '0px',
|
||||||
|
borderBottom: 'none',
|
||||||
|
minHeight: '16.42857px'
|
||||||
|
};
|
||||||
|
let modalBodyAscribe = {
|
||||||
|
paddingTop: '5px',
|
||||||
|
paddingBottom: '10px',
|
||||||
|
paddingRight: '15px',
|
||||||
|
paddingLeft: '15px',
|
||||||
|
position: 'relative'
|
||||||
|
};
|
||||||
return (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{trigger}
|
{trigger}
|
||||||
<Modal show={this.state.showModal} onHide={this.hide}>
|
<Modal show={this.state.showModal} onHide={this.hide}>
|
||||||
<Modal.Header closeButton>
|
<Modal.Header style={modalHeaderAscribe} closeButton>
|
||||||
<Modal.Title>
|
<Modal.Title>
|
||||||
{this.props.title}
|
{this.props.title}
|
||||||
</Modal.Title>
|
</Modal.Title>
|
||||||
</Modal.Header>
|
</Modal.Header>
|
||||||
<div className="modal-body">
|
<div className="modal-body" style={modalBodyAscribe}>
|
||||||
{this.renderChildren()}
|
{this.renderChildren()}
|
||||||
</div>
|
</div>
|
||||||
</Modal>
|
</Modal>
|
||||||
|
42
js/constants/information_text.js
Normal file
42
js/constants/information_text.js
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
const informationTexts = {
|
||||||
|
|
||||||
|
'title': {
|
||||||
|
'transfer': 'TRANSFER',
|
||||||
|
'consign': 'CONSIGN',
|
||||||
|
'loan': 'LOAN',
|
||||||
|
'share': 'SHARE',
|
||||||
|
'delete': 'DELETE'},
|
||||||
|
|
||||||
|
'informationSentence': {
|
||||||
|
|
||||||
|
'transfer': ' - Changes ownership of an Edition. As with a physical piece of work, ' +
|
||||||
|
'transferring ownership of an Edition does not transfer copyright in the Work.',
|
||||||
|
|
||||||
|
'consign': ' - Lets someone represent you in dealing with the work, under the terms you agree to.',
|
||||||
|
|
||||||
|
'loan': ' - Lets someone use or put the Work on display for a limited amount of time.',
|
||||||
|
|
||||||
|
'share': ' - Lets someone view the Work or Edition, but does not give rights to publish or display it.',
|
||||||
|
|
||||||
|
'delete': ' - Removes the Work from your Wallet. Note that the previous registration and transfer ' +
|
||||||
|
'history will still exist on the blockchain and cannot be deleted.'
|
||||||
|
}
|
||||||
|
|
||||||
|
,
|
||||||
|
'exampleSentence': {
|
||||||
|
'transfer': '(e.g. a musician Transfers limited edition 1 of 10 of her new album to a very happy fan)',
|
||||||
|
|
||||||
|
'consign': '(e.g. an artist Consigns 10 Editions of her new Work to a gallery ' +
|
||||||
|
'so the gallery can sell them on her behalf, under the terms the artist and the gallery have agreed to)',
|
||||||
|
|
||||||
|
'loan': '(e.g. a collector Loans a Work to a gallery for one month for display in the gallery\'s show)',
|
||||||
|
|
||||||
|
'share': '(e.g. a photographer Shares proofs of a graduation photo with the graduate\'s grandparents)',
|
||||||
|
|
||||||
|
'delete': '(e.g. an artist uploaded the wrong file and doesn\'t want it cluttering his Wallet, so he Deletes it)'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default informationTexts;
|
@ -222,3 +222,13 @@ export function truncateTextAtCharIndex(text, charIndex, replacement = '...') {
|
|||||||
|
|
||||||
return truncatedText;
|
return truncatedText;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param index, int, the starting index of the substring to be replaced
|
||||||
|
* @param character, substring to be replaced
|
||||||
|
* @returns {string}
|
||||||
|
*/
|
||||||
|
export function replaceSubstringAtIndex(baseString, substrToReplace, stringToBePut) {
|
||||||
|
let index = baseString.indexOf(substrToReplace);
|
||||||
|
return baseString.substr(0, index) + stringToBePut + baseString.substr(index + substrToReplace.length);
|
||||||
|
}
|
@ -465,7 +465,6 @@ hr {
|
|||||||
height: 12px;
|
height: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.ascribe-piece-list-filter-display {
|
.ascribe-piece-list-filter-display {
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
padding-right: 10px;
|
padding-right: 10px;
|
||||||
@ -484,3 +483,8 @@ hr {
|
|||||||
border-color: #ccc;
|
border-color: #ccc;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-header-ascribe {
|
||||||
|
padding: 15px;
|
||||||
|
border-bottom: none;
|
||||||
|
min-height: 16.42857px; }
|
Loading…
Reference in New Issue
Block a user