Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

Commit

Permalink
[#840]:Upgrading
Browse files Browse the repository at this point in the history
  • Loading branch information
Pr0chin committed Jun 5, 2017
1 parent 3e23999 commit b6b7650
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
$(function() {

App.Collections.CourseCareerPath = Backbone.Collection.extend({

url: function() {
if (this.CoursePathName != "" && this.MemberID != "") {
if (this.CoursePathName != "" && this.MemberID != "" && this.CoursePathName!= undefined && this.MemberID!= undefined ) {
return App.Server + '/coursecareerpath/_design/bell/_view/GetCourseCareerByLevelNameMemberIds/?key=["' +this.CoursePathName + '","' +this.MemberID+ '"]&include_docs=true'
} else {
return App.Server + '/coursecareerpath/_all_docs?include_docs=true'
Expand All @@ -22,8 +21,6 @@ $(function() {
var type = model.get('Type')
if (type) return type.toLowerCase()
},

model: App.Models.CourseacreerPath
})

})
2 changes: 1 addition & 1 deletion app/MyApp/app/views/AddCourseCareer.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ $(function() {
this.vars.Courselist = arrcourses
this.vars.Courseid = arrCourseIds
this.vars.Course_Length = this.collection.models.length-1
this.$el.html(_.template(this.template,this.vars))
$el.html(_.template(this.template,this.vars))
},
})

Expand Down
20 changes: 10 additions & 10 deletions app/MyApp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -1451,8 +1451,8 @@ <h4 style="width:25em;word-wrap:break-word;">
<button style="margin-top: -242px; margin-left: 1395px;" class="Search btn btn-info" id="SearchCoursePath" >Search</button>
<div>
<table class="btable btable-striped">
<th style="width: 430px">Course Career</th>
<th>Action<th>
<th style="width: 430px">Course Career Title </th>
<th><%= languageDict.attributes.Actions %><th>
</table>
</div>
</script>
Expand All @@ -1465,27 +1465,27 @@ <h4 id="new-quiz"><%= languageDict.attributes.New_Career_Path %></h4>
<label for="lName"><%= languageDict.attributes.Level_Name %></label>
<select id="levelSelect" style="padding: 2px; margin-top: 8px;">
<option selected><%= languageDict.attributes.Select_An_option %></option>
<option value='Begineers'>Begineers</option>
<option value='Intermediate'>Intermediate</option>
<option value='Professional'>Professional</option>
<option value='Beginners'><%= languageDict.attributes.Beginners %></option>
<option value='Intermediate'><%= languageDict.attributes.Intermediate %></option>
<option value='Professional'><%= languageDict.attributes.Professional %></option>
</select>
<label for="cpName"><%= languageDict.attributes.Course_Career_Path_Name %></label>
<input type="text" id="careerPath" placeholder="Course Career Path Name" style="padding: 2px; margin-top: 8px;">
<label for="LCourse"><%= languageDict.attributes.List_of_Courses %></label>
<select id="LCourse" name = "LCourse[]">
<select id="LCourse" name = "LCourse">
<%for(var i =0; i<Course_Length;i++){%>
<option value='<%=Courseid[i]%>'><%=Courselist[i]%></option>
<%}%>
</select>
<button id="AddCareerPath" class="course btn btn-success" style="margin-left: 23px; margin-top: -1px;"><%= languageDict.attributes.Create_Course_Career %></button>
<button id="AddCareerPath" class="course btn btn-success" style="margin-left: 23px; margin-top: -1px;"><%= languageDict.attributes.Create_Course_Career %></button>
<button id ="CancelCOursePath" class="btn resignBtn btn-danger" style="margin-left: 23px;margin-top: -1px;" ><%= languageDict.attributes.Cancel %></button>
</form>
</div>
<div>
<table class="btable btable-striped">
<th style="width: 430px">Course Career</th>
<th style="width: 430px">Courses List</th>
<th>Action<th>
<th style="width: 430px"><%= languageDict.attributes.Course_Career %></th>
<th style="width: 430px"><%= languageDict.attributes.Courses_List %></th>
<th><%= languageDict.attributes.Actions %><th>
</table>
</div>

Expand Down
5 changes: 5 additions & 0 deletions init_docs/Text.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@
"level": "Level(s)",
"Level_Name":"Level Name",
"Course_Career_Path_Name":"Course Career Path Name",
"Course_Career":"Course Career",
"Courses_List":"Courses List",
"Course_Career_Title":"Course Career Title",
"List_of_Courses":"List of Courses",
"Beginners":"Beginners",
"Intermediate":"Intermediate",
"Create_Course_Career":"Create Course Career",
"publisher_attribution": "Publisher/Attribution",
"link_to_license": "Link to License",
Expand Down

0 comments on commit b6b7650

Please sign in to comment.