Skip to content
This repository was archived by the owner on Aug 21, 2018. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions app/MyApp/app/views/CourseMembers.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ $(function () {
memberProgress.fetch({
async: false,
success: function(res){
console.log(res)
member_list = []
if(res.length > 0){
for(var i = 0; i < res.length; i++){
Expand All @@ -57,7 +56,6 @@ $(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);
Expand All @@ -84,7 +82,11 @@ $(function () {
attchmentURL = attchmentURL + _.keys(mems.get('_attachments'))[0]
src = attchmentURL
}
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td><input type="checkbox" name="courseMember" value="' + mail + '">'+App.languageDict.attributes.Send_Email+'</td>'
if(config.models[0].attributes.rows[0].doc.type == 'nation' && mems.get("community") == 'nationbell' || config.models[0].attributes.rows[0].doc.type == 'community'){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compare mems.get(community) with config.models[0].attributes.rows[0].doc.code

viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td><input type="checkbox" name="courseMember" value="' + mail + '">'+App.languageDict.attributes.Send_Email+'</td>'
} else {
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td></td>'
}
var loggedIn = new App.Models.Member({
"_id": $.cookie('Member._id')
})
Expand Down Expand Up @@ -181,7 +183,11 @@ $(function () {
attchmentURL = attchmentURL + _.keys(mems.get('_attachments'))[0]
src = attchmentURL
}
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td><input type="checkbox" name="courseMember" value="' + mail + '">'+App.languageDict.attributes.Send_Email+'</td>'
if(config.models[0].attributes.rows[0].doc.type == 'nation' && mems.get("community") == 'nationbell'){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

compare mems.get(community) with config.models[0].attributes.rows[0].doc.code

viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td><input type="checkbox" name="courseMember" value="' + mail + '">'+App.languageDict.attributes.Send_Email+'</td>'
} else{
viewtext += '<tr><td><img width="45px" height="45px" src="' + src + '"/></td><td>' + mems.get('firstName') + ' ' + mems.get('lastName') + '</td><td>'+roleOfMem+'</td><td></td>'
}
var loggedIn = new App.Models.Member({
"_id": $.cookie('Member._id')
})
Expand Down