end_js.html 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <script src="/js/vendor/chart.min.js?<?=JS_LATEST_UPDATE?>"></script>
  2. <script src="/js/vendor/jquery.cookie.js?<?=JS_LATEST_UPDATE?>"></script>
  3. <script src="/js/vendor/jquery-ui.min.js?<?=JS_LATEST_UPDATE?>"></script>
  4. <script src="/js/vendor/jquery.finder.js?<?=JS_LATEST_UPDATE?>"></script>
  5. <script src="/js/hotkeys.js?<?=JS_LATEST_UPDATE?>"></script>
  6. <script src="/js/events.js?<?=JS_LATEST_UPDATE?>"></script>
  7. <script src="/js/app.js?<?=JS_LATEST_UPDATE?>"></script>
  8. <script src="/js/init.js?<?=JS_LATEST_UPDATE?>"></script>
  9. <script src="/js/i18n.js.php?<?=JS_LATEST_UPDATE?>"></script>
  10. <script src="/js/templates.js?<?=JS_LATEST_UPDATE?>"></script>
  11. <?php foreach(new DirectoryIterator($_SERVER['HESTIA'].'/web/js/custom_scripts') as $customScript){
  12. if($customScript->getExtension() === 'js'){
  13. echo '<script src="/js/custom_scripts/'.rawurlencode($customScript->getBasename()).'"></script>';
  14. } elseif($customScript->getExtension() === "php"){
  15. require_once($customScript->getPathname());
  16. }
  17. } ?>
  18. <script>
  19. $(function() {
  20. set_sticky_class();
  21. });
  22. </script>
  23. <?php
  24. if (!empty($_SESSION['error_msg'])):
  25. ?>
  26. <div>
  27. <script>
  28. $(function() {
  29. $('#dialog:ui-dialog').dialog('destroy');
  30. $('#dialog-message').dialog({
  31. modal: true,
  32. resizable: false,
  33. buttons: {
  34. Ok: function() {
  35. $(this).dialog('close');
  36. }
  37. },
  38. create: function() {
  39. var buttonGroup = $(this).closest(".ui-dialog").find('.ui-dialog-buttonset');
  40. buttonGroup.find('button:first').addClass('button submit')
  41. buttonGroup.find('button:last').addClass('button button-secondary cancel');
  42. }
  43. });
  44. });
  45. </script>
  46. <div id="dialog-message" title="">
  47. <p><?=htmlentities($_SESSION['error_msg'])?></p>
  48. </div>
  49. </div>
  50. <?php
  51. unset($_SESSION['error_msg']);
  52. endif;