diff --git a/app/MyApp/app/Home-Urdu.css b/app/MyApp/app/Home-Urdu.css index d7ce1bd25..766ba6629 100644 --- a/app/MyApp/app/Home-Urdu.css +++ b/app/MyApp/app/Home-Urdu.css @@ -1248,4 +1248,8 @@ form > fieldset > ul > li.bbf-field.field-selectLanguage { .answersection table{ width: 100%; } - +.DropDownOptn{ + float: left; + margin-left: 20px; + position: relative; +} diff --git a/app/MyApp/app/Home.css b/app/MyApp/app/Home.css index b5c325c3e..f771f10c7 100644 --- a/app/MyApp/app/Home.css +++ b/app/MyApp/app/Home.css @@ -1049,3 +1049,8 @@ form > fieldset > ul > li.bbf-field.field-selectLanguage { .answersection table{ width: 100%; } +.DropDownOptn{ + float: right; + margin-right: 20px; + position: relative; +} diff --git a/app/MyApp/app/Router.js b/app/MyApp/app/Router.js index c2675c507..a6aa4db98 100644 --- a/app/MyApp/app/Router.js +++ b/app/MyApp/app/Router.js @@ -2975,10 +2975,33 @@ $(function() { CourseMembers: function(cId) { var courseMembers = new App.Views.CourseMembers() courseMembers.courseId = cId; - App.$el.children('.body').empty(); + App.$el.children('.body').html('
') App.$el.children('.body').append(''); courseMembers.render(); - $('.courseEditStep').append(courseMembers.el); + var CoursecommunityList = ""; + if(App.configuration.get('type') == 'nation'){ + $.ajax({ + url: '/community/_design/bell/_view/getCommunityByCode', + type: 'GET', + dataType: "jsonp", + async: false, + success: function(json){ + CoursecommunityList = ''; + CoursecommunityList += ''; + $.each(json.rows, function(rec, index) { + CoursecommunityList += ''; + }) + CoursecommunityList = ''; + $('.DropDownOptn').append(CoursecommunityList); + } + }); + } + $('#CommunitySelect').change(function(){ + var selectedvalue = $('#CommunitySelect').val(); + var courseMembers = new App.Views.CourseMembers() + courseMembers.courseId = cId; + courseMembers.randerTable(selectedvalue); + }); var directionOfLang = App.languageDict.get('directionOfLang'); if(directionOfLang.toLowerCase()==="right") { $('.courseEditStep').find('h3').css('margin-right','5%'); diff --git a/app/MyApp/app/views/CourseMembers.js b/app/MyApp/app/views/CourseMembers.js index eab70e1e5..039188aa8 100644 --- a/app/MyApp/app/views/CourseMembers.js +++ b/app/MyApp/app/views/CourseMembers.js @@ -2,7 +2,6 @@ $(function () { App.Views.CourseMembers = Backbone.View.extend({ vars: {}, - initialize: function () {}, removeMember:function(e){ @@ -47,12 +46,13 @@ $(function () { config.fetch({ async: false }) + var currentConfig = config.first().toJSON() var code = currentConfig.rows[0].doc.code var na = currentConfig.rows[0].doc.nationName.substring(3,5); $('.courseEditStep').empty(); $('.courseEditStep').append('