From c92204d99bbec1c7c35ee634f48088bbec744958 Mon Sep 17 00:00:00 2001 From: Scott Tolksdorf Date: Thu, 14 Jan 2016 12:29:49 -0500 Subject: [PATCH] Added a view source button to the share page --- client/homebrew/sharePage/sharePage.jsx | 1 + client/homebrew/statusbar/statusbar.jsx | 17 +++++++++++++++++ client/homebrew/statusbar/statusbar.less | 16 ++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/client/homebrew/sharePage/sharePage.jsx b/client/homebrew/sharePage/sharePage.jsx index 2ec45cb93..75e5c7736 100644 --- a/client/homebrew/sharePage/sharePage.jsx +++ b/client/homebrew/sharePage/sharePage.jsx @@ -25,6 +25,7 @@ var SharePage = React.createClass({ return(
' + this.props.sourceText + '
'); + }, + + + renderInfo : function(){ if(!this.props.lastUpdated) return null; @@ -47,6 +55,14 @@ var Statusbar = React.createClass({ }, + renderSourceButton : function(){ + if(!this.props.sourceText) return null; + + return + View Source + + }, + renderNewButton : function(){ if(this.props.editId || this.props.shareId) return null; @@ -96,6 +112,7 @@ var Statusbar = React.createClass({
{this.renderStatus()} {this.renderInfo()} + {this.renderSourceButton()} {this.renderPrintButton()} {this.renderShare()} {this.renderNewButton()} diff --git a/client/homebrew/statusbar/statusbar.less b/client/homebrew/statusbar/statusbar.less index 02efc3aca..92b27b6e9 100644 --- a/client/homebrew/statusbar/statusbar.less +++ b/client/homebrew/statusbar/statusbar.less @@ -90,5 +90,21 @@ font-size : 12px; } } + .sourceField{ + .animate(background-color); + cursor : pointer; + color : white; + text-decoration : none; + &:hover{ + background-color : fade(@teal, 70%); + } + span{ + margin-right : 5px; + } + input{ + width : 100px; + font-size : 12px; + } + } } } \ No newline at end of file