From 68fc0f95d1af1ed5ab78de9d0df79347cb7159be Mon Sep 17 00:00:00 2001 From: Scott Tolksdorf Date: Thu, 19 May 2016 08:49:55 -0400 Subject: [PATCH] Save button now will display an error box with a custom link to an github issue --- client/homebrew/pages/editPage/editPage.jsx | 14 +++++++--- client/homebrew/pages/editPage/editPage.less | 29 +++++++++----------- 2 files changed, 23 insertions(+), 20 deletions(-) diff --git a/client/homebrew/pages/editPage/editPage.jsx b/client/homebrew/pages/editPage/editPage.jsx index 2b47456..81f52bc 100644 --- a/client/homebrew/pages/editPage/editPage.jsx +++ b/client/homebrew/pages/editPage/editPage.jsx @@ -134,18 +134,24 @@ var EditPage = React.createClass({ }, renderSaveButton : function(){ - //if(this.state.errors){ + if(this.state.errors){ + var errMsg = ''; + try{ + errMsg += this.state.errors.toString() + '\n\n'; + errMsg += '```\n' + JSON.stringify(this.state.errors.response.error, null, ' ') + '\n```'; + }catch(e){} + + return Oops!
Looks like there was a problem saving.
- Report the issue + Report the issue here .
- //} + } if(this.state.isSaving){ return saving... diff --git a/client/homebrew/pages/editPage/editPage.less b/client/homebrew/pages/editPage/editPage.less index dd3a901..029d2ba 100644 --- a/client/homebrew/pages/editPage/editPage.less +++ b/client/homebrew/pages/editPage/editPage.less @@ -1,30 +1,27 @@ + .editPage{ - .navItem.save{ - width : 75px; - text-align: center; + width : 75px; + text-align : center; &.saved{ - color : #666; cursor : initial; + color : #666; } - &.error{ - position: relative; - background-color: @red; - + position : relative; + background-color : @red; .errorContainer{ - position: absolute; - top: 29px; - background-color: #333; - padding: 8px; - width: 120px; - left: -20px; - z-index: 1000; + position : absolute; + top : 29px; + left : -20px; + z-index : 1000; + width : 120px; + padding : 8px; + background-color : #333; a{ color : @teal; } } } } - } \ No newline at end of file