diff.ui.js 930 B

1234567891011121314151617181920212223
  1. window.onRenderCell = function(result, {row, col})
  2. {
  3. if(col.name == 'baseline1')
  4. {
  5. if(row.data.baseline1 && !row.data.baseline2)
  6. {
  7. result[0].props.class += ' text-danger';
  8. result[0].props.style = {'text-decoration': 'line-through'};
  9. }
  10. if(row.data.baseline1 && row.data.baseline2 && row.data.baseline1 !== row.data.baseline2) result[0].props.class += ' text-warning';
  11. }
  12. if(col.name == 'baseline2')
  13. {
  14. if(row.data.baseline2 && !row.data.baseline1) result[0].props.class += ' text-success';
  15. if(row.data.baseline2 && row.data.baseline1 && row.data.baseline2 !== row.data.baseline1) result[0].props.class += ' text-warning';
  16. }
  17. return result;
  18. }
  19. window.showOnlyChanges = function(event)
  20. {
  21. loadPage($.createLink('cm', 'diff', 'projectID=' + projectID + '&baseline=' + baseline + '&onlyChanges=' + $(event.target).prop('checked')));
  22. }