Skip to content

Commit d3e291b

Browse files
author
Marc Schlaeppi
committed
Make note overflow menu useful
1 parent 1fadfc3 commit d3e291b

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

source/app/blueprints/pages/case/templates/case_notes_v2.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,11 @@ <h4 class="page-title mb-0" id="currentNoteTitle"></h4>
9898
</span>
9999
</button>
100100
<div class="dropdown">
101-
<button class="btn bg-transparent" id="dropdownMenuButton" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">
101+
<button type="button" class="btn bg-transparent" id="noteQuickActionsToggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" title="More note actions" aria-label="More note actions">
102102
<span aria-hidden="true"><i class="fas fa-ellipsis-v"></i></span>
103103
</button>
104-
<div class="dropdown-menu pull-right" id="note_quick_actions" aria-labelledby="dropdownMenuButton">
104+
<div class="dropdown-menu pull-right" id="note_quick_actions" aria-labelledby="noteQuickActionsToggle">
105+
<a class="dropdown-item" href="#" onclick="load_note_revisions();return false;"><i class="fa-solid fa-clock-rotate-left mr-2"></i>Revision history</a>
105106
</div>
106107
</div>
107108
</div>

ui/test/note_overflow_menu.test.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import assert from 'node:assert/strict';
2+
import { readFile } from 'node:fs/promises';
3+
import test from 'node:test';
4+
5+
const templateUrl = new URL('../../source/app/blueprints/pages/case/templates/case_notes_v2.html', import.meta.url);
6+
7+
test('note overflow menu always exposes revision history', async () => {
8+
const template = await readFile(templateUrl, 'utf8');
9+
10+
assert.match(template, /id="noteQuickActionsToggle"[^>]*data-toggle="dropdown"/);
11+
assert.match(template, /id="note_quick_actions"[^>]*aria-labelledby="noteQuickActionsToggle"/);
12+
assert.match(template, /onclick="load_note_revisions\(\);return false;"[^>]*>.*Revision history/s);
13+
});

0 commit comments

Comments
 (0)