diff --git a/client/admin/homebrewAdmin/homebrewAdmin.jsx b/client/admin/homebrewAdmin/homebrewAdmin.jsx
index 26b686f..2362f2d 100644
--- a/client/admin/homebrewAdmin/homebrewAdmin.jsx
+++ b/client/admin/homebrewAdmin/homebrewAdmin.jsx
@@ -25,11 +25,9 @@ var HomebrewAdmin = React.createClass({
},
deleteBrew : function(brewId){
- console.log('removing');
request.get('/homebrew/remove/' + brewId +'?admin_key=' + this.props.admin_key)
.send()
.end(function(err, res){
- console.log('DONE');
window.location.reload();
})
},
diff --git a/client/homebrew/statusbar/statusbar.jsx b/client/homebrew/statusbar/statusbar.jsx
index c273d3b..bd0c760 100644
--- a/client/homebrew/statusbar/statusbar.jsx
+++ b/client/homebrew/statusbar/statusbar.jsx
@@ -2,6 +2,7 @@ var React = require('react');
var _ = require('lodash');
var cx = require('classnames');
var Moment = require('moment');
+var request = require('superagent')
var Logo = require('naturalCrit/logo/logo.jsx');
@@ -13,7 +14,7 @@ var Statusbar = React.createClass({
getDefaultProps: function() {
return {
- //editId: null,
+ editId: null,
sourceText : null,
shareId : null,
printId : null,
@@ -38,14 +39,22 @@ var Statusbar = React.createClass({
},
+ deleteBrew : function(){
+ if(!confirm("are you sure you want to delete this brew?")) return;
+ if(!confirm("are you REALLY sure? You will not be able to recover it")) return;
+
+ request.get('/homebrew/remove/' + this.props.editId)
+ .send()
+ .end(function(err, res){
+ window.location.href = '/homebrew';
+ });
+ },
+
+
openSourceWindow : function(){
var sourceWindow = window.open();
-
var content = replaceAll(this.props.sourceText, '<', '<');
content = replaceAll(content, '>', '>');
-
- console.log(content);
-
sourceWindow.document.write('');
},
@@ -97,6 +106,15 @@ var Statusbar = React.createClass({
},
+ renderDeleteButton : function(){
+ if(!this.props.editId) return null;
+
+
+ return ' + content + '