new State()
A singleton class representing the state.
Example
var stateExemple = {
version: 5,
campus: "TODOS",
semester: "20162",
planIndex: 0,
plans: [Plan()]
}
Methods
addLecture(lecture, planIndexopt)
Adds a lecture to the current active plan if no planIndex was given.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
lecture |
Lecture | ||
planIndex |
Number |
<optional> |
fullExample()
Full State example
Returns:
Example
var stateExemple = {
version: 5,
campus: "TODOS",
semester: "20162",
planIndex: 0,
plans: [
{
combination: 1,
active: 1,
lectures: [
{
code: "SCC0502",
name: "Algoritmos e Estruturas de Dados I",
color: "lightblue",
campus: "TODOS",
selected: 1,
classrooms: [
{
classroomCode: "43",
selected: 1,
horas_aula: 0,
vagas_ofertadas: 0,
vagas_ocupadas: 0,
alunos_especiais: 0,
saldo_vagas: 0,
pedidos_sem_vaga: 0,
teachers: [
"First Guy",
"Second Son",
"third Weird"
],
schedules: [
{
day: "qua",
timeBegin: "19:00",
timeEnd: "20:40",
htmlElement: div.schedule-box
}
],
htmlElement: div.classroom-info
}
],
htmlElement: div.lecture-info
}
],
htmlElement: document.createElement('div'), // só existirá com o design finalizado
htmlElementCombinations: [
document.createElement('div'), // só existirá com o design finalizado
]
}
]
}