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

Commit

Permalink
[#840] Career Path
Browse files Browse the repository at this point in the history
  • Loading branch information
razu9861 committed Oct 9, 2017
1 parent 422c207 commit 1134278
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 21 deletions.
6 changes: 2 additions & 4 deletions app/MyApp/app/Router.js
Original file line number Diff line number Diff line change
Expand Up @@ -2178,7 +2178,6 @@ $(function() {
var button = '<p id="library-top-buttons">'
button += '<a id="addCourseButton" class="btn btn-success" href="#course/add">'+App.languageDict.attributes.Add_Course+'</a>'
button += '<a id="requestCourseButton" class="btn btn-success" onclick=showRequestForm("Course")>'+App.languageDict.attributes.Request_Course+'</a>'
//button += '<a id="courseCareerPath" style = "margin-left: 15px;" href="#courseCareerPath/add">'+App.languageDict.attributes.Course_Career_Path+'</a>'
button += '<span id="searchSpan"><input id="searchText" value="" size="30" style="height:24px;margin-top:1%;" type="text"><span style="margin-left:10px">'
button += '<button class="btn btn-info" onclick="CourseSearch()">'+App.languageDict.attributes.Search+'</button></span>'
button += '</p>'
Expand Down Expand Up @@ -6781,9 +6780,9 @@ $(function() {
$('#ManageCourseCareer').append('<a id="addCourseButton" class="btn btn-success" href="#course/add">'+App.languageDict.attributes.Add_Course+'</a>')
$('#ManageCourseCareer').append('<a id="requestCourseButton" class="btn btn-success" style="margin: 13px;margin-left: 9px;" onclick=showRequestForm("Course")>'+App.languageDict.attributes.Request_Course+'</a>')
if($.url().attr('fragment') == "courses") {
$('#ManageCourseCareer').append('<p id="labelOnResource" style="font-size:30px; margin-bottom: -23px;color:#808080"><a href="#courses"style="font-size:30px;text-decoration: underline;">'+languageDict.attributes.Courses+'</a>&nbsp&nbsp|&nbsp&nbsp<a href="#courseCareerPath" style="font-size:30px;text-decoration: underline;"checked data-toggle="toggle">'+languageDict.attributes.Career_Path+'</a></p>')
$('#ManageCourseCareer').append('<p id="labelOnResource" style="font-size:30px; color:#808080"><a href="#courses"style="font-size:30px;text-decoration: underline;">'+languageDict.attributes.Courses+'</a>&nbsp&nbsp|&nbsp&nbsp<a href="#courseCareerPath" style="font-size:30px;text-decoration: underline;"checked data-toggle="toggle">'+languageDict.attributes.Career_Path+'</a></p>')
}else{
$('#ManageCourseCareer').append('<p id="labelOnResource" style="font-size:30px; margin-bottom: -23px;color:#808080"><a href="#courses"style="font-size:30px;">'+languageDict.attributes.Courses+'</a>&nbsp&nbsp|&nbsp&nbsp<a href="#courseCareerPath" style="font-size:30px;text-decoration: underline;"checked data-toggle="toggle">'+languageDict.attributes.Career_Path+'</a></p>')
$('#ManageCourseCareer').append('<p id="labelOnResource" style="font-size:30px; color:#808080"><a href="#courses"style="font-size:30px;">'+languageDict.attributes.Courses+'</a>&nbsp&nbsp|&nbsp&nbsp<a href="#courseCareerPath" style="font-size:30px;text-decoration: underline;"checked data-toggle="toggle">'+languageDict.attributes.Career_Path+'</a></p>')
}
$('#ManageCourseCareer').append(addCourseCareer.el);
$("#EditCareerPath").hide();
Expand Down Expand Up @@ -6812,7 +6811,6 @@ $(function() {
$('.ui-multiselect-filter').find('input').attr('placeholder',App.languageDict.attributes.KeyWord_s);
$('#LCareer').attr("multiple", true);
$('#LCareer').multiselect("uncheckAll");
///
var directionOfLang = App.languageDict.get('directionOfLang');
applyCorrectStylingSheet(directionOfLang)
},
Expand Down
8 changes: 5 additions & 3 deletions app/MyApp/app/views/AddCourseCareer.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ $(function() {


render: function() {
var careerlength;
var arrcourses = []
var arrCourseIds = []
for(var i = 0; i <this.collection.models.length; i++){
Expand All @@ -148,7 +149,6 @@ $(function() {
arrcourses.push(courseslist)
arrCourseIds.push(courseId)
}

}
var courseCareers = new App.Collections.CourseCareerPath()
courseCareers.memberId = $.cookie('Member._id');
Expand All @@ -162,7 +162,9 @@ $(function() {
this.vars.careerList.push(courseCareers.models[i].attributes);
}
}

this.vars.Courselist = arrcourses
this.vars.careerlength = careerlength
this.vars.Courseid = arrCourseIds
this.vars.Course_Length = this.collection.models.length-1
////PushRequired ID
Expand All @@ -172,10 +174,10 @@ $(function() {
if(courseCareers.models[j].attributes._id != '_design/bell'){
this.vars.CareerList.push(courseCareers.models[j].attributes.CoursePathName);
this.vars.careerListIds.push(courseCareers.models[j].attributes._id);
this.vars.careerlength = j + 1
// this.vars.careerlength = j + 1
}

}
this.vars.careerlength =courseCareers.length-1
this.$el.html(_.template(this.template,this.vars))
},
})
Expand Down
24 changes: 11 additions & 13 deletions app/MyApp/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
<script src="app/views/AnswerReview.js"></script> <!-- app/views.js -->
<script src="app/views/PasswordReset.js"></script> <!-- app/views.js -->
<script src="app/views/ManageCourseCareer.js"></script> <!-- app/views.js -->
<script src="app/views/CareerPathTable.js"></script> <!-- app/views.js -->
<!-- <script src="app/views/CareerPathTable.js"></script> --><!-- app/views.js -->


<!-- javaScript -->
Expand Down Expand Up @@ -1460,23 +1460,21 @@ <h4 style="width:25em;word-wrap:break-word;">
</script>

<script type="text/template" id="template-addCourseCareer">
<input id="searchText" type="Text" placeholder="Course Career Name" style="margin-top: -137px; margin-left: 1056px; height: 28px; width: 170px;">
<button style="margin-top: -183px; margin-left: 1251px;" class="Search btn btn-info" id="SearchCoursePath" >Search</button>
<!-- <input id="searchText" type="Text" placeholder="Course Career Name" style="margin-top: -137px; margin-left: 1056px; height: 28px; width: 170px;">
<button style="margin-top: -183px; margin-left: 1251px;" class="Search btn btn-info" id="SearchCoursePath" >Search</button> -->
<div class ="multipleCourse">
<form>
<label for="cpName"><b><%= languageDict.attributes.Career_Path_Name %></b></label>
<input type="text" id="careerPath" placeholder="Career Path Name" style="padding: 2px; margin-top: 8px;" required>
<label for="LCourse"><b><%= languageDict.attributes.List_of_Courses %></b></label>
<label for="cpName"><b><%= languageDict.attributes.Career_Path_Name %>:</b></label>
<input type="text" id="careerPath" placeholder="Career Path Name" style="padding: 2px; margin-top: 8px;" required> &nbsp;&nbsp;
<label for="LCourse"><b><%= languageDict.attributes.List_of_Courses %>:</b></label>
<select id="LCourse">
<%for(var i =0; i<Course_Length;i++){%>
<%for(var i =0; i< Course_Length;i++){%>
<option value='<%=Courseid[i]%>'><%=Courselist[i]%></option>
<%}%>
</select>
<label for="LCareer"><b><%= languageDict.attributes.Required_Course_Career_Path %></b></label>

</select>&nbsp;&nbsp;
<label for="LCareer"><b><%= languageDict.attributes.Required_Course_Career_Path %>:</b></label>
<select id="LCareer">

<% for (var j =0; j<careerlength;j++){%>
<% for (var j =0; j < careerlength;j++){%>
<option value ='<%=CareerList[j]%>'><%=CareerList[j]%></option>
<%}%>
</select>
Expand All @@ -1495,7 +1493,7 @@ <h4 style="width:25em;word-wrap:break-word;">
</tr>
<%for (var i=0; i < careerList.length; i++) {%>
<tr>
<td><%= careerList[i].CoursePathName %></td>
<td><a href="#usercourse/details/<%= Courseid[i] %>/<%= Courselist[i] %>"><%= careerList[i].CoursePathName %></a></td>
<td><ul><li><%= careerList[i].Courses %></li></ul></td>
<td><ul><li><%= careerList[i].requiredCareerPathIds%></li></ul></td>
<td>
Expand Down
2 changes: 1 addition & 1 deletion init_docs/Text.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"subject": "Subject(s)",
"level": "Level(s)",
"Level_Name":"Level Name",
"Required_Course_Career_Path":"Required Course Career Path",
"Required_Course_Career_Path":"Career",
"Career_Path_Name":"Career Path Name",
"Add_Course_Career_Level":"Add Course Career Level",
"Course_Career":"Course Career",
Expand Down

0 comments on commit 1134278

Please sign in to comment.