mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 18:35:09 +01:00
various visual changes
This commit is contained in:
parent
e56fbbac2b
commit
c945fc315b
@ -51,7 +51,6 @@ let AccordionListItem = React.createClass({
|
|||||||
<h3>{getLangText('by %s', this.props.content.artist_name)}</h3>
|
<h3>{getLangText('by %s', this.props.content.artist_name)}</h3>
|
||||||
<div>
|
<div>
|
||||||
<span>{this.props.content.date_created.split('-')[0]}</span>
|
<span>{this.props.content.date_created.split('-')[0]}</span>
|
||||||
<span className="pull-right">this.props.</span>
|
|
||||||
{/* <a href={this.props.content.license_type.url} target="_blank" className="pull-right">
|
{/* <a href={this.props.content.license_type.url} target="_blank" className="pull-right">
|
||||||
{getLangText('%s license', this.props.content.license_type.code)}
|
{getLangText('%s license', this.props.content.license_type.code)}
|
||||||
</a> */}
|
</a> */}
|
||||||
|
@ -6,7 +6,7 @@ import CollapsibleMixin from 'react-bootstrap/lib/CollapsibleMixin';
|
|||||||
|
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
import { getLangText } from '../../utils/lang_utils.js'
|
import { getLangText } from '../../utils/lang_utils.js';
|
||||||
|
|
||||||
|
|
||||||
const CollapsibleParagraph = React.createClass({
|
const CollapsibleParagraph = React.createClass({
|
||||||
@ -43,13 +43,14 @@ const CollapsibleParagraph = React.createClass({
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
let styles = this.getCollapsibleClassSet();
|
let styles = this.getCollapsibleClassSet();
|
||||||
let text = this.isExpanded() ? '[' + getLangText('hide') + ']' : '[' + getLangText('show') + ']';
|
let text = this.isExpanded() ? '-' : '+';
|
||||||
|
|
||||||
if(this.props.show) {
|
if(this.props.show) {
|
||||||
return (
|
return (
|
||||||
<div className="ascribe-detail-header">
|
<div className="ascribe-detail-header">
|
||||||
<div className="ascribe-edition-collapsible-wrapper">
|
<div className="ascribe-edition-collapsible-wrapper">
|
||||||
<div onClick={this.handleToggle}>
|
<div onClick={this.handleToggle}>
|
||||||
<span>{this.props.title}</span><span className="pull-right">{text}</span>
|
<span>{text} {this.props.title}</span>
|
||||||
</div>
|
</div>
|
||||||
<div ref='panel' className={classNames(styles) + ' ascribe-edition-collapible-content'}>
|
<div ref='panel' className={classNames(styles) + ' ascribe-edition-collapible-content'}>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
|
@ -18,7 +18,8 @@ let Form = React.createClass({
|
|||||||
children: React.PropTypes.oneOfType([
|
children: React.PropTypes.oneOfType([
|
||||||
React.PropTypes.object,
|
React.PropTypes.object,
|
||||||
React.PropTypes.array
|
React.PropTypes.array
|
||||||
])
|
]),
|
||||||
|
className: React.PropTypes.string
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
@ -141,10 +142,16 @@ let Form = React.createClass({
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
|
let className = 'ascribe-form';
|
||||||
|
|
||||||
|
if(this.props.className) {
|
||||||
|
className += ' ' + this.props.className;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<form
|
<form
|
||||||
role="form"
|
role="form"
|
||||||
className="ascribe-form"
|
className={className}
|
||||||
onSubmit={this.submit}
|
onSubmit={this.submit}
|
||||||
autoComplete="on">
|
autoComplete="on">
|
||||||
{this.getErrors()}
|
{this.getErrors()}
|
||||||
|
19
js/components/ascribe_forms/form_property_header.js
Normal file
19
js/components/ascribe_forms/form_property_header.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
'use strict';
|
||||||
|
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
let FormPropertyHeader = React.createClass({
|
||||||
|
propTypes: {
|
||||||
|
children: React.PropTypes.arrayOf(React.PropTypes.element)
|
||||||
|
},
|
||||||
|
|
||||||
|
render() {
|
||||||
|
return (
|
||||||
|
<div className="ascribe-form-header">
|
||||||
|
{this.props.children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
export default FormPropertyHeader;
|
@ -150,7 +150,7 @@ let MediaPlayer = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
if (this.props.encodingStatus !== undefined && this.props.encodingStatus !== 100) {
|
if (this.props.mimetype === 'video' && this.props.encodingStatus !== undefined && this.props.encodingStatus !== 100) {
|
||||||
return (
|
return (
|
||||||
<div className="ascribe-detail-header ascribe-media-player">
|
<div className="ascribe-detail-header ascribe-media-player">
|
||||||
<p><em>Please be patient, the video is been encoded</em></p>
|
<p><em>Please be patient, the video is been encoded</em></p>
|
||||||
|
@ -77,29 +77,6 @@ let Edition = React.createClass({
|
|||||||
currentUser={this.state.currentUser}
|
currentUser={this.state.currentUser}
|
||||||
edition={this.props.edition} />
|
edition={this.props.edition} />
|
||||||
|
|
||||||
<CollapsibleParagraph
|
|
||||||
title="Notes"
|
|
||||||
show={(this.state.currentUser.username && true || false) ||
|
|
||||||
(this.props.edition.acl.indexOf('edit') > -1 || this.props.edition.public_note)}>
|
|
||||||
<EditionPersonalNote
|
|
||||||
currentUser={this.state.currentUser}
|
|
||||||
handleSuccess={this.props.loadEdition}
|
|
||||||
edition={this.props.edition}/>
|
|
||||||
<EditionPublicEditionNote
|
|
||||||
handleSuccess={this.props.loadEdition}
|
|
||||||
edition={this.props.edition}/>
|
|
||||||
</CollapsibleParagraph>
|
|
||||||
|
|
||||||
<CollapsibleParagraph
|
|
||||||
title={getLangText('Further Details')}
|
|
||||||
show={this.props.edition.acl.indexOf('edit') > -1
|
|
||||||
|| Object.keys(this.props.edition.extra_data).length > 0
|
|
||||||
|| this.props.edition.other_data !== null}>
|
|
||||||
<EditionFurtherDetails
|
|
||||||
handleSuccess={this.props.loadEdition}
|
|
||||||
edition={this.props.edition}/>
|
|
||||||
</CollapsibleParagraph>
|
|
||||||
|
|
||||||
<CollapsibleParagraph
|
<CollapsibleParagraph
|
||||||
title={getLangText('Certificate of Authenticity')}
|
title={getLangText('Certificate of Authenticity')}
|
||||||
show={this.props.edition.acl.indexOf('coa') > -1}>
|
show={this.props.edition.acl.indexOf('coa') > -1}>
|
||||||
@ -133,6 +110,30 @@ let Edition = React.createClass({
|
|||||||
<SpoolDetails
|
<SpoolDetails
|
||||||
edition={this.props.edition} />
|
edition={this.props.edition} />
|
||||||
</CollapsibleParagraph>
|
</CollapsibleParagraph>
|
||||||
|
|
||||||
|
<CollapsibleParagraph
|
||||||
|
title="Notes"
|
||||||
|
show={(this.state.currentUser.username && true || false) ||
|
||||||
|
(this.props.edition.acl.indexOf('edit') > -1 || this.props.edition.public_note)}>
|
||||||
|
<EditionPersonalNote
|
||||||
|
currentUser={this.state.currentUser}
|
||||||
|
handleSuccess={this.props.loadEdition}
|
||||||
|
edition={this.props.edition}/>
|
||||||
|
<EditionPublicEditionNote
|
||||||
|
handleSuccess={this.props.loadEdition}
|
||||||
|
edition={this.props.edition}/>
|
||||||
|
</CollapsibleParagraph>
|
||||||
|
|
||||||
|
<CollapsibleParagraph
|
||||||
|
title={getLangText('Further Details')}
|
||||||
|
show={this.props.edition.acl.indexOf('edit') > -1
|
||||||
|
|| Object.keys(this.props.edition.extra_data).length > 0
|
||||||
|
|| this.props.edition.other_data !== null}>
|
||||||
|
<EditionFurtherDetails
|
||||||
|
handleSuccess={this.props.loadEdition}
|
||||||
|
edition={this.props.edition}/>
|
||||||
|
</CollapsibleParagraph>
|
||||||
|
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
);
|
);
|
||||||
@ -326,7 +327,8 @@ let EditionDetailProperty = React.createClass({
|
|||||||
]),
|
]),
|
||||||
separator: React.PropTypes.string,
|
separator: React.PropTypes.string,
|
||||||
labelClassName: React.PropTypes.string,
|
labelClassName: React.PropTypes.string,
|
||||||
valueClassName: React.PropTypes.string
|
valueClassName: React.PropTypes.string,
|
||||||
|
children: React.PropTypes.arrayOf(React.PropTypes.element)
|
||||||
},
|
},
|
||||||
|
|
||||||
getDefaultProps() {
|
getDefaultProps() {
|
||||||
|
@ -102,9 +102,8 @@ let Header = React.createClass({
|
|||||||
<div>
|
<div>
|
||||||
<Navbar
|
<Navbar
|
||||||
brand={
|
brand={
|
||||||
<Link className="navbar-brand" to="pieces">
|
this.getLogo()
|
||||||
{this.getLogo()}
|
}
|
||||||
</Link>}
|
|
||||||
toggleNavKey={0}
|
toggleNavKey={0}
|
||||||
fixedTop={true}>
|
fixedTop={true}>
|
||||||
<CollapsibleNav eventKey={0}>
|
<CollapsibleNav eventKey={0}>
|
||||||
|
@ -23,6 +23,7 @@ import GlobalNotificationActions from '../actions/global_notification_actions';
|
|||||||
|
|
||||||
import Form from './ascribe_forms/form';
|
import Form from './ascribe_forms/form';
|
||||||
import Property from './ascribe_forms/property';
|
import Property from './ascribe_forms/property';
|
||||||
|
import FormPropertyHeader from './ascribe_forms/form_property_header';
|
||||||
|
|
||||||
import LoginContainer from './login_container';
|
import LoginContainer from './login_container';
|
||||||
import SlidesContainer from './ascribe_slides_container/slides_container';
|
import SlidesContainer from './ascribe_slides_container/slides_container';
|
||||||
@ -167,8 +168,8 @@ let RegisterPiece = React.createClass( {
|
|||||||
onFocus={this.changeSlide}>
|
onFocus={this.changeSlide}>
|
||||||
<Row className="no-margin">
|
<Row className="no-margin">
|
||||||
<Col xs={12} sm={10} md={8} smOffset={1} mdOffset={2}>
|
<Col xs={12} sm={10} md={8} smOffset={1} mdOffset={2}>
|
||||||
<h3 style={{'marginTop': 0, 'marginLeft': '1em'}}>{getLangText('Register your work')}</h3>
|
|
||||||
<Form
|
<Form
|
||||||
|
className="ascribe-form-bordered"
|
||||||
ref='form'
|
ref='form'
|
||||||
url={apiUrls.pieces_list}
|
url={apiUrls.pieces_list}
|
||||||
getFormData={this.getFormData}
|
getFormData={this.getFormData}
|
||||||
@ -184,6 +185,9 @@ let RegisterPiece = React.createClass( {
|
|||||||
<img src="https://s3-us-west-2.amazonaws.com/ascribe0/media/thumbnails/ascribe_animated_medium.gif" />
|
<img src="https://s3-us-west-2.amazonaws.com/ascribe0/media/thumbnails/ascribe_animated_medium.gif" />
|
||||||
</button>
|
</button>
|
||||||
}>
|
}>
|
||||||
|
<FormPropertyHeader>
|
||||||
|
<h3>{getLangText('Register your work')}</h3>
|
||||||
|
</FormPropertyHeader>
|
||||||
<Property
|
<Property
|
||||||
ignoreFocus={true}>
|
ignoreFocus={true}>
|
||||||
<FileUploader
|
<FileUploader
|
||||||
@ -218,7 +222,6 @@ let RegisterPiece = React.createClass( {
|
|||||||
required/>
|
required/>
|
||||||
</Property>
|
</Property>
|
||||||
{this.getLicenses()}
|
{this.getLicenses()}
|
||||||
<hr />
|
|
||||||
</Form>
|
</Form>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
@ -11,13 +11,12 @@
|
|||||||
.ascribe-edition-collapsible-wrapper > div:first-child {
|
.ascribe-edition-collapsible-wrapper > div:first-child {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: #EEE;
|
background-color: #F5F5F5;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
border: 1px solid #CCC;
|
margin-top: 20px;
|
||||||
|
|
||||||
}
|
}
|
||||||
.ascribe-edition-collapsible-wrapper > div > span {
|
.ascribe-edition-collapsible-wrapper > div > span {
|
||||||
font-size:1.3em;
|
font-size: 1.2em;
|
||||||
margin-right: .5em;
|
margin-right: .5em;
|
||||||
}
|
}
|
||||||
.ascribe-edition-collapsible-wrapper > div > span:nth-child(2) {
|
.ascribe-edition-collapsible-wrapper > div > span:nth-child(2) {
|
||||||
@ -26,8 +25,6 @@
|
|||||||
|
|
||||||
.ascribe-edition-collapible-content {
|
.ascribe-edition-collapible-content {
|
||||||
width:100%;
|
width:100%;
|
||||||
margin-top: 1em;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.coa-file-wrapper{
|
.coa-file-wrapper{
|
||||||
@ -45,3 +42,7 @@
|
|||||||
border: 1px solid #CCC;
|
border: 1px solid #CCC;
|
||||||
background-color: #F8F8F8;
|
background-color: #F8F8F8;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ascribe-button-list {
|
||||||
|
margin-top: 1em;
|
||||||
|
}
|
16
sass/ascribe_form.scss
Normal file
16
sass/ascribe_form.scss
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
.ascribe-form-bordered {
|
||||||
|
border: 1px solid #F5F5F5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ascribe-form-header {
|
||||||
|
padding-bottom: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ascribe-form-header > h3 {
|
||||||
|
padding: .75em 0 .75em 1em;
|
||||||
|
margin-top: 0;
|
||||||
|
margin-bottom: 0;
|
||||||
|
color: #616161;
|
||||||
|
}
|
@ -4,7 +4,7 @@
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
padding-bottom: 1em;
|
padding-bottom: 1em;
|
||||||
|
|
||||||
background-color: rgba(0,0,0,0);
|
background-color: white;
|
||||||
|
|
||||||
border-left: 3px solid rgba(0,0,0,0);
|
border-left: 3px solid rgba(0,0,0,0);
|
||||||
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
.is-focused {
|
.is-focused {
|
||||||
background-color: rgba(2, 182, 163, 0.05);
|
background-color: rgba(2, 182, 163, 0.05);
|
||||||
border-left: 3px solid rgba(2, 182, 163, 1)!important;
|
border-left: 3px solid rgba(2, 182, 163, 1) !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.is-error {
|
.is-error {
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
height: auto;
|
height: auto;
|
||||||
background-color: #FAFAFA;
|
background-color: #FEFEFE;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
|
|
||||||
|
@ -26,6 +26,7 @@ $BASE_URL: '<%= BASE_URL %>';
|
|||||||
@import 'offset_right';
|
@import 'offset_right';
|
||||||
@import 'ascribe_settings';
|
@import 'ascribe_settings';
|
||||||
@import 'ascribe_slides_container';
|
@import 'ascribe_slides_container';
|
||||||
|
@import 'ascribe_form';
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #FDFDFD;
|
background-color: #FDFDFD;
|
||||||
@ -37,6 +38,10 @@ html {
|
|||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hr {
|
||||||
|
margin-bottom: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
.hidden {
|
.hidden {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -187,10 +192,6 @@ html {
|
|||||||
background-color: rgba(2, 182, 163, 0.5);
|
background-color: rgba(2, 182, 163, 0.5);
|
||||||
}
|
}
|
||||||
|
|
||||||
.ascribe-detail-header {
|
|
||||||
margin-top: 2em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.ascribe-detail-title {
|
.ascribe-detail-title {
|
||||||
font-size: 2em;
|
font-size: 2em;
|
||||||
margin-bottom: -0.2em;
|
margin-bottom: -0.2em;
|
||||||
|
Loading…
Reference in New Issue
Block a user