batchedit.ui.js 906 B

1234567891011121314151617181920212223242526272829303132
  1. $(function()
  2. {
  3. if(batchEditTip != '') zui.Modal.alert(batchEditTip);
  4. });
  5. window.renderRowData = function($row, index, row)
  6. {
  7. /* Show the modules of current ticket's product. */
  8. if(modules[row.product] != undefined && modules[row.product] != undefined)
  9. {
  10. $row.find('[data-name="module"]').find('.picker-box').on('inited', function(e, info)
  11. {
  12. let bugModules = modules[row.product];
  13. let $module = info[0];
  14. $module.render({items: bugModules});
  15. });
  16. }
  17. }
  18. /**
  19. * Change module by product id
  20. *
  21. * @param object event
  22. */
  23. function changeModule(event)
  24. {
  25. const $target = $(event.target);
  26. const $currentRow = $target.closest('tr');
  27. const productID = $target.val();
  28. const $modulePicker = $currentRow.find('[name^="module"]').zui('picker');
  29. $modulePicker.render({items: modules[productID]});
  30. }