browse.ui.js 825 B

123456789101112131415161718192021222324252627282930
  1. /**
  2. * 根据状态变更操作按钮的语言项。
  3. * Change recall btn lang of object status.
  4. *
  5. * @param object result
  6. * @param object info
  7. * @access public
  8. * @return object
  9. */
  10. window.onRenderCell = function(result, {row, col})
  11. {
  12. if(col.name == 'actions')
  13. {
  14. for(index in row.data.actions)
  15. {
  16. if(row.data.actions[index].name == 'recall') row.data.actions[index].hint = (row.data.status == 'changing' ? recallChange : recall);
  17. }
  18. }
  19. if(col.name == 'title' && result)
  20. {
  21. if(row.data.color) result[0].props.style = 'color: ' + row.data.color;
  22. if(row.data.parent > 0)
  23. {
  24. let html = "<span class='label gray-pale rounded-xl clip'>" + childrenAB + "</span> ";
  25. result.unshift({html});
  26. }
  27. }
  28. return result;
  29. }