Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Share card for all devices in Event page #140

Merged
merged 1 commit into from
Feb 22, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion reactJS/app/components/EventPageComponent.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import {Table, Column, Cell} from 'fixed-data-table-2';
import MediaQuery from 'react-responsive';
import {Card, CardActions, CardHeader, CardText} from 'material-ui/Card';
import Dialog from 'material-ui/Dialog';
import CopyToClipboard from 'react-copy-to-clipboard';
import IconButton from 'material-ui/IconButton';

import { fetchEvent, storePersonalizedDateSelection, storeAttendeeName, storeAttendeeNameErrorLabel,
registerAttendee, updateNotificationFlag, emptyPersonalizedDateSelection,
Expand Down Expand Up @@ -1111,6 +1113,43 @@ class EventPageComponent extends Component {
}
}

renderShareCard() {
let eventId = this.props.params.eventId;
let eventShareURL = window.location.origin + '/event/' + encodeURI(eventId);
return (
<div>
<div className='row center-xs'>
<span className='col-lg-4 col-md-4 col-sm-8 col-xs-10' >
<Card>
<div className="row" style={{"paddingLeft":"1rem","paddingTop":"10px"}}>

Copy link to share
</div>
<div className="row">
<div className="col-xs-10" style={{"paddingRight":"0px"}}>
<TextField
id='shareUrl'
underlineShow={false}
value={eventShareURL}
fullWidth={true}
inputStyle={{"backgroundColor":"rgb(234, 234, 234)","marginTop":"10px","height":"55%"}}
/></div>
<div className="col-xs-2" style={{"paddingLeft":"0px"}}>

<IconButton tooltip="Copy URL" iconStyle={{"color":"#000"}} style={{"width":"20px","height":"20px","padding": "initial","paddingTop": "11px","paddingLeft": "5px"}}>
<FontIcon className="material-icons">content_copy</FontIcon>
</IconButton>

</div>

</div>
</Card>
</span>
</div>
</div>
);
}

// Render the whole EventPage App. Starting point of this component.
render() {

Expand Down Expand Up @@ -1141,6 +1180,8 @@ class EventPageComponent extends Component {
<br></br>
{this.renderLocation()}
<br></br>
{this.renderShareCard()}
<br></br>
<div className='row center-xs'>
<label style={styles.formLabel3}> {this.props.languageJson.numberOfPeopleLabel} </label>
<label style={styles.formLabel2}> {" "+this.props.eventObj.attendees.length} </label>
Expand Down Expand Up @@ -1198,7 +1239,8 @@ class EventPageComponent extends Component {

{this.renderLocation()}


<br></br>
{this.renderShareCard()}
<div>

{this.toggleMobileCastAttendance()}
Expand Down