From e23ab0b5d8afd6a6cf715451b8b1af24fc4e83f9 Mon Sep 17 00:00:00 2001 From: Oliver Braun Date: Tue, 5 Dec 2017 18:40:41 +0100 Subject: [PATCH] more gui work and some work for #32 --- elexams/elexams.css | 62 ++++++++++++++++-- elexams/elexams.js | 59 +++++++++++++++-- elexams/index.html | 12 +++- elexams/renderer.js | 65 ++++++++++++++++--- plexams-core/src/Plexams/Export/Common.hs | 9 ++- plexams-core/src/Plexams/PlanManip.hs | 35 ++++++++-- plexams-core/src/Plexams/Types/Exam.hs | 5 +- plexams-core/src/Plexams/Validation.hs | 6 +- plexams-core/src/Plexams/Validation/Rooms.hs | 2 +- .../src/Plexams/Validation/ScheduledExams.hs | 4 +- plexams-server/src/Plexams/Server/Server.hs | 57 +++++++++++++++- 11 files changed, 280 insertions(+), 36 deletions(-) diff --git a/elexams/elexams.css b/elexams/elexams.css index 8dc4258..48c220d 100644 --- a/elexams/elexams.css +++ b/elexams/elexams.css @@ -12,18 +12,33 @@ th { } td.exams { - height: 40px; + height: 50px; } td.times { width: 20px; } -.hardconstraints { +.HardConstraintBroken { font-weight: bold; color: red; } +.SoftConstraintBroken { + font-weight: bold; + color: blue; +} + +.Info { + font-weight: bold; + color: grey; +} + +.lecturer { + font-weight: bold; + color: blue; +} + div#description { padding: 4px; user-select: text; @@ -51,13 +66,21 @@ div#description { } div.inner { - padding: 2px; - top: 0px; + padding: 5px; + top: 5px; overflow: hidden; + border: 1px solid white; + background-color: rgb(255, 255, 204); vertical-align: top; display: block; } +div.examsBySameLecturer { + font-weight: bold; + color: blue; + border: 2px solid blue; +} + div.overlap { padding: 2px; top: 0px; @@ -67,6 +90,25 @@ div.overlap { background-color: rgb(237, 236, 107); } +div.conflicts { + padding: 2px; + top: 0px; + overflow: hidden; + vertical-align: top; + display: block; + font-weight: bold; + background-color: rgb(200, 0, 0); +} + +div.notPlannedByMe { + padding: 2px; + top: 0px; + overflow: hidden; + vertical-align: top; + display: block; + background-color: rgb(179, 179, 204); +} + div.innerUnscheduled { padding: 2px; top: 0px; @@ -99,7 +141,7 @@ div.inner:hover { } div.div_select { - background-color: rgb(212, 81, 81) !important; + background-color: rgb(0, 200, 0) !important; } @@ -118,6 +160,16 @@ div.description { min-width: 400px; } +ul#conflictingAncodes, +li#conflictingAncodes { + padding-left: 1.4em; +} + +ul#registeredGroups, +li#registeredGroups { + padding-left: 1.4em; +} + ul#groups, li#groups { padding-left: 1.4em; diff --git a/elexams/elexams.js b/elexams/elexams.js index 4202d0c..4301854 100644 --- a/elexams/elexams.js +++ b/elexams/elexams.js @@ -29,23 +29,34 @@ function viewDetails (event, anCode) { } } let groupsOutput = groupsToHTML(exam.groups) + let registeredGroupsOutput = registeredGroupsToHTML(exam.registeredGroups) output += `

${exam.name}


AnCode: ${exam.anCode}
Rooms:
Groups: ${groupsOutput} + Registered Groups: ${registeredGroupsOutput} PlannedByMe: ${exam.plannedByMe}
StudentsWithHandicaps:
- Lecturer: ${exam.lecturer.personShortName}
+ Lecturer: ${exam.lecturer.personShortName}
PersonFK: ${exam.lecturer.personFK}
- PersonIsLBA: ${exam.lecturer.personIsLBA}
+ PersonIsLBA: ${exam.lecturer.personIsLBA}
PersonID: ${exam.lecturer.personID}
PersonEmail: ${exam.lecturer.personEmail}
Duration: ${exam.duration}
ReExam: ${exam.reExam}
ExamType: ${exam.examType}
- Overlaps:
` + Conflicting Ancodes: +