This repository has been archived by the owner on Aug 21, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#840]: Layout Created For CareerPath
- Loading branch information
Showing
6 changed files
with
168 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
$(function() { | ||
|
||
App.Models.CourseCareerPath = Backbone.Model.extend({ | ||
|
||
idAttribute: "_id", | ||
url: function() { | ||
if (_.has(this, 'id')) { | ||
var url = (_.has(this.toJSON(), '_rev')) ? App.Server + '/coursecareerpath/' + this.id + '?rev=' + this.get('_rev') // For UPDATE and DELETE | ||
: App.Server + '/coursecareerpath/' + this.id // For READ | ||
} else { | ||
var url = App.Server + '/coursecareerpath' // for CREATE | ||
} | ||
return url | ||
}, | ||
defaults: { | ||
kind: 'coursecareerpath'//Saves kind of document according to corresponding db's.Mostly used in couch db views. | ||
}, | ||
schema: { | ||
Level_Name: 'Text', . | ||
Courses: [], //Array:Multiple Courses | ||
CourseCareer: []//Array:Arranging the Courses | ||
} | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
$(function() { | ||
|
||
App.Views.AddCourseCareer = Backbone.View.extend({ | ||
template: $('#template-addCourseCareer').html(), | ||
vars: {}, | ||
events: { | ||
}, | ||
"click .back_button":function() | ||
{ | ||
Backbone.history.navigate('courseCareerPath' + this.levelId + '/' + this.revId, { | ||
trigger: true | ||
}) | ||
}, | ||
initialize: function() { | ||
|
||
}, | ||
render: function() { | ||
this.$el.html(_.template(this.template,this.vars)) | ||
} | ||
|
||
|
||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
$(function() { | ||
|
||
App.Views.CourseCareerPath = Backbone.View.extend({ | ||
template: $('#template-courseCareerPath').html(), | ||
vars: {}, | ||
events: { | ||
}, | ||
|
||
initialize: function() { | ||
|
||
}, | ||
render: function() { | ||
this.$el.html(_.template(this.template,this.vars)) | ||
} | ||
|
||
|
||
}) | ||
|
||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
var couchapp = require('couchapp'), | ||
path = require('path'); | ||
|
||
ddoc = { | ||
_id: '_design/bell' | ||
} | ||
|
||
ddoc.views = { | ||
GetCourseCareerById: { | ||
map: function(doc) { | ||
if (doc._id ) { | ||
emit(doc._id, doc); | ||
} | ||
} | ||
}, | ||
GetCourseCareerByMember: { | ||
map: function(doc) { | ||
if (this.MemberID != "") { | ||
emit([doc.MemberID], doc); | ||
} | ||
} | ||
}, | ||
} | ||
module.exports = ddoc; |