From 0db709ebdb3698ee38c8167610b25344662d3464 Mon Sep 17 00:00:00 2001 From: Rupesh Manandhar Date: Mon, 5 Jun 2017 14:01:37 +0545 Subject: [PATCH] [#840] select value and save career --- app/MyApp/app/Router.js | 12 ++++++- app/MyApp/app/views/AddCourseCareer.js | 45 ++++++++++++++------------ app/MyApp/index.html | 4 +-- 3 files changed, 38 insertions(+), 23 deletions(-) diff --git a/app/MyApp/app/Router.js b/app/MyApp/app/Router.js index 5df7e8288..b1820a35c 100644 --- a/app/MyApp/app/Router.js +++ b/app/MyApp/app/Router.js @@ -1805,6 +1805,7 @@ $(function() { } $('.form .field-Tag select').attr("multiple", true); $('.form .field-Tag select').click(function() { + console.log(this.value) context.AddNewSelect(this.value) }); $('.form .field-Tag select').dblclick(function() { @@ -6754,7 +6755,16 @@ $(function() { App.$el.children('.body').html('
'); $('#ManageCourseCareer').append('

'+App.languageDict.attributes.Add_Multiple_Courses+'

') $('#ManageCourseCareer').append(addCourseCareer.el); - $('#LCourse').multiselect({columns: 1,placeholder: 'Select Course'}); + $('#LCourse').multiselect().multiselectfilter(); + $('#LCourse').multiselect({ + checkAllText: App.languageDict.attributes.checkAll, + uncheckAllText: App.languageDict.attributes.unCheckAll, + selectedText: '# '+App.languageDict.attributes.Selected + }); + $('#LCourse').multiselect().multiselectfilter("widget")[0].children[0].firstChild.data=App.languageDict.attributes.Filter; + $('.ui-multiselect-filter').find('input').attr('placeholder',App.languageDict.attributes.KeyWord_s); + $('#LCourse').attr("multiple", true); + $('#LCourse').multiselect("uncheckAll"); var directionOfLang = App.languageDict.get('directionOfLang'); applyCorrectStylingSheet(directionOfLang) diff --git a/app/MyApp/app/views/AddCourseCareer.js b/app/MyApp/app/views/AddCourseCareer.js index 1cc4d9d94..91f802455 100644 --- a/app/MyApp/app/views/AddCourseCareer.js +++ b/app/MyApp/app/views/AddCourseCareer.js @@ -17,38 +17,43 @@ $(function() { }, saveCareerPath: function(){ - var levelname = $('#level').val() - var coursetitle = $('#LCourse').val() - var arrcourseId = [] - for(var i = 0; i '+App.languageDict.attributes.Finish+'  '); this.vars.Courselist = arrcourses + this.vars.Courseid = arrCourseIds this.vars.Course_Length = this.collection.models.length this.$el.html(_.template(this.template,this.vars)) }, diff --git a/app/MyApp/index.html b/app/MyApp/index.html index f44158684..6ac6ec38d 100644 --- a/app/MyApp/index.html +++ b/app/MyApp/index.html @@ -1473,8 +1473,8 @@

<%= languageDict.attributes.New_Career_Path %>