linkbug.ui.js 722 B

1234567891011121314151617181920212223
  1. window.createSortLink = function(col)
  2. {
  3. var sort = col.name + '_asc';
  4. if(sort == orderBy) sort = col.name + '_desc';
  5. return "javascript:loadModal('" + sortLink.replace('{orderBy}', sort) + "', '#table-repo-linkbug')";
  6. }
  7. $(document).off('click','.dtable-footer .batch-btn-repo').on('click', '.dtable-footer .batch-btn-repo', function(e)
  8. {
  9. const dtable = zui.DTable.query(e.target);
  10. const checkedList = dtable.$.getChecks();
  11. if(!checkedList.length) return;
  12. const tabType = $(this).data('type');
  13. const postData = new FormData();
  14. checkedList.forEach((id) => postData.append(`${tabType}[]`, id));
  15. $.ajaxSubmit({
  16. url: $(this).data('url'),
  17. data: postData
  18. });
  19. });