browse.ui.js 796 B

123456789101112131415161718192021222324252627282930313233343536
  1. var checkedCategories = {};
  2. /**
  3. * 安装应用。
  4. * Install app.
  5. */
  6. window.installApp = function()
  7. {
  8. var confirm = $(this).data('confirm');
  9. if(confirm)
  10. {
  11. zui.Modal.confirm(confirm).then(result =>
  12. {
  13. if(!result) return;
  14. zui.Modal.open({
  15. url: $(this).data('url'),
  16. id: 'installModal'
  17. });
  18. });
  19. return;
  20. }
  21. zui.Modal.open({
  22. url: $(this).data('url'),
  23. id: 'installModal'
  24. });
  25. }
  26. window.searchApp = function(event)
  27. {
  28. if (event.key === 'Enter')
  29. {
  30. const keyword = $('#searchName').val();
  31. loadPage($.createLink('store', 'browse', `sortType=${sortType}&categoryID=${currentCategoryID}&keyword=${keyword}`));
  32. }
  33. }