Skip to content

Release 2025-07-31 #25

Merged
merged 31 commits into from
Jul 31, 2025
Merged
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
23d7955
Add regex-report for regex matching highlights
ejunga Apr 21, 2025
d0a99bc
Add highlight toggle for block/text highlight
ejunga Apr 22, 2025
2f07ec3
Merge branch 'ECN:main' into regex-matching
ejunga Jun 2, 2025
a7d0d14
Update to match reports in new dashboard
ejunga Jun 2, 2025
115c470
Merge branch 'ECN:main' into highlight-toggle
ejunga Jun 2, 2025
c96357b
Fix text highlighting for tdx update
ejunga Jun 2, 2025
bf5c1c8
Merge branch 'ECN:main' into highlight-toggle
ejunga Jul 21, 2025
9ebdeb1
Merge branch 'ECN:main' into regex-matching
ejunga Jul 21, 2025
07c8e41
Add highlights.json
ejunga Jul 21, 2025
44427dd
Merge branch 'regex-matching' of https://github.itap.purdue.edu/ejung…
ejunga Jul 21, 2025
634dda5
Remove highlights.json
ejunga Jul 21, 2025
c41744e
Fix Responsibility highlights
ejunga Jul 21, 2025
72775e8
Remove debugging code
ejunga Jul 21, 2025
e196904
Fixed gradient color on horizontal overflow
ejunga Jul 21, 2025
3ffa664
Merge pull request #20 from ejunga/beta
ejunga Jul 22, 2025
d69020e
Update tdx-enhanced.js
ejunga Jul 22, 2025
815000b
Merge pull request #4 from ejunga/fix-table-overflow
ejunga Jul 22, 2025
2f557b9
Merge pull request #21 from ejunga/beta
ejunga Jul 22, 2025
8deb8d0
Update tdx-enhanced.js
ejunga Jul 22, 2025
6fc922b
Merge pull request #22 from ejunga/fix-responsibility-highlights
ejunga Jul 22, 2025
f84114b
bump version number
ejunga Jul 22, 2025
bca23e3
Merge pull request #23 from ejunga/regex-matching
ejunga Jul 22, 2025
d0f229a
Merge pull request #24 from ejunga/highlight-toggle
ejunga Jul 22, 2025
0dd7934
bump version number
ejunga Jul 22, 2025
0aa95d7
Fix discolored time/expenses dashboard
ejunga Jul 28, 2025
29e10bb
Fix "recently requested by" in ticket creation
ejunga Jul 28, 2025
4bd7c75
Fix new ticket page styles
ejunga Jul 28, 2025
f4b1980
Various color corrections
ejunga Jul 28, 2025
262a732
bumb version number
ejunga Jul 28, 2025
522109f
Get ready for release
ejunga Jul 29, 2025
2e41299
Fix 'CSS Support' highlighting
ejunga Jul 31, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
127 changes: 110 additions & 17 deletions tdx-enhanced.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name tdx-enhanced
// @namespace purdue-it
// @version 2025-07-21-01
// @version 2025-07-31-01
// @description enhanced tdx coloring & formatting. follows system color scheme.
// @author Purdue STEM IT - it@purdue.edu
// @match https://service.purdue.edu/TDWorkManagement*
Expand All @@ -12,8 +12,8 @@
// @match https://purdue.teamdynamixpreview.com/TDNext*
// @require https://momentjs.com/downloads/moment.min.js
// @require https://cdnjs.cloudflare.com/ajax/libs/tinycolor/1.6.0/tinycolor.min.js
// @downloadURL https://raw.github.itap.purdue.edu/ECN/tdx-userscript/main/tdx-enhanced.js
// @updateURL https://raw.github.itap.purdue.edu/ECN/tdx-userscript/main/tdx-enhanced.js
// @downloadURL https://raw.github.itap.purdue.edu/ECN/tdx-userscript/refs/heads/main/tdx-enhanced.js
// @updateURL https://raw.github.itap.purdue.edu/ECN/tdx-userscript/refs/heads/main/tdx-enhanced.js
// @grant GM_getResourceText
// @grant GM_addStyle
// @run-at document-end
Expand Down Expand Up @@ -826,9 +826,9 @@
//console.log("Parse item:",item)

