Skip to content

Commit

Permalink
reconfigured file structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mau11 committed Jan 7, 2017
1 parent dc06835 commit f6cb7ce
Show file tree
Hide file tree
Showing 12 changed files with 53 additions and 73,798 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules
.elasticbeanstalk/
.jshintrc
./public/bundle.js
public/bundle.js
npm-debug.log
utils/routes.js
2 changes: 1 addition & 1 deletion components/Nav.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export default class Nav extends React.Component {
</ul>
</li>
<li><Link to="messages">Messages</Link></li>
<li><Link to="patgen">PatGen</Link></li>
<li><Link to="patgen">Pattern</Link></li>
<li><Link to="browse">Browse Users</Link></li>
<li className="dropdown">
<a data-toggle="dropdown" className="dropdown-toggle" href="#">More <b className="caret"></b></a>
Expand Down
24 changes: 14 additions & 10 deletions pages/PatGen.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,33 +45,37 @@ export default class PatGen extends React.Component {
</div>
</div>
<hr/>*/}
<h3>Pattern Generator</h3>
<h3>Patterns</h3>
<div className="container">
<div className="row">
<div className="col-sm-6">
<div className="col-sm-8">
<div>
<h4>Add a New Pattern
</h4>
<form>
<div className="form-group">
{/*<div className="form-group">
<label htmlFor="pic">Import PDF</label>
<input type="file" className="form-control-file" id="pic" name="picName"/>
</div>
</div>*/}
<div className="form-group">
<label htmlFor="display">Pattern Name:</label>
<input type="text" className="form-control" id="display" placeholder="Enter pattern name" onChange="" name="display"/>
<input type="text" className="form-control" id="display" placeholder="Enter pattern name" name="display"/>
</div>
<div className="form-group">
<label htmlFor="craft">Craft:</label>
<input type="text" className="form-control" id="craft" placeholder="Crochet, Knitting, Sewing...Everything!" name="craft" onChange="" />
<input type="text" className="form-control" id="craft" placeholder="Crochet, Knitting, Sewing, etc" name="craft" />
</div>
<div className="form-group">
<label htmlFor="craft">Supplies:</label>
<input type="text" className="form-control" id="craft" placeholder="Hooks, Needles, Yarn, Gauge..." name="craft" onChange="" />
<input type="text" className="form-control" id="craft" placeholder="" name="craft" />
</div>
<div className="form-group">
<label htmlFor="craft">Gauge:</label>
<input type="text" className="form-control" id="craft" placeholder="Hooks, Needles, Yarn, Gauge..." name="craft" />
</div>
<div className="form-group">
<label htmlFor="blurb">Notes/Details:</label>
<textarea className="form-control" id="bio" rows="2" name="bio" onChange=""></textarea>
<textarea className="form-control" id="bio" rows="2" name="bio" ></textarea>
</div>
<div className="form-check">
<label className="form-check-label">
Expand All @@ -82,8 +86,8 @@ export default class PatGen extends React.Component {
</form>
</div>
</div>
<div className="col-sm-6">
<h4>Generator:</h4>
<div className="col-sm-4">
<h4></h4>
<div>
<h3></h3>
<h4> </h4>
Expand Down
11 changes: 7 additions & 4 deletions pages/Profile.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ export default class Profile extends React.Component {
displayName: null,
craftName: null,
bio: null,
id: 1
id: null,
authoID: null
};
}

// Verify user id after login
checkId() {
//

}
// Verify user id after login
/* checkId() {
fetch('/update', {method: 'GET'} );
}*/

// Retrieve profile information from database
getProfileData() {
Expand Down
4 changes: 3 additions & 1 deletion pages/Update.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ export default class Update extends React.Component {
users[i].bio = this.state.bio;
this.setState({allUsers: users});
test = users;
console.log('TO SERVER modified', users);
cb(test);
}
})
Expand All @@ -66,6 +67,7 @@ export default class Update extends React.Component {
}

updateProfileData(param) {
console.log('PARAM', param);
fetch('/update', {
method: 'POST',
headers: {
Expand All @@ -74,7 +76,7 @@ export default class Update extends React.Component {
},
body: JSON.stringify(param)
});
this.getProfileData().bind(this);
this.getProfileData(function(val){console.log('SENT UPDATED TO DB:', val);}).bind(this);
/* console.log('running', param);
$(document).ready(function(){
$.ajax({
Expand Down
File renamed without changes.
Loading

0 comments on commit f6cb7ce

Please sign in to comment.