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

Commit 4fea9a1

Browse files
committed
Update ConfigurationsDoc-Community.txt
1 parent 95d5181 commit 4fea9a1

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

app/MyApp/app/Router.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3062,15 +3062,15 @@ $(function() {
30623062
var CoursecommunityList = "";
30633063
if(App.configuration.get('type') == 'nation'){
30643064
$.ajax({
3065-
url: '/community/_design/bell/_view/getCommunityByCode',
3065+
url: '/members/_design/bell/_view/MembersBySelectedCommunity?group=true',
30663066
type: 'GET',
30673067
dataType: "jsonp",
30683068
async: false,
30693069
success: function(json){
30703070
CoursecommunityList = '<option value="">'+App.languageDict.attributes.All+'</option>';
30713071
CoursecommunityList += '<option value="'+App.configuration.get('code')+'">'+App.configuration.get('name')+'</option>';
30723072
$.each(json.rows, function(rec, index) {
3073-
CoursecommunityList += '<option value="'+this.value.Code+'">'+this.value.Name+'</option>';
3073+
CoursecommunityList += '<option value="'+this.key+'">'+this.key+'</option>';
30743074
})
30753075
CoursecommunityList = '<select id="CommunitySelect">'+CoursecommunityList+'</select>';
30763076
$('.DropDownOptn').append(CoursecommunityList);

app/MyApp/app/views/CourseMembers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $(function () {
6161
var na = currentConfig.rows[0].doc.nationName.substring(3,5);
6262
$('.courseEditStep').empty();
6363
$('.courseEditStep').append('<h3>'+App.languageDict.attributes.Course_Members+ ' | ' + courseModel.get('name') + '</h3>')
64-
var viewtext = '<table id = "Table1" class="btable btable-striped"><th>'+App.languageDict.attributes.Photo+'</th><th>'+App.languageDict.attributes.Name+'</th><th>'+App.languageDict.attributes.Roles+'</th><th colspan=2>'+App.languageDict.attributes.Actions+'</th>'
64+
var viewtext = '<table id = "Table1" class="btable btable-striped"><th>'+App.languageDict.attributes.Photo+'</th><th>'+App.languageDict.attributes.Name+'</th><th>'+App.languageDict.attributes.Roles+'</th><th>'+App.languageDict.attributes.Community+'</th><th colspan="2">'+App.languageDict.attributes.Actions+'</th>'
6565
for (var i = 0; i < member_list.length; i++) {
6666
var mems = new App.Models.Member({
6767
_id: member_list[i]
@@ -107,7 +107,7 @@ $(function () {
107107
'onclick=showComposePopupMultiple("' + mail + '") id="sendMailButton">'
108108
+App.languageDict.attributes.Send_Email+'</button>' +
109109
'<button class="btn" id="retrunBack" onclick=retrunBack()>'
110-
+App.languageDict.attributes.Back+'</button></td><td></td><td></td></tr>';
110+
+App.languageDict.attributes.Back+'</button></td><td></td><td></td><td></td></tr>';
111111
viewtext += '</table>';
112112
$('.courseEditStep').append(viewtext)
113113
}

databases/members.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@ ddoc.views = {
114114
}
115115
}
116116
},
117+
MembersBySelectedCommunity: {
118+
map: function(doc) {
119+
if (doc && doc.community) {
120+
emit(doc.community, doc)
121+
}
122+
},
123+
reduce: function(keys, values, rereduce) {
124+
return values[0].community;
125+
}
126+
},
117127
managerMembers: {
118128
map: function (doc) {
119129
if (doc && doc.kind == 'Member' && doc.roles.indexOf('Manager') > -1) {

0 commit comments

Comments
 (0)