0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2026-01-18 05:42:48 +00:00

Print page can now load from local storage

This commit is contained in:
Scott Tolksdorf
2016-11-14 21:31:01 -05:00
parent d7463ec28e
commit 6672dff938
7 changed files with 95 additions and 42 deletions

View File

@@ -91,6 +91,17 @@ const NewPage = React.createClass({
}
},
handlePrintClick : function(){
localStorage.setItem('print', this.state.text);
window.open('/print?dialog=true&local=print','_blank');
},
renderLocalPrintButton : function(){
return <Nav.item color='purple' icon='fa-file-pdf-o' onClick={this.handlePrintClick}>
get PDF
</Nav.item>
},
renderNavbar : function(){
return <Navbar ver={this.props.ver}>
<Nav.section>
@@ -99,6 +110,7 @@ const NewPage = React.createClass({
<Nav.section>
{this.renderSaveButton()}
{this.renderLocalPrintButton()}
<IssueNavItem />
</Nav.section>
</Navbar>