bottom.blade.php 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229
  1. @stack('scripts')
  2. <script src="{{asset('web/js/bootstrap.bundle.min.js')}}"></script>
  3. <!-- tobii js -->
  4. <script src="{{asset('web/js/tobii.min.js')}}"></script>
  5. <!-- SLIDER -->
  6. <script src="{{asset('web/js/tiny-slider.js')}}"></script>
  7. <!-- Icons -->
  8. <script src="{{asset('web/js/feather.min.js')}}"></script>
  9. <!-- Main Js -->
  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>
  27. function fetch_sub_content(selector, url, args=null){
  28. var config={
  29. spinner: true
  30. }
  31. if(typeof args=='object'){
  32. config=Object.assign(config, args);
  33. }
  34. if(config.spinner){
  35. $(selector).waitMe({
  36. effect: 'facebook',
  37. text: 'Please! Wait ...'
  38. });
  39. }
  40. $(selector).load(url, null, function(){
  41. $(selector).waitMe('hide');
  42. if(typeof args=='function') args();
  43. });
  44. }
  45. function wait_me(selector, config=null){
  46. if(config){
  47. selector.waitMe(config);
  48. }else{
  49. selector.waitMe({
  50. effect: 'facebook',
  51. //color: '#000',
  52. text: 'Please! Wait ...'
  53. });
  54. }
  55. }
  56. function pop_up_msg(msg='No message specified', type='success', callback=null){
  57. new Noty({
  58. theme:'sunset',
  59. text: msg,
  60. type: type,
  61. timeout:1500,
  62. callbacks:{
  63. afterClose: callback
  64. }
  65. }).show();
  66. }
  67. function err_msg(err){
  68. var msg="Request failed to process, try again later.";
  69. if(err.responseJSON && err.responseJSON.msg){
  70. msg=err.responseJSON.msg;
  71. }
  72. return msg;
  73. }
  74. function pop_up_error_msg(msg='No message specified', type='error', callback=null){
  75. new Noty({
  76. theme:'sunset',
  77. text: msg,
  78. type: type,
  79. timeout:1500,
  80. callbacks:{
  81. afterClose: callback
  82. }
  83. }).show();
  84. }
  85. function ajax_form(form, cllback=null, config={spinner: true}){
  86. $('.btn-submit').prop('disabled', true);
  87. var redirect=$(form).data('redirect');
  88. if(typeof config=='object'){
  89. if(config.spinner) wait_me($(form));
  90. }
  91. $(form).ajaxSubmit({
  92. success:function(res){
  93. wait_me($(form), 'hide');
  94. if(res.msg){
  95. pop_up_msg(res.msg, 'success', function(){
  96. $('.btn-submit').prop('disabled', false);
  97. if(redirect) window.location.replace(redirect);
  98. else if(typeof cllback=='function'){
  99. cllback(form, res);
  100. }
  101. });
  102. }
  103. //$.notify(res.msg, 'success');
  104. },
  105. error:function(res){
  106. wait_me($(form), 'hide');
  107. var msg="Request failed to process, try again later.";
  108. if(res.responseJSON && res.responseJSON.msg){
  109. msg=res.responseJSON.msg;
  110. }
  111. pop_up_msg(msg, 'error');
  112. $('.btn-submit').prop('disabled', false);
  113. }
  114. });
  115. } //End of ajax form definition
  116. @if(Auth::user()->is_test_score == 1)
  117. $(document).ready(function(){
  118. $('#add_test_div').show();
  119. });
  120. @endif
  121. // $('.dob').datepicker({
  122. // dateFormat: 'yy-mm-dd',
  123. // });
  124. function changeTestName(name){
  125. $("#testname").attr("placeholder", name);
  126. }
  127. function checkCurrentlyWorking(value){
  128. if(value.checked){
  129. $("#end_date_div").hide();
  130. } else{
  131. $("#end_date_div").show();
  132. }
  133. }
  134. // function checkWorkExperience(value){
  135. // $.ajax({
  136. // type:'get',
  137. // url:"{{ url('change_work_experience') }}/"+value,
  138. // success:function(data) {
  139. // $("#msg").html(data.msg);
  140. // }
  141. // });
  142. // if(value=='1'){
  143. // $("#add_div").show();
  144. // } else{
  145. // $("#add_div").hide();
  146. // }
  147. // }
  148. function checkTestScore(value){
  149. if(value=='yes'){
  150. $("#add_test_div").show();
  151. } else{
  152. $("#add_test_div").hide();
  153. }
  154. }
  155. function checkTestScore(value){
  156. $.ajax({
  157. type:'get',
  158. url:"{{ url('change_test_score') }}/"+value,
  159. success:function(data) {
  160. $("#msg").html(data.msg);
  161. }
  162. });
  163. if(value=='1'){
  164. $("#add_test_div").show();
  165. } else{
  166. $("#add_test_div").hide();
  167. }
  168. }
  169. </script>
  170. @stack('js')