1
0
mirror of https://github.com/stolksdorf/homebrewery.git synced 2025-12-23 20:21:30 +00:00

Fixed titles saving

This commit is contained in:
Scott Tolksdorf
2016-05-14 13:59:21 -04:00
parent c4c09f0a69
commit 5537d974ff
6 changed files with 16 additions and 22 deletions

View File

@@ -1,14 +1,9 @@
var React = require('react');
var _ = require('lodash');
var cx = require('classnames');
var Nav = require('naturalcrit/nav/nav.jsx');
var Navbar = React.createClass({
render : function(){
return <Nav.base>
<Nav.section>
@@ -16,9 +11,8 @@ var Navbar = React.createClass({
<Nav.item href='/homebrew' className='homebrewLogo'>
<div>The Homebrewery</div>
</Nav.item>
<Nav.item>v1.5.0</Nav.item>
<Nav.item>v2.0.0</Nav.item>
</Nav.section>
{this.props.children}
</Nav.base>
}

View File

@@ -120,7 +120,10 @@ var EditPage = React.createClass({
request
.put('/homebrew/api/update/' + this.props.brew.editId)
.send({text : this.state.text})
.send({
text : this.state.text,
title : this.state.title
})
.end((err, res) => {
console.log('done', res.body);
this.savedBrew = res.body;

View File

@@ -18,7 +18,7 @@ const KEY = 'naturalCrit-homebrew-new';
var NewPage = React.createClass({
getInitialState: function() {
return {
title : 'My Awesome Brew v99.99',
title : 'My Awesome Brew v99',
text: '',
isSaving : false
};

View File

@@ -49,6 +49,7 @@ module.exports = function(app){
if(!objs.length || err) return res.status(404).send("Can not find homebrew with that id");
var resEntry = objs[0];
resEntry.text = req.body.text;
resEntry.title = req.body.title;
resEntry.updatedAt = new Date();
resEntry.save(function(err, obj){
if(err) return res.status(500).send("Error while saving");

View File

@@ -1,12 +1,3 @@
@font-face {
font-family : CodeLight;
src : url('/assets/naturalCrit/logo/CODE Light.otf');
}
@font-face {
font-family : CodeBold;
src : url('/assets/naturalCrit/logo/CODE Bold.otf');
}
nav{
background-color : #333;
.navContent{

13
todo.md
View File

@@ -1,6 +1,6 @@
# The Homebrewery
## v1.5 todo
## v2.0.0 todo
X Make statusbar un-fixed
X Simplify the panel css to remove the current issues
X Build new `BrewRenderer`, clean support for partial rendering
@@ -24,11 +24,16 @@ X Border shadows on second column renders much better
X Saving a pdf no uses the brew title
X add /source/shareId route
- Add stats nav item
X make both ids indexes in mongoose
X make both ids unique indexes in mongoose
X Fix main Page
- Write new welcome message
- Fix the edit page saving flow
- Fix title saving
- Style the snippet groups
## v1.6
## v2.1.0
- Adda better error page
- IMproved firefox support
- Add in window.resize handlers for the elements that need it
- Make hybrid editor and brewRenderer (with resize listeners)
- Add in brew title, use for metadata?
@@ -38,7 +43,7 @@ X Fix main Page
- Add in a tutorial page?
- Increase post entity limit size, http://stackoverflow.com/questions/15627573/nodejs-express-request-entity-too-large-heroku
## v1.7
## v2.2
- User accounts!
- Add a new database model
- Make sure you salt those passwords