//color queue names
if ('STEM Support' in item) {
let qCell = item["STEM Support"].cell
let qTxt = item["STEM Support"].txt.toLowerCase()
if ('CSS Support' in item) {
let qCell = item["CSS Support"].cell
let qTxt = item["CSS Support"].txt.toLowerCase()
if (qTxt in colorsByQueue) {
let q = colorsByQueue[qTxt]

Expand Down Expand Up @@ -912,8 +912,8 @@
}

//find internal users and highlight them
if ('ResponsibleFullName' in item) {
handleHighlight("person",item.ResponsibleFullName.txt,item.ResponsibleFullName.cell)
if ('Prim Resp' in item) {
handleHighlight("person",item['Prim Resp'].txt,item['Prim Resp'].cell)
} else if ('Responsibility' in item) {
handleHighlight("person",item.Responsibility.txt,item.Responsibility.cell)
}
Expand Down Expand Up @@ -1014,6 +1014,7 @@
}

function handleHighlight(type, txt, element) {
let behavior = settings('get','highlightBehavior')

var re
var style = null
Expand Down Expand Up @@ -1062,6 +1063,13 @@
}
}

if (type=="report" && customType=="report-regex") {
if ((new RegExp(customHighlight.value).exec(txt))) {
element.classList.add("reportTitle")
style = customHighlight.style
}
}

if (type=="person" && customType=="person") {
if (customHighlight.value==txt) {
element = createHighlightBubble(element)
Expand All @@ -1074,11 +1082,23 @@
//console.log("Apply custom highlight:",txt)

let link = element.querySelector("a")
if (re && link) {
let newTitle = re[1]
link.innerText = newTitle
//reset regex
re.lastIndex = 0
if (behavior==="block") {
if (re && link) {
let newTitle = re[1]
link.innerText = newTitle
//reset regex
re.lastIndex = 0
}
} else {
if (re && link) {
let text = link.innerText
link.innerText = ""
element = link.appendChild(document.createElement("span"))
element.innerText = text
element.style.lineHeight = "1.4"
//reset regex
re.lastIndex = 0
}
}

for (const [attr,val] of Object.entries(style)) {
Expand Down Expand Up @@ -1391,6 +1411,13 @@
<input type="radio" id="linkBehavior-tabs" name="linkBehavior" value="tabs">
<label for="linkBehavior-tabs">Tabs</label>
</div>
<div>
<h4>Highlight Behavior</h4>
<input type="radio" id="highlightBehavior-block" name="highlightBehavior" value="block">
<label for="highlightBehavior-block">Block</label><br>
<input type="radio" id="highlightBehavior-text" name="highlightBehavior" value="text">
<label for="highlightBehavior-block">Text</label><br>
</div>
</form>
</div>
Expand Down Expand Up @@ -1521,6 +1548,7 @@
data = {
colorMode: getColorMode(),
linkBehavior: "tabs",
highlightBehavior: "block",
customHighlights: [],
}
}
Expand Down Expand Up @@ -2645,6 +2673,33 @@ a:visited,
color: var(--col-400);
}
.tdworkmgmt.table-contents div.row > div > a {
color: var(--col-400);
}
.tdworkmgmt.table-striped > tbody > tr.tdx-grid__group-header > td, .tdworkmgmt.table-bordered > tbody > tr.tdx-grid__group-header > td {
background-color: var(--col-100);
}
.tdx-time-panel, .tdx-time-panel__heading {
color: var(--txt-1) !important;
background-color: var(--bg-1) !important;
border: 1px solid var(--border-0) !important;
}
.tdx-leftnav__badge {
color: var(--txt-1) !important;
background-color: var(--col-300) !important;
}
body .tdworkmgmt.table.table--vertical-lines > tbody > tr > td:not(:last-of-type) {
border-right: 1px solid var(--border-0);
}
.TDGroupingRow {
color: var(--txt-1);
}
a.disabledLink {
color: var(--txt-1) !important;
}
Expand Down Expand Up @@ -3167,6 +3222,10 @@ table.table {
color: var(--txt-2) !important;
}
.tdx-table-fade-right {
background: linear-gradient(to right,transparent,var(--bg-0)) !important;
}
thead, tbody, tfoot, tr, td, th {
border-color: var(--border-0);
}
Expand Down Expand Up @@ -3328,11 +3387,15 @@ button.k-pager-nav.k-button.k-button-flat.k-button-flat-base.k-icon-button.k-but
}
.k-window-titlebar {
background: var(--bg-0);
background-color: var(--bg-0) !important;
}
.k-window-content {
background-color: var(--bg-0) !important;
}
.k-window-title {
color: var(--col-500);
color: var(--col-500) !important;
}
.k-button .k-svg-i-window {
Expand Down Expand Up @@ -3392,6 +3455,11 @@ button.k-button.k-button-md.k-button-flat.k-button-flat-primary:hover {
background-color: var(--bg-5) !important;
}
.tdworkmgmt.table-header > div {
background-color: var(--bg-1);
color: var(--col-400);
}
/* Side Panels */
.tdx-right-side-panel {
Expand Down Expand Up @@ -3419,6 +3487,17 @@ button.k-button.k-button-md.k-button-flat.k-button-flat-primary:hover {
border-color: var(--col-500) !important;
}
.tdx-right-side-panel__home-button {
color: var(--col-400) !important;
border-color: var(--col-500) !important;
}
.tdx-right-side-panel__home-button:hover {
color: var(--col-200) !important;
border-color: var(--col-300) !important;
}
.tdx-leftnav-drag-handle {
background: linear-gradient(var(--col-400),var(--col-400)) no-repeat right/1px 10% !important;
}
Expand Down Expand Up @@ -3684,6 +3763,11 @@ body .tdworkmgmt.table>tbody>tr:not(.tdx-grid__group-header):not(.TDGridHeader):
color: var(--txt-1);
}
.list-group-item {
background-color: var(--bg-0);
border-color: var(--border-0);
}
/* Text Editor */
.cke_editable {
color: var(--txt-1);
Expand Down Expand Up @@ -3852,6 +3936,14 @@ div.profile-image.red-bg, div.profile-image.green-bg, div.profile-image.red-bg,
color: var(--col-400) !important;
}
.tdx-hover-darken {
color: var(--col-400);
}
.tdx-hover-darken:hover {
color: var(--col-300);
}
.form-group>a, .form-group>.checkbox>a, .disp-group>a, .form-group>.control-label>a, .checkbox>label>a {
color: var(--col-400) !important;
}
Expand All @@ -3876,7 +3968,8 @@ div.profile-image.red-bg, div.profile-image.green-bg, div.profile-image.red-bg,
.tdx-dropdown__menu-icon,
.tdx-dropdown--headline:after,
.tdx-dropdown:after,
.tdx-icon--search
.tdx-icon--search,
.k-icon
{
filter: brightness(0) invert(var(--filter-invert)) sepia(var(--filter-sepia)) saturate(var(--filter-saturate)) hue-rotate(var(--filter-hue-rotate)) brightness(var(--filter-brightness)) contrast(var(--filter-contrast));
}
Expand Down Expand Up @@ -3914,4 +4007,4 @@ div.select2-container-multi .select2-choices .select2-search-choice>.select2-sea
setCssFilters()
parseOtherElements()

})();
})();