templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <meta charset="UTF-8" />
  5.     <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
  6.     <title>Consentz</title>
  7.     <link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
  8.     {% block stylesheets %}
  9.     <!-- Stylesheets -->
  10.     <!-- Fonts -->
  11.     <link rel="stylesheet" href="{{ asset('remark/fonts/material-design/material-design.min.css') }}">
  12.     <link rel="stylesheet" href="{{ asset('remark/fonts/brand-icons/brand-icons.min.css') }}">
  13.     <link rel='stylesheet' href='https://fonts.googleapis.com/css?family=Roboto:300,400,500,300italic'>
  14.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
  15.     <link rel="stylesheet" href="{{ asset('css/libs.css') }}" />
  16.     <link rel="stylesheet" href="{{ asset('remark/css/bootstrap.min.css') }}">
  17.     <link rel="stylesheet" href="{{ asset('css/app.css') }}" />
  18.     <link rel="stylesheet" href="{{ asset('css/raty.css') }}" />
  19.     <link rel="stylesheet" href="{{ asset('remark/css/bootstrap-extend.min.css') }}">
  20.     <link rel="stylesheet" href="{{ asset('remark/css/site.min.css') }}">
  21.     <link rel="stylesheet" href="{{ asset('remark/css_vendor/bundle.css') }}">
  22.     <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropper/2.3.4/cropper.min.css">
  23.     <link href="{{asset('css/custom.css')}}" rel="stylesheet">
  24.     <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/sweetalert2@11.1.0/dist/sweetalert2.min.css">
  25.         <link href="https://cdnjs.cloudflare.com/ajax/libs/summernote/0.8.20/summernote-lite.min.css" rel="stylesheet">
  26.     {% endblock %}
  27.     {% block headerJavascripts %}
  28.     <!-- Scripts -->
  29.     <script src="{{ asset('remark/js_vendor/breakpoints.js') }}"></script>
  30.     <script src="{{ asset('js/html5sortable.js') }}"></script>
  31.     <script src="https://cdnjs.cloudflare.com/ajax/libs/cropperjs/0.8.1/cropper.min.js"></script>
  32.     <script>
  33.         Breakpoints();
  34.     </script>
  35.     {% endblock %}
  36. </head>
  37. <body
  38.     class="animsition site-navbar-small dashboard  app-calendar page-aside-left {{ bodyClasses is defined ? bodyClasses }}">
  39.     <div class="callIframe-w" id="callIframe"></div>
  40.     
  41.     <noscript>
  42.         <iframe src="//www.googletagmanager.com/ns.html?id=GTM-KR84K98" height="0" width="0" style="display:none;visibility:hidden"></iframe>
  43.     </noscript>
  44.     
  45.     {% block body %}
  46.     {% endblock %}
  47.     <div class="modal fade" id="common-modal" role="dialog" data-backdrop="static" aria-labelledby="exampleModalLabel"
  48.         aria-hidden="true">
  49.         <div class="modal-dialog modal-custom-all" role="document">
  50.             <div class="modal-content" id="common-modal-content">
  51.             </div>
  52.         </div>
  53.     </div>
  54. <div class="modal fade" id="common-modal-new" role="dialog" data-backdrop="static" aria-labelledby="exampleModalLabel"
  55.         aria-hidden="true">
  56.         <div class="modal-dialog" role="document">
  57.             <div class="modal-content" id="common-modal-new-content">
  58.             </div>
  59.         </div>
  60.     </div>
  61.     
  62.     <div class="modal fade" id="common-modal-new-lg" role="dialog" data-backdrop="static" aria-labelledby="exampleModalLabel"
  63.         aria-hidden="true">
  64.         <div class="modal-dialog  modal-lg" role="document">
  65.             <div class="modal-content" id="common-modal-new-lg-content">
  66.             </div>
  67.         </div>
  68.     </div>
  69.     
  70.     {% if app.user is defined  %}
  71.     <div class="modal bg-data-modal" id="ProfileMyImageForm">
  72.         <div class="modal-dialog">
  73.             <div class="modal-content">
  74.                 <!-- Modal Header -->
  75.                 <div class="modal-header">
  76.                     <h4 class="modal-title" style="display: contents;">Update Photo</h4>
  77.                     <button type="button" class="btn-close" data-dismiss="modal"></button>
  78.                 </div>
  79.                 <!-- Modal body -->
  80.                 <div class="modal-body">
  81.                     <form id="ProfileMyDataForm" action="{{ path('changeProfileImage') }}" method="post"
  82.                         class="form form-group">
  83.                         <input type="hidden" name="_token" value="{{csrf_token('token_id')}}">
  84.                         <input type="file" onchange="setCropFile(this.files[0],'profile-image-user')" accept="image/*"
  85.                             id="uploadProfileg" name="profile-image" class="form-control" style="display:none"><br>
  86.                         <div class="row">
  87.                             <div class="col-md-12 chose-btn">
  88.                                 <button type="button" onclick="document.getElementById('uploadProfileg').click()"
  89.                                     aria-hidden="true" class="btn btn-consentz-light">
  90.                                     <i class="fa fa-folder-open" aria-hidden="true"></i>
  91.                                     Choose Photo</button>
  92.                                 {% if app.user is defined and app.user.profileImg is defined and app.user.profileImg != ''  %}    
  93.                                 <button type="button" class="btn btn-consentz-light" onclick="removeProfileImg()"><i class="fa fa-trash" aria-hidden="true"></i>  Remove Photo</button>
  94.                                {% endif %}
  95.                             </div>
  96.                         </div>
  97.                         <div class="dimention">
  98.                             {% if app.user is defined and app.user.profileImg is defined and app.user.profileImg != ''  %}
  99.                             <img id="profile-image-user" class="imgfullwidth" src="{{ asset(app.user.profileImg) }}">
  100.                             {% else %}
  101.                             <img id="profile-image-user" class="imgfullwidth"
  102.                                 src="{{asset('images/Clinic/solid_gray.png') }}">
  103.                             {% endif %}
  104.                         </div>
  105.                     </form>
  106.                 </div>
  107.                 <!-- Modal body -->
  108.                 <!-- Modal footer -->
  109.                 <div class="modal-footer">
  110.                     <button type="button" class="btn btn-consentz-light upload-result"
  111.                         onclick="saveMyProfileData();">Save</button>
  112.                 </div>
  113.             </div>
  114.         </div>
  115.     </div>
  116.     <div class="modal fade pop-up" id="calling-modal" data-backdrop="static" tabindex="-1" role="dialog"
  117.         aria-labelledby="exampleModalLabel" aria-hidden="true" style="justify-content: center;">
  118.         <div class="modal-dialog" role="document">
  119.             <div class="modal-content">
  120.                 <div class="modal-header">
  121.                     <h5 class="modal-title" id="exampleModalLabel">Incoming Call Request</h5>
  122.                 </div>
  123.                 <div class="modal-body calling-modal-body" style="text-align: center;">
  124.                     <p class="text-center">You have call request from <span id="call-name"></span></p>
  125.                     <div class="avatar pulsenew" style="width: 70px;">
  126.                         <img id="call-image" src="/images/Clinic/solid_gray.png" class="card-img-top rounded-circle "
  127.                             alt="Image" >
  128.                     </div>
  129.                 </div>
  130.                 <div class="modal-footer text-center">
  131.                     <button type="button" class="btn btn-consentz-light  mt-15" onclick="chatApp.acceptCall();">Accept
  132.                     </button>
  133.                     <button type="button" class="btn btn-consentz-light rejectbtn" onclick="chatApp.rejectCall()"
  134.                         style="margin-top: 15px;">Reject
  135.                     </button>
  136.                 </div>
  137.                 </form>
  138.             </div>
  139.         </div>
  140.     </div>
  141.         <div class="floating-btn-msg " style="display:none">
  142.             <a href="/admin/message/index" class="icon-floating-msg">
  143.             <span class="totalmsgcount"></span>
  144.               <i class=" md-comment" aria-hidden="true"></i>
  145.             </a>
  146.        </div>
  147.     {% endif %}
  148.     {% block javascripts %}
  149.     <script type="text/javascript">
  150.         window.dataLayer = window.dataLayer || [];
  151.         dataLayer.push({
  152.             'user_status': "{{ app.user ? 'logged in' : 'not logged in' }}",
  153.             'clinic_id': 3
  154.         });
  155.         (function (w, d, s, l, i) {
  156.             w[l] = w[l] || [];
  157.             w[l].push({
  158.                 'gtm.start': new Date().getTime(),
  159.                 event: 'gtm.js'
  160.             });
  161.             var f = d.getElementsByTagName(s)[0],
  162.                 j = d.createElement(s),
  163.                 dl = l != 'dataLayer' ? '&l=' + l : '';
  164.             j.async = true;
  165.             j.src = '//www.googletagmanager.com/gtm.js?id=' + i + dl;
  166.             f.parentNode.insertBefore(j, f);
  167.         })(window, document, 'script', 'dataLayer', 'GTM-KR84K98');
  168.         var _gaq = _gaq || [];
  169.         _gaq.push(['_setAccount', 'UA-68725406-6']);
  170.         _gaq.push(['_trackPageview']);
  171.         (function () {
  172.             var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
  173.             ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
  174.             var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  175.         })();
  176.     </script>
  177.     <script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
  178.     <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
  179.     <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.1.0/dist/sweetalert2.all.min.js"></script>
  180.     <script src="{{ asset('js/bootstrap-app.js') }}"></script>
  181.     <script src="{{ asset('remark/js_vendor/bundle.min.js') }}"></script>
  182.     <script type="text/javascript" src="{{ asset('js/app.js') }}"></script>
  183.     <script type="text/javascript" src="{{ asset('js/validation.js') }}"></script>
  184.     <script type="text/javascript" src="{{ asset('js/helper.js') }}"></script>
  185.     <script type="text/javascript" src="{{ asset('js/menu-new.js') }}"></script>
  186.     <!-- Plugins -->
  187.     <script src="{{ asset('remark/js_vendor/bundle.js') }}"></script>
  188.     <!-- Scripts -->
  189.     <script src="{{ asset('remark/js/Component.js') }}"></script>
  190.     <script src="{{ asset('remark/js/Plugin.js') }}"></script>
  191.     <script src="{{ asset('remark/js/Base.js') }}"></script>
  192.     <script src="{{ asset('remark/js/Config.js') }}"></script>
  193.     <script src="{{ asset('js/remark/js/Section/Menubar.js') }}"></script>
  194.     <script src="{{ asset('remark/js/Section/Sidebar.js') }}"></script>
  195.     <script src="{{ asset('remark/js/Section/PageAside.js') }}"></script>
  196.     <script src="{{ asset('remark/js/Section/GridMenu.js') }}"></script>
  197.     <!-- Config -->
  198.     <script src="{{ asset('remark/js/config/colors.js') }}"></script>
  199.     <script src="{{ asset('remark/js/config/tour.js') }}"></script>
  200.     <script>Config.set('assets', '{{ asset('remark') }}');</script>
  201.     <!-- Page -->
  202.     <script src="{{ asset('remark/js/Site.js') }}"></script>
  203.     <script src="{{ asset('remark/js/Plugin/asscrollable.js') }}"></script>
  204.     <script src="{{ asset('remark/js/Plugin/slidepanel.js') }}"></script>
  205.     <script src="{{ asset('remark/js/Plugin/ascolorpicker.js') }}"></script>
  206.     <script src="{{ asset('remark/js/Plugin/switchery.js') }}"></script>
  207.     <script src="{{ asset('remark/js/Plugin/webui-popover.js') }}"></script>
  208.     <script src="{{ asset('remark/js/Plugin/matchheight.js') }}"></script>
  209.     <script src="{{ asset('remark/js/Plugin/jvectormap.js') }}"></script>
  210.     <script src="{{ asset('remark/js/Plugin/peity.js') }}"></script>
  211.     <script src="{{ asset('remark/js/Plugin/aspaginator.js') }}"></script>
  212.     <script src="{{ asset('remark/js/Plugin/responsive-tabs.js') }}"></script>
  213.     <script src="{{ asset('remark/js/Plugin/icheck.js') }}"></script>
  214.     <script src="{{ asset('remark/js/Plugin/jquery-knob.js') }}"></script>
  215.     <script src="{{ asset('remark/js/Plugin/dropify.js') }}"></script>
  216.    <script src="{{ asset('remark/examples/js/dashboard/v1.js') }}"></script> 
  217.     <script>
  218.         // var alanBtnInstance = alanBtn({
  219.         //   key: "4ced22a04b190dfb6c71b02f452d93fd2e956eca572e1d8b807a3e2338fdd0dc/stage",
  220.         //   onCommand: function (commandData, screen) {
  221.         //       console.log(' check-priyatoshsss ');
  222.         //       console.log(commandData);
  223.         //       console.log(' end-check-priyatoshsss ');
  224.         //     if (commandData.command === "go:back") {
  225.         //       //call client code that will react on the received command
  226.         //     }
  227.         //     if (commandData.command === 'Random') {
  228.         //       //console.log(commandData.random);
  229.         //       $.ajax({
  230.         //           type: "POST",
  231.         //           url: Routing.generate('add_random', {'randomId': commandData.random, 'clinicId': "3"}),
  232.         //       })
  233.         //     }
  234.         //     if (commandData.command === 'Hello') {
  235.         //       $.ajax({
  236.         //           type: "POST",
  237.         //           url: Routing.generate('add_question_random', {'randomId': commandData.random, 'question': 'hello|hi', 'clinicId': "3"}),
  238.         //       })
  239.         //     }
  240.         //     if (commandData.command === 'fixedQuestion') {
  241.         //       $.ajax({
  242.         //           type: "POST",
  243.         //           url: Routing.generate('add_question_random', {'randomId': commandData.random, 'question': commandData.question, 'clinicId': "3"}),
  244.         //       })
  245.         //     }
  246.         //     if (commandData.command === 'qtreatments') {
  247.         //       console.log(' dhnnd-ddd ');
  248.         //       $.ajax({
  249.         //           type: "POST",
  250.         //           url: Routing.generate('add_question_random', {'randomId': commandData.random, 'question': 'What are the treatments do you offer?', 'clinicId': "3"}),
  251.         //       })
  252.         //     }
  253.         //     if (commandData.command === 'atreatments') {
  254.         //       $.ajax({
  255.         //           type: "POST",
  256.         //           url: Routing.generate('add_question_random', {'randomId': commandData.random, 'question': commandData.answer, 'clinicId': "3"}),
  257.         //       })
  258.         //     }
  259.         //     if (commandData.command === 'qconsultation') {
  260.         //       $.ajax({
  261.         //           type: "POST",
  262.         //           url: Routing.generate('add_question_random', {'randomId': commandData.random, 'question': 'Would you like to book a consultation?', 'clinicId': "3"}),
  263.         //       })
  264.         //     }
  265.         //     if (commandData.command === 'aconsultation') {
  266.         //       $.ajax({
  267.         //           type: "POST",
  268.         //           url: Routing.generate('add_question_random', {'randomId': commandData.random, 'question': commandData.answer, 'clinicId':"3"}),
  269.         //       })
  270.         //     }
  271.         //     if (commandData.command === 'qwhichTreatment') {
  272.         //       $.ajax({
  273.         //           type: "POST",
  274.         //           url: Routing.generate('add_question_random', {'randomId': commandData.random, 'question': 'May I know for which treatments you want to consult?', 'clinicId': "3"}),
  275.         //       })
  276.         //     }
  277.         //     if (commandData.command === "Treatment") {
  278.         //          /*console.log('treatment');
  279.         //          console.log(commandData.screen);
  280.         //          console.log('treatment-');*/
  281.         //           $.ajax({
  282.         //               type: "POST",
  283.         //               url: Routing.generate('add_answer_random', {'randomId': commandData.random, 'answer': commandData.screen, 'type': 'treatment', 'clinicId': "3"}),
  284.         //           })
  285.         //     }
  286.         //     if (commandData.command === "Email") {
  287.         //          /*console.log('email');
  288.         //          console.log(commandData.screen);
  289.         //          console.log('emailss');*/
  290.         //           $.ajax({
  291.         //               type: "POST",
  292.         //               url: Routing.generate('add_answer_random', {'randomId': commandData.random, 'answer': commandData.screen, 'type': 'email', 'clinicId': "3"}),
  293.         //           })
  294.         //     }
  295.         //     if (commandData.command === "Number") {
  296.         //          // console.log('number');
  297.         //          // console.log(commandData.screen);
  298.         //          // console.log('numbers');
  299.         //           $.ajax({
  300.         //               type: "POST",
  301.         //               url: Routing.generate('add_answer_random', {'randomId': commandData.random, 'answer': commandData.screen, 'type': 'number', 'clinicId': "3"}),
  302.         //           })
  303.         //          //alanBtnInstance.deactivate();
  304.         //          //location.reload();
  305.         //
  306.         //     }
  307.         //     if (commandData.command === "Name") {
  308.         //          /*console.log('name');
  309.         //          console.log(commandData.screen);
  310.         //          console.log('name-');*/
  311.         //           $.ajax({
  312.         //               type: "POST",
  313.         //               url: Routing.generate('add_answer_random', {'randomId': commandData.random, 'answer': commandData.screen, 'type': 'name', 'clinicId': "3"}),
  314.         //           })
  315.         //     }
  316.         //   },
  317.         //   onButtonState: function (e) {
  318.         //       // console.log('button-states-p');
  319.         //       // console.info('onButtonState', e);
  320.         //       // console.log('button-states-e');
  321.         //   },
  322.         //   rootEl: document.getElementById("alan-btn"),
  323.         // });
  324.         var cropper = false;
  325.         $('#profileimgBtn').on('click', function () {
  326.             console.log('hello');
  327.             $('#ProfileMyImageForm').modal('show');
  328.         });
  329.         var proimage = document.querySelector('#profile-image');
  330.         var cropper = false;
  331.         function setCropper(target, cropData) {
  332.             console.log(target);
  333.             cropper = new Cropper(target, {
  334.                 aspectRatio: cropData.aspectRatio,
  335.                 cropBoxResizable: false,
  336.                 zoomable:cropData.zoomable,
  337.                 autoCropArea: 0.5,
  338.                 data: cropData.data,
  339.                
  340.             });
  341.             setTimeout(function(){
  342.             cropper.setCropBoxData({width:cropper.canvasData.width})
  343.             },1000)
  344.         }
  345.         function setCropFile(file, type = 'bgimage') {
  346.          if(file.size > 25*1024*1024){
  347.            Swal.fire({
  348.                         title: 'Error!',
  349.                         text: 'File not more than 25MB',
  350.                         icon: 'error',
  351.                     })
  352.             return false;
  353.          }
  354.             if (!file.type.startsWith('image/')) {
  355.                 Swal.fire({
  356.                     title: 'Error!',
  357.                     text: 'Only image files are allowed',
  358.                     icon: 'error',
  359.                 });
  360.                 return;
  361.             }
  362.             if (cropper) {
  363.                 cropper.destroy();
  364.                 cropper = false;
  365.             }
  366.             var bgimg = document.querySelector('#' + type);
  367.             var reader = new FileReader();
  368.             reader.onload = function (e) {
  369.                 bgimg.src = e.target.result;
  370.                 if (type == 'bgimage' || type == 'preview-banner-image') {
  371.                     var cropData = {
  372.                         aspectRatio: 960 / 310, data: {
  373.                             width: 6589.643478260869,
  374.                             height: 724.8607826086957,
  375.                         },
  376.                         cropBoxResizable: false,
  377.                        zoomable: true,
  378.                     };
  379.                 } else {
  380.                     var cropData = {
  381.                         aspectRatio: 1, data: {
  382.                             width: 400,
  383.                             height: 400,
  384.                         },
  385.                         zoomable: false,
  386.                     };
  387.                 }
  388.                 setCropper(bgimg, cropData);
  389.             }
  390.             reader.readAsDataURL(file);
  391.         }
  392.         function saveMyProfileData() {
  393.             urltoFile(
  394.             cropper.getCroppedCanvas({ width: 400, height: 400 }).toDataURL(),
  395.             "image.png",
  396.             "image/png"
  397.         ).then(function (file) {
  398.             var formData = new FormData($('#ProfileMyDataForm')[0]);
  399.             formData.append("file", file);
  400.             showSpinner();
  401.             $.ajax({
  402.                 url: $('#ProfileMyDataForm').attr('action'),
  403.                 method: 'POST',
  404.                 data: formData,
  405.                 dataType:'json',
  406.                 processData: false,
  407.                 contentType: false,
  408.                 success: function (response) {
  409.                     hideSpinner();
  410.                       $('#uploadProfileg').val('');
  411.                     if(response.status == 'success'){
  412.                     $('.avatar-online').html('<img src="'+response.data.url+'">')
  413.                     $('#ProfileMyImageForm').modal('hide');
  414.                      $('#ProfileMyImageForm').find('.chose-btn').html(` <button type="button" onclick="document.getElementById('uploadProfileg').click()"
  415.                                     aria-hidden="true" class="btn btn-consentz-light">
  416.                                     <i class="fa fa-folder-open" aria-hidden="true"></i>
  417.                                     Choose Profile</button> <button type="button" class="btn btn-primary waves-effect waves-classic" onclick="removeProfileImg()"><i class="fa fa-trash" aria-hidden="true"></i>  Remove Profile</button>`);
  418.                      cropper.destroy();
  419.                     Swal.fire({
  420.                         title: 'Success!',
  421.                         text: 'Uploaded successfully',
  422.                         icon: 'success',
  423.                     })
  424.                     }else{
  425.                          Swal.fire({
  426.                         title: 'Error!',
  427.                         text: response.message,
  428.                         icon: 'error',
  429.                     })
  430.                     } 
  431.                     
  432.                     
  433.                     //location.reload();
  434.                 },
  435.                 error: function (xhr, status, error) {
  436.                     Swal.fire({
  437.                         title: 'Error!',
  438.                         text: 'Something went wrong.',
  439.                         icon: 'error',
  440.                     })
  441.                     console.error(error);
  442.                 }
  443.             });
  444.             })
  445.         }
  446.          function removeProfileImg(){
  447.             showSpinner();
  448.                $.ajax({
  449.                 url: '/admin/remove-profile-user',
  450.                 method: 'POST',
  451.                 data: {_token:CSRF_TOKEN},
  452.                 dataType:'json',
  453.                 success: function (response) {
  454.                     hideSpinner();
  455.                     if(response.status == 'success'){
  456.                     $('.avatar-online').html('<img src="/images/Clinic/solid_gray.png">');
  457.                     $('#profile-image-user').attr('src','/images/Clinic/solid_gray.png');
  458.                     $('#ProfileMyImageForm').modal('hide');
  459.                     $('#ProfileMyImageForm').find('.chose-btn').html(` <button type="button" onclick="document.getElementById('uploadProfileg').click()"
  460.                                     aria-hidden="true" class="btn btn-consentz-light">
  461.                                     <i class="fa fa-folder-open" aria-hidden="true"></i>
  462.                                     Choose Profile</button> `);
  463.                     Swal.fire({
  464.                         title: 'Success!',
  465.                         text: 'Profile removed successfully',
  466.                         icon: 'success',
  467.                     });
  468.                     //location.reload();
  469.                         $('.dimention').html('<img id="profile-image-user" class="imgfullwidth" src="/images/Clinic/solid_gray.png">');
  470.                        $('.modal .chose-btn button:eq(1)').hide();
  471.                     }else{
  472.                       Swal.fire('Error',response.message,'warning');
  473.                     }
  474.                 },
  475.                 error: function (xhr, status, error) {
  476.                     Swal.fire({
  477.                         title: 'Error!',
  478.                         text: 'Something went wrong.',
  479.                         icon: 'error',
  480.                     })
  481.                     console.error(error);
  482.                 }
  483.             });
  484.         }
  485.         
  486.         function urltoFile(url, filename, mimeType) {
  487.         return fetch(url)
  488.             .then(function (res) {
  489.                 return res.arrayBuffer();
  490.             })
  491.             .then(function (buf) {
  492.                 return new File([buf], filename, { type: mimeType });
  493.             });
  494.     }
  495.     </script>
  496.   <script>
  497.     $chat = $("#conv-block");
  498. $profile = $(".user-profile");
  499. const smallDevice = window.matchMedia("(max-width: 991px)");
  500. const largeScreen = window.matchMedia("(max-width: 1199px)");
  501. smallDevice.addEventListener("change", handleDeviceChange);
  502. largeScreen.addEventListener("change", handleLargeScreenChange);
  503. handleDeviceChange(smallDevice);
  504. handleLargeScreenChange(largeScreen);
  505. function handleDeviceChange(e) {
  506.   if (e.matches) chatMobile();
  507.   else chatDesktop();
  508. }
  509. function handleLargeScreenChange(e) {
  510.   if (e.matches) profileToogleOnLarge();
  511.   else profileExtraLarge();
  512. }
  513. function chatMobile() {
  514.   $chat.addClass("chat--mobile");
  515.   $chat.addClass("chat--show");
  516.   $chat.hide();
  517. }
  518. function chatDesktop() {
  519.   $chat.removeClass("chat--mobile");
  520. }
  521. function profileToogleOnLarge() {
  522.   $profile.addClass("user-profile--large");
  523. }
  524. function profileExtraLarge() {
  525.   $profile.removeClass("user-profile--large");
  526. }
  527. $(".messaging-member").click(function () {
  528.   $chat.fadeIn();
  529.   $chat.addClass("chat--show");
  530. });
  531. $(".chat__previous").click(function () {
  532.   $chat.removeClass("chat--show");
  533. });
  534. $(".chat__details").click(function () {
  535.   $profile.fadeIn();
  536.   $profile.addClass("user-profile--show");
  537. });
  538. $(".user-profile__close").click(function () {
  539.   $profile.removeClass("user-profile--show");
  540. });
  541. </script>
  542.     {% endblock %}
  543.     <div class="alan-btn"></div>
  544.     <div id="movies">
  545.     </div>
  546.         <style>
  547.     .loader-overlay{
  548.        display: none !important;
  549.     }
  550.     </style>
  551.     <div id="global-spinner-wrap">
  552.         <div class="sk-three-bounce">
  553.             <div class="sk-child sk-bounce1"></div>
  554.             <div class="sk-child sk-bounce2"></div>
  555.             <div class="sk-child sk-bounce3"></div>
  556.         </div>
  557.     </div>
  558. </body>
  559. </html>