From ebfd1998695e01799ad81b071e6d1274b03d1416 Mon Sep 17 00:00:00 2001 From: ZoqkMaze <155395129+ZoqkMaze@users.noreply.github.com> Date: Mon, 30 Mar 2026 21:47:33 +0200 Subject: [PATCH 1/7] add copy button --- .../staff_semester_view_evaluation.html | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/evap/staff/templates/staff_semester_view_evaluation.html b/evap/staff/templates/staff_semester_view_evaluation.html index f6dfc312a8..8872afae9d 100644 --- a/evap/staff/templates/staff_semester_view_evaluation.html +++ b/evap/staff/templates/staff_semester_view_evaluation.html @@ -76,7 +76,7 @@ {% endif %} -
+
{% if not info_only and request.user.is_manager %} {{ evaluation.full_name }} {% include 'cms_evaluation_link_icons.html' %} @@ -196,6 +196,11 @@ {% translate 'Copy evaluation' %} +
  • + + {% translate 'Copy Name to Clipboard' %} + +
  • {% translate 'Merge with other evaluation' %} @@ -259,3 +264,17 @@ {% endwith %} + +{% block additional_javascript %} + +{% endblock %} + \ No newline at end of file From 879e0af126459b356149689f63f5f0a5478dc556 Mon Sep 17 00:00:00 2001 From: ZoqkMaze <155395129+ZoqkMaze@users.noreply.github.com> Date: Mon, 30 Mar 2026 22:09:46 +0200 Subject: [PATCH 2/7] copy when click --- evap/staff/templates/staff_evaluation_form.html | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/evap/staff/templates/staff_evaluation_form.html b/evap/staff/templates/staff_evaluation_form.html index 89d298c7fc..1d8652d1c6 100644 --- a/evap/staff/templates/staff_evaluation_form.html +++ b/evap/staff/templates/staff_evaluation_form.html @@ -12,11 +12,13 @@
  • {% endif %}

    - {% if evaluation_form.instance.id %} - {{ evaluation.full_name }} ({{ evaluation.course.semester.name }}) - {% else %} - {% translate 'Create evaluation' %} - {% endif %} + + {% if evaluation_form.instance.id %} + {{ evaluation.full_name }} ({{ evaluation.course.semester.name }}) + {% else %} + {% translate 'Create evaluation' %} + {% endif %} +

    {% if evaluation_form.instance.id %}
    From 7cb02cd23fa173ba3399d3acdd8c6c04afb07d68 Mon Sep 17 00:00:00 2001 From: ZoqkMaze <155395129+ZoqkMaze@users.noreply.github.com> Date: Mon, 30 Mar 2026 22:44:06 +0200 Subject: [PATCH 3/7] add copy --- evap/staff/templates/staff_course_form.html | 4 +++- .../templates/staff_evaluation_form.html | 2 +- .../staff_semester_view_evaluation.html | 20 +++---------------- 3 files changed, 7 insertions(+), 19 deletions(-) diff --git a/evap/staff/templates/staff_course_form.html b/evap/staff/templates/staff_course_form.html index 4b65c963ff..04e073abf8 100644 --- a/evap/staff/templates/staff_course_form.html +++ b/evap/staff/templates/staff_course_form.html @@ -6,7 +6,9 @@ {{ block.super }}

    {% if course_form.instance.id %} - {{ course.name }} ({{ course.semester.name }}) + + {{ course.name }} ({{ course.semester.name }}) + {% else %} {% translate 'Create course' %} {% endif %} diff --git a/evap/staff/templates/staff_evaluation_form.html b/evap/staff/templates/staff_evaluation_form.html index 1d8652d1c6..43fa6429a6 100644 --- a/evap/staff/templates/staff_evaluation_form.html +++ b/evap/staff/templates/staff_evaluation_form.html @@ -12,7 +12,7 @@

    {% endif %}

    - + {% if evaluation_form.instance.id %} {{ evaluation.full_name }} ({{ evaluation.course.semester.name }}) {% else %} diff --git a/evap/staff/templates/staff_semester_view_evaluation.html b/evap/staff/templates/staff_semester_view_evaluation.html index 8872afae9d..1f4770ec1b 100644 --- a/evap/staff/templates/staff_semester_view_evaluation.html +++ b/evap/staff/templates/staff_semester_view_evaluation.html @@ -76,7 +76,7 @@ {% endif %} -
    +
    {% if not info_only and request.user.is_manager %} {{ evaluation.full_name }} {% include 'cms_evaluation_link_icons.html' %} @@ -197,8 +197,8 @@
  • - - {% translate 'Copy Name to Clipboard' %} + + {% translate 'Copy name to clipboard' %}
  • @@ -264,17 +264,3 @@ {% endwith %} - -{% block additional_javascript %} - -{% endblock %} - \ No newline at end of file From 9bc8aad0efb4394fcb186d1d781ff0242e53c87f Mon Sep 17 00:00:00 2001 From: ZoqkMaze <155395129+ZoqkMaze@users.noreply.github.com> Date: Mon, 27 Apr 2026 19:58:39 +0200 Subject: [PATCH 4/7] link to span --- evap/staff/templates/staff_course_form.html | 4 ++-- evap/staff/templates/staff_evaluation_form.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/evap/staff/templates/staff_course_form.html b/evap/staff/templates/staff_course_form.html index 04e073abf8..665b874521 100644 --- a/evap/staff/templates/staff_course_form.html +++ b/evap/staff/templates/staff_course_form.html @@ -6,9 +6,9 @@ {{ block.super }}

    {% if course_form.instance.id %} - + {{ course.name }} ({{ course.semester.name }}) - + {% else %} {% translate 'Create course' %} {% endif %} diff --git a/evap/staff/templates/staff_evaluation_form.html b/evap/staff/templates/staff_evaluation_form.html index 43fa6429a6..f5f86a975c 100644 --- a/evap/staff/templates/staff_evaluation_form.html +++ b/evap/staff/templates/staff_evaluation_form.html @@ -12,13 +12,13 @@

  • {% endif %}

    - + {% if evaluation_form.instance.id %} {{ evaluation.full_name }} ({{ evaluation.course.semester.name }}) {% else %} {% translate 'Create evaluation' %} {% endif %} - +

    {% if evaluation_form.instance.id %}
    From 042cb29b9159cbd8ff1d3b02d9ebea41fc38858d Mon Sep 17 00:00:00 2001 From: ZoqkMaze <155395129+ZoqkMaze@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:27:58 +0200 Subject: [PATCH 5/7] add global listener --- evap/staff/templates/staff_course_form.html | 2 +- evap/staff/templates/staff_evaluation_form.html | 2 +- .../templates/staff_semester_view_evaluation.html | 2 +- evap/static/ts/src/base-template.ts | 10 ++++++++++ 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/evap/staff/templates/staff_course_form.html b/evap/staff/templates/staff_course_form.html index 665b874521..02d4d83abd 100644 --- a/evap/staff/templates/staff_course_form.html +++ b/evap/staff/templates/staff_course_form.html @@ -6,7 +6,7 @@ {{ block.super }}

    {% if course_form.instance.id %} - + {{ course.name }} ({{ course.semester.name }}) {% else %} diff --git a/evap/staff/templates/staff_evaluation_form.html b/evap/staff/templates/staff_evaluation_form.html index f5f86a975c..e5cf44518b 100644 --- a/evap/staff/templates/staff_evaluation_form.html +++ b/evap/staff/templates/staff_evaluation_form.html @@ -12,7 +12,7 @@

    {% endif %}

    - + {% if evaluation_form.instance.id %} {{ evaluation.full_name }} ({{ evaluation.course.semester.name }}) {% else %} diff --git a/evap/staff/templates/staff_semester_view_evaluation.html b/evap/staff/templates/staff_semester_view_evaluation.html index 1f4770ec1b..874fb579b8 100644 --- a/evap/staff/templates/staff_semester_view_evaluation.html +++ b/evap/staff/templates/staff_semester_view_evaluation.html @@ -197,7 +197,7 @@
  • - + {% translate 'Copy name to clipboard' %}
  • diff --git a/evap/static/ts/src/base-template.ts b/evap/static/ts/src/base-template.ts index 536cbd61be..1f965071d8 100644 --- a/evap/static/ts/src/base-template.ts +++ b/evap/static/ts/src/base-template.ts @@ -11,3 +11,13 @@ document.addEventListener("shown.bs.modal", e => { autofocusEl.focus(); } }); + +document.addEventListener("click", e => { + if (!e.target) {return;} + const modalEl = e.target as HTMLElement; + if (!modalEl.hasAttribute("data-copy-on-click")) {return;} + const copy_string = modalEl.getAttribute("data-copy-on-click")?.toString(); + if (copy_string) { + navigator.clipboard.writeText(copy_string); + } +}); From 277aa33a7d6fdb2a3a1355bdfc0dc071758c7d96 Mon Sep 17 00:00:00 2001 From: ZoqkMaze <155395129+ZoqkMaze@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:39:20 +0200 Subject: [PATCH 6/7] test tooltip change --- evap/static/ts/src/base-template.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/evap/static/ts/src/base-template.ts b/evap/static/ts/src/base-template.ts index 1f965071d8..ba8af09afc 100644 --- a/evap/static/ts/src/base-template.ts +++ b/evap/static/ts/src/base-template.ts @@ -19,5 +19,12 @@ document.addEventListener("click", e => { const copy_string = modalEl.getAttribute("data-copy-on-click")?.toString(); if (copy_string) { navigator.clipboard.writeText(copy_string); + // console.log("copied"); + // console.log(modalEl.getAttributeNames()); + // console.log(modalEl.getAttribute("data-bs-original-title")) + // if (modalEl.hasAttribute("data-bs-original-title")) { + // modalEl.setAttribute("data-bs-original-title", "Copied to clipboard"); + // console.log("data-bs-original-title"); + // } } }); From 33b83343c349685fd244c7ae0f6fe5adf9119a88 Mon Sep 17 00:00:00 2001 From: ZoqkMaze <155395129+ZoqkMaze@users.noreply.github.com> Date: Mon, 27 Apr 2026 22:40:00 +0200 Subject: [PATCH 7/7] format --- evap/static/ts/src/base-template.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/evap/static/ts/src/base-template.ts b/evap/static/ts/src/base-template.ts index ba8af09afc..35fce33a35 100644 --- a/evap/static/ts/src/base-template.ts +++ b/evap/static/ts/src/base-template.ts @@ -13,9 +13,13 @@ document.addEventListener("shown.bs.modal", e => { }); document.addEventListener("click", e => { - if (!e.target) {return;} + if (!e.target) { + return; + } const modalEl = e.target as HTMLElement; - if (!modalEl.hasAttribute("data-copy-on-click")) {return;} + if (!modalEl.hasAttribute("data-copy-on-click")) { + return; + } const copy_string = modalEl.getAttribute("data-copy-on-click")?.toString(); if (copy_string) { navigator.clipboard.writeText(copy_string);