Skip to content
Snippets Groups Projects
Commit e2b4eb7d authored by Anton Bagliy's avatar Anton Bagliy
Browse files

Merge branch 'issue421_ios_checkmarks' into develop

parents f5311162 ac65da1b
No related merge requests found
...@@ -55,7 +55,8 @@ $(() => { ...@@ -55,7 +55,8 @@ $(() => {
<div class="delete_lesson" id="lesson_delete_${lesson.ID}"><span class="delete_lesson_icon"></span></div>`, <div class="delete_lesson" id="lesson_delete_${lesson.ID}"><span class="delete_lesson_icon"></span></div>`,
field: "Lesson" + lesson.ID, field: "Lesson" + lesson.ID,
headerVertical: false, headerVertical: false,
editor: "tick", formatter: "tickCross", // editor: "tickCross",
formatter: "tickCross",
sortable: false, headerSort: false sortable: false, headerSort: false
}; };
columnDescription.push(lessonDescription); columnDescription.push(lessonDescription);
...@@ -256,6 +257,18 @@ $(() => { ...@@ -256,6 +257,18 @@ $(() => {
} }
}; };
let onCellClick = function(e, cell) {
oldValue = cell.getValue();
columnName = cell.getField();
if (columnName.startsWith('Lesson')) {
if (oldValue) {
cell.setValue(false)
} else {
cell.setValue(true)
}
}
};
table = new Tabulator("#studentsAttendance", { table = new Tabulator("#studentsAttendance", {
columnVertAlign: "bottom", //align header contents to bottom of cell columnVertAlign: "bottom", //align header contents to bottom of cell
data: studentList, data: studentList,
...@@ -268,6 +281,7 @@ $(() => { ...@@ -268,6 +281,7 @@ $(() => {
persistenceID: "DisciplineJournal" + discipline.ID, persistenceID: "DisciplineJournal" + discipline.ID,
clipboard: true, clipboard: true,
history: true, history: true,
cellClick: onCellClick,
cellEdited: editAttendance, cellEdited: editAttendance,
historyUndo: undoAttendance, historyUndo: undoAttendance,
historyRedo: redoAttendance, historyRedo: redoAttendance,
...@@ -413,7 +427,8 @@ $(() => { ...@@ -413,7 +427,8 @@ $(() => {
<div class="delete_lesson" id="lesson_delete_${lessonID}"><span class="delete_lesson_icon"></span></div>`, <div class="delete_lesson" id="lesson_delete_${lessonID}"><span class="delete_lesson_icon"></span></div>`,
field: "Lesson" + lessonID, field: "Lesson" + lessonID,
headerVertical: false, headerVertical: false,
editor: "tick", formatter: "tickCross", //editor: "tickCross",
formatter: "tickCross",
sortable: false, headerSort: false sortable: false, headerSort: false
}, false); }, false);
var col = table.getColumn("Lesson"+lessonID); var col = table.getColumn("Lesson"+lessonID);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment