Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial commit #2

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/lodash.js/3.10.1/lodash.min.js'></script>
<script type='text/javascript' src='https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js'></script>
<!-- Your js and css: -->
<link rel='stylesheet' type='text/css' href='my.css'>
<link rel='stylesheet' type='text/css' href='secret.css'>
<script type="text/javascript" src="models.js"></script>
<script type="text/javascript" src="views.js"></script>
<script type="text/javascript" src="main.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ $(function() { //when DOM is ready...
app.gui = new GUI(app.users,
app.tasks,
'#app');// selector of main div
}

});
30 changes: 22 additions & 8 deletions models.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,20 @@
var UserModel = Backbone.Model.extend({
defaults: {
username:''
}
})
//[ ]Find tasks associated with user
//[ ]Export relavent tasks
defaults: {
username: '',
currentUser: false
},
createView: function() {
var view = new Views.UserView({model: this, model: Tasks});
view.render();
$('#app').prepend(view.$el);
}
});
// Not sure how to incorporate this:
// var Users = Backbone.Collection.extend({
// model: User
// });

var IssueModel = Backbone.Model.extend({
defaults: {
Expand All @@ -11,14 +23,16 @@ var IssueModel = Backbone.Model.extend({
creator:'',
assignee:'',
status:'unassigned',
},
assignTask: function() {

}
// Add methods if needed...
})
});

var UserCollection = Backbone.Collection.extend({
model:UserModel
})
});

var IssueCollection = Backbone.Collection.extend({
model:IssueModel
})
});
Loading