bottom.blade.php 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <script src="{{asset('web/js/bootstrap.bundle.min.js')}}"></script>
  2. <!-- tobii js -->
  3. <script src="{{asset('web/js/tobii.min.js')}}"></script>
  4. <!-- SLIDER -->
  5. <script src="{{asset('web/js/tiny-slider.js')}}"></script>
  6. <!-- Icons -->
  7. <script src="{{asset('web/js/feather.min.js')}}"></script>
  8. <!-- Main Js -->
  9. <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.slim.min.js"></script>
  10. <script src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"></script>
  11. <script src="https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/11.6.15/sweetalert2.min.js"></script>
  12. <script src="{{asset('web/js/plugins.init.js')}}"></script>
  13. <script src="{{asset('web/js/app.js')}}"></script>
  14. <script src="{{asset('web/js/datepicker.min.js')}}"></script>
  15. <script src="{{asset('web/js/bootstrap.bundle.min.js')}}"></script>
  16. <script src="{{asset('web/js/plugins.init.js')}}"></script>
  17. <script src="{{asset('web/js/app.js')}}"></script>
  18. <script src="{{asset('web/css/sweetalert/sweetalert.min.js')}}"></script>
  19. {{-- <script src="https://code.jquery.com/jquery-3.1.1.min.js"></script> --}}
  20. {{-- Ajax Form Submit --}}
  21. <script src="{{ asset('css/jquery.min.js') }}"></script>
  22. <script src="{{ asset('css/jquery-form/dist/jquery.form.min.js') }}"></script>
  23. <script src="{{ asset('css/noty/lib/noty.min.js') }}"></script>
  24. <script src="{{ asset('css/flatpickr/dist/flatpickr.min.js') }}"></script>
  25. <script src="{{ asset('css/wait-me/waitMe.min.js')}}"></script>
  26. <script src="{{ asset('css/clipboard/dist/clipboard.min.js')}}"></script>
  27. <script>
  28. function fetch_sub_content(selector, url, args=null){
  29. var config={
  30. spinner: true
  31. }
  32. if(typeof args=='object'){
  33. config=Object.assign(config, args);
  34. }
  35. if(config.spinner){
  36. $(selector).waitMe({
  37. effect: 'facebook',
  38. text: 'Please! Wait ...'
  39. });
  40. }
  41. $(selector).load(url, null, function(){
  42. $(selector).waitMe('hide');
  43. if(typeof args=='function') args();
  44. });
  45. }
  46. function wait_me(selector, config=null){
  47. if(config){
  48. selector.waitMe(config);
  49. }else{
  50. selector.waitMe({
  51. effect: 'facebook',
  52. //color: '#000',
  53. text: 'Please! Wait ...'
  54. });
  55. }
  56. }
  57. function pop_up_msg(msg='No message specified', type='success', callback=null){
  58. new Noty({
  59. theme:'sunset',
  60. text: msg,
  61. type: type,
  62. timeout:1500,
  63. callbacks:{
  64. afterClose: callback
  65. }
  66. }).show();
  67. }
  68. function err_msg(err){
  69. var msg="Request failed to process, try again later.";
  70. if(err.responseJSON && err.responseJSON.msg){
  71. msg=err.responseJSON.msg;
  72. }
  73. return msg;
  74. }
  75. function ajax_form(form, cllback=null, config={spinner: true}){
  76. $('.btn-submit').prop('disabled', true);
  77. var redirect=$(form).data('redirect');
  78. if(typeof config=='object'){
  79. if(config.spinner) wait_me($(form));
  80. }
  81. $(form).ajaxSubmit({
  82. success:function(res){
  83. wait_me($(form), 'hide');
  84. if(res.msg){
  85. pop_up_msg(res.msg, 'success', function(){
  86. $('.btn-submit').prop('disabled', false);
  87. if(redirect) window.location.replace(redirect);
  88. else if(typeof cllback=='function'){
  89. cllback(form, res);
  90. }
  91. });
  92. }
  93. //$.notify(res.msg, 'success');
  94. },
  95. error:function(res){
  96. wait_me($(form), 'hide');
  97. var msg="Request failed to process, try again later.";
  98. if(res.responseJSON && res.responseJSON.msg){
  99. msg=res.responseJSON.msg;
  100. }
  101. pop_up_msg(msg, 'error');
  102. $('.btn-submit').prop('disabled', false);
  103. }
  104. });
  105. } //End of ajax form definition
  106. // let answer = document.getElementById("interest").contentEditable;
  107. // document.getElementById("demo").innerHTML = answer;
  108. </script>
  109. @stack('js')