-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathcolumn-images.js
More file actions
27 lines (24 loc) · 807 Bytes
/
column-images.js
File metadata and controls
27 lines (24 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
var imgs = {
"To do": "domain.kanbantool.com/system/attachments/......",
"In Progress": "domain.kanbantool.com/system/attachments/......",
"Done": "domain.kanbantool.com/system/attachments/......"
}
$('kt-board thead tr th').click(function() {
var thWs = $( this );
thWs.find('img').toggle();
})
for(var [key, value] of Object.entries(imgs) ) {
var ws = KT.boards.first().get('workflow_stages').filter((ws) => ws.full_name == key)[0];
if (!ws) {
ws = KT.boards.first().get('workflow_stages').filter((ws) => ws.name == key)[0];
}
if (ws) {
var wsId = ws.id;
var thWs = $("th[data-stage-id='" + wsId + "']");
var img = $('<img>',{id:'theImg',src:value}).css("maxWidth", "176px");
thWs.append(img);
if (thWs.hasClass('kt-collapsed')) {
img.hide();
}
}
}