Skip to content
This repository has been archived by the owner on Mar 20, 2018. It is now read-only.

Informações pessoais (Ricardo Gallego) e #4 #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from 3 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
18 changes: 16 additions & 2 deletions js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,11 @@ people = [
},
{
full_name: 'Ricardo Boccoli Gallego',
first_name: 'Ricardo'
first_name: 'Ricardo',
course: 'Curso Semestral',
birthday: '06/04/1993',
about: 'I love sleeping.',
picture: '18a4c7cf25f42320d1838376e702225e'
},
{
full_name: 'Saulo de Tarso Ribeiro Costa',
Expand All @@ -152,7 +156,17 @@ $(function() {
*/

[].forEach.call(people, function(person) {
person_element = $('<div class="person" draggable="true"><span>' + person.first_name + '</span></div>');
var back_color = "purple";
if (person.course != null) {
if (person.course.toLowerCase() == "curso semestral")
back_color = "blue";
else if (person.course.toLowerCase() == "curso cooperativo")
Copy link

Choose a reason for hiding this comment

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

Esse else if deveria estar alinhado com o if da linha 163.

back_color = "red";
}
if (person.first_name.toLowerCase() == "michelet")
back_color = "black";

person_element = $('<div class="person" style="background-color:' + back_color + ';" draggable="true"><span>' + person.first_name + '</span></div>');
person_element.find('span').data('who', person);
$('#people').append(person_element);
});
Expand Down