story.ui.js 475 B

1234567891011121314151617
  1. window.renderCell = function(result, info)
  2. {
  3. if(info.col.name == 'title' && result)
  4. {
  5. let html = '';
  6. let gradeLabel = '';
  7. const story = info.row.data;
  8. const gradeMap = gradeGroup[story.type] || {};
  9. gradeLabel = gradeMap[story.grade];
  10. html += "<span class='label gray-pale rounded-xl clip'>" + gradeLabel + "</span> ";
  11. if(html) result.unshift({html});
  12. }
  13. return result;
  14. }