diff --git a/app/MyApp/app/views/AddCourseCareer.js b/app/MyApp/app/views/AddCourseCareer.js index 7bace5682..5550e977d 100644 --- a/app/MyApp/app/views/AddCourseCareer.js +++ b/app/MyApp/app/views/AddCourseCareer.js @@ -106,33 +106,33 @@ $(function() { }) location.reload(); } else { - $('#LCourse option:selected').each(function(){ - if ($(this).length) { - selectedCourseId.push($(this).val()); - selectedCourseName.push($(this).text()); - } - }); - $('#LCareer option:selected').each(function(){ + $('#LCourse option:selected').each(function(){ + if ($(this).length) { + selectedCourseId.push($(this).val()); + selectedCourseName.push($(this).text()); + } + }); + $('#LCareer option:selected').each(function(){ if ($(this).length) { selectedCareerIds.push($(this).val()); } }); - var courseCareerTitle = $('#careerPath').val() - var savecoursecareer = new App.Models.CoursecareerPath() - savecoursecareer.set('CoursePathName',courseCareerTitle); - savecoursecareer.set('Courses',selectedCourseName); - savecoursecareer.set('CourseIds',selectedCourseId); - savecoursecareer.set('MemberID',$.cookie('Member._id')); - savecoursecareer.set('requiredCareerPathIds',selectedCareerIds); - savecoursecareer.save(null, { - success: function(response){ - location.reload(); - }, - error: function(status) { - console.log(status) - console.log("Not Saved") - } - }) + var courseCareerTitle = $('#careerPath').val() + var savecoursecareer = new App.Models.CoursecareerPath() + savecoursecareer.set('CoursePathName',courseCareerTitle); + savecoursecareer.set('Courses',selectedCourseName); + savecoursecareer.set('CourseIds',selectedCourseId); + savecoursecareer.set('MemberID',$.cookie('Member._id')); + savecoursecareer.set('requiredCareerPathIds',selectedCareerIds); + savecoursecareer.save(null, { + success: function(response){ + location.reload(); + }, + error: function(status) { + console.log(status) + console.log("Not Saved") + } + }) } }, diff --git a/app/MyApp/app/views/ManageCourseCareer.js b/app/MyApp/app/views/ManageCourseCareer.js index 26863c027..865f48e58 100644 --- a/app/MyApp/app/views/ManageCourseCareer.js +++ b/app/MyApp/app/views/ManageCourseCareer.js @@ -13,10 +13,7 @@ $(function() { }, }, - initialize: function() { - - }, - + initialize: function() {}, saveMultipelCareer:function(){ var selectedCareerIds = [] $('#LCourse option:selected').each(function(){ diff --git a/app/MyApp/index.html b/app/MyApp/index.html index 29f51ee41..be2a442d4 100644 --- a/app/MyApp/index.html +++ b/app/MyApp/index.html @@ -308,14 +308,12 @@ - - @@ -1483,15 +1481,12 @@

class='course btn btn-success'><%=languageDict.attributes.EditLabel%> <%=languageDict.attributes.DeleteLabel%> - <% } %> - -