From 49a374663f3c7b1093f48e1a1b352eb0bbc5f2b6 Mon Sep 17 00:00:00 2001 From: sunguangming Date: Mon, 16 Dec 2024 02:55:31 +0000 Subject: [PATCH] * [task#134397,doing,0.3h] add render cell. --- module/repo/js/linktask.ui.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/module/repo/js/linktask.ui.js b/module/repo/js/linktask.ui.js index f42d3c2661..b15013d48b 100644 --- a/module/repo/js/linktask.ui.js +++ b/module/repo/js/linktask.ui.js @@ -21,3 +21,30 @@ $(document).off('click','.dtable-footer .batch-btn-repo').on('click', '.dtable-f data: postData }); }); + +window.renderTaskCell = function(result, info) +{ + const task = info.row.data; + if(info.col.name == 'name' && result) + { + let html = ''; + if(task.mode) + { + html += "" + multipleAB + ""; + } + + if(task.isParent > 0) + { + html += "" + parentAB + ""; + } + else if(task.parent > 0) + { + html += "" + childrenAB + ""; + } + + if(task.color) result[0].props.style = 'color: ' + task.color; + if(html) result.unshift({html}); + } + + return result; +}