batchedit.ui.js 802 B

12345678910111213141516171819202122232425262728
  1. $(function()
  2. {
  3. $('#mainNavbar .nav .nav-item').find("[href$='feedback']").addClass('active');
  4. });
  5. window.renderRowData = function($row, index, row)
  6. {
  7. if(modules[row.product] != undefined)
  8. {
  9. $row.find('[data-name="module"]').find('.picker-box').on('inited', function(e, info)
  10. {
  11. let $module = info[0];
  12. let items = modules[row.product];
  13. $module.render({items});
  14. });
  15. }
  16. }
  17. window.changeProduct = function(event)
  18. {
  19. const $target = $(event.target);
  20. const $currentRow = $target.closest('tr');
  21. const product = $target.val();
  22. let items = modules[product];
  23. $currentRow.find('[name^=module]').zui('picker').render({items});
  24. $currentRow.find('[name^=module]').zui('picker').$.changeState({value: 0});
  25. }