showimport.ui.js 819 B

123456789101112131415161718192021222324252627
  1. window.handleRenderRow = function($row, index, row)
  2. {
  3. if(!row.new)
  4. {
  5. $row.find('td[data-name=id_static]').append("<input class='hidden' type='text' name='id[" + row.id + "]' value='" + row.id + "'/>");
  6. }
  7. else
  8. {
  9. $row.find('td[data-name=id_static]').html(row.id + "<sup class='text-success small'>" + newTestcase + "</sup>")
  10. }
  11. }
  12. function computeImportTimes()
  13. {
  14. if(parseInt($(this).val()))
  15. {
  16. $('#times').html(Math.ceil(parseInt($("#totalAmount").html()) / parseInt($(this).val())));
  17. }
  18. }
  19. function importNextPage()
  20. {
  21. let pageID = $('#pageID').val();
  22. if(typeof pageID == 'undefined' || pageID == '') pageID = 1;
  23. return loadPage($.createLink('caselib', 'showImport', "libID=" + libID + "&pageID=" + pageID + '&maxImport=' + $('#maxImport').val()));
  24. }