You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.1 KiB

  1. "use strict";
  2. jQuery( document ).ready(function( $ ) {
  3. // ====================================
  4. // Scroll
  5. // ====================================
  6. $('a').smoothScroll({
  7. speed: 400,
  8. offset: -70
  9. });
  10. var sticky = new Sticky('.stickyscroll');
  11. // ====================================
  12. // Notifications
  13. // ====================================
  14. $(window).bind('beforeunload', () => {
  15. $('#notifload').addClass('active');
  16. });
  17. $(document).ajaxSend(() => {
  18. $('#notifload').addClass('active');
  19. }).ajaxComplete(() => {
  20. $('#notifload').removeClass('active');
  21. });
  22. var alerts = new Alerts();
  23. if(alertsData) {
  24. _.forEach(alertsData, (alertRow) => {
  25. alerts.push(alertRow);
  26. });
  27. }
  28. // ====================================
  29. // Establish WebSocket connection
  30. // ====================================
  31. var socket = io(ioHost);
  32. //=include components/search.js
  33. // ====================================
  34. // Pages logic
  35. // ====================================
  36. //=include pages/view.js
  37. //=include pages/create.js
  38. //=include pages/edit.js
  39. //=include pages/source.js
  40. });
  41. //=include helpers/form.js
  42. //=include helpers/pages.js
  43. //=include components/alerts.js