| 1234567891011121314151617181920212223242526272829303132333435363738 |
- window.renderCell = function(result, info)
- {
- if(info.col.name == 'title' && result)
- {
- const story = info.row.data;
- let html = '';
- let gradeLabel = '';
- const gradeMap = gradeGroup[story.type] || {};
- gradeLabel = gradeMap[story.grade];
- if(gradeLabel) html += "<span class='label gray-pale rounded-xl clip'>" + gradeLabel + "</span> ";
- if(story.color) result[0].props.style = 'color: ' + story.color;
- if(html) result.unshift({html});
- }
- if(info.col.name == 'status' && result)
- {
- result[0] = {html: `<span class='status-${info.row.data.rawStatus}'>` + info.row.data.status + "</span>"};
- }
- if(info.col.name == 'assignedTo' && info.row.data.status == 'closed')
- {
- delete result[0]['props']['data-toggle'];
- delete result[0]['props']['href'];
- result[0]['props']['className'] += ' disabled';
- }
- return result;
- };
- window.firstRendered = false;
- window.toggleCheckRows = function(idList)
- {
- if(!idList?.length || firstRendered) return;
- firstRendered = true;
- const dtable = zui.DTable.query($('#projectStories'));
- dtable.$.toggleCheckRows(idList.split(','), true);
- }
|