huai-sian 3 lat temu
rodzic
commit
19d003b404

+ 1 - 1
html/index_eng.html

@@ -35,7 +35,7 @@
   <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5M8S4GH"
   height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
   <!-- End Google Tag Manager (noscript) -->
-
+  <div class="loading"></div>
   <div class="card2">
     <img class="profile-bgimg img-fluid" src="./static/img/nav-bg.png" class="card-img" alt="...">
     <img class="profile-bgimg-m img-fluid" src="./static/img/userprofile/banner-m.png" class="card-img" alt="...">

+ 1 - 1
html/make_video2.html

@@ -40,6 +40,7 @@
 
     <!-- ================================================================= -->
     <!-- navbar -->
+    <div class="loading"></div>
     <div class="card2">
         <img class="profile-bgimg img-fluid" src="./static/img/nav-bg.png" class="card-img" alt="...">
         <img class="profile-bgimg-m img-fluid" src="./static/img/userprofile/banner-m.png" class="card-img"
@@ -625,7 +626,6 @@
     <script src="https://cdn.jsdelivr.net/npm/@popperjs/core@2.9.2/dist/umd/popper.min.js" integrity="sha384-IQsoLXl5PILFhosVNubq5LC7Qb9DXgDA9i+tQ8Zj3iwWAwPtgFTxbJ8NT4GN1R8p" crossorigin="anonymous"></script>
     <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/js/bootstrap.min.js" integrity="sha384-Atwg2Pkwv9vp0ygtn1JAojH0nYbwNJLPhwyoVbhoPwBhjQPR5VtM2+xf0Uwh9KtT" crossorigin="anonymous"></script> 
     <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.0.18/dist/sweetalert2.all.min.js"></script>
-    <script src="static/owl.carousel.min.js"></script>
     <script src="static/loading-overlay.js"></script>
     <script type="text/javascript" src="static/lan.js"></script>
     <script src="static/script_util2.js"></script>

+ 6 - 1
html/script_eng.js

@@ -2,6 +2,7 @@ checkRoute();
 
 let userBasics = JSON.parse(localStorage.getItem('user_profile')) || [];
 
+$('.loading').hide();
 
   //userBasics = JSON.parse(userBasics);
 if(userBasics.length > 0 || typeof(userBasics) !== 'string'){
@@ -279,8 +280,9 @@ function deleteDraft(id) {
   });
 }
 
-// Upload
+// Make eng video
 $(".next").click(function () {
+  $('.loading').show();
   button.setAttribute('disabled', '');
   setTimeout(function () {
     button.removeAttribute('disabled')
@@ -320,6 +322,7 @@ $(".next").click(function () {
   xhr.setRequestHeader("Content-Type", "application/json");
   xhr.onreadystatechange = function () {
     if (xhr.readyState === 4) {
+      $('.loading').hide();
       responseOBJ = JSON.parse(xhr.responseText);
       console.log(responseOBJ);
         Swal.fire({
@@ -327,6 +330,8 @@ $(".next").click(function () {
           text: responseOBJ.msg.eng,
           confirmButtonColor: '#3085d6',
       });
+    } else {
+      $('.loading').hide();
     }
   };
   var data = renderXHR_data(dataOBJ)

+ 5 - 2
html/script_profile.js

@@ -6,6 +6,8 @@ let lan = localStorage.getItem('lan');
 let defaultLength = 5;
 let historyData;
 
+$('.loading').hide();
+
 function getCookie(name) {
     const value = `; ${document.cookie}`;
     const parts = value.split(`; ${name}=`);
@@ -45,6 +47,7 @@ checkLan();
 
 
 function renderView() {
+  $('.loading').show();
     let token = getCookie('jwt_token');
     if(!token) {
         window.location.replace("login.html");
@@ -170,9 +173,9 @@ function renderView() {
         $('.card-profile').html(str);
         $('.card-profile').html(str);
 
-        JsLoadingOverlay.hide();
+        $('.loading').hide();
     }).catch(err => {
-        JsLoadingOverlay.hide();
+      $('.loading').hide();
         console.log(err);
         //window.location.replace("login.html");
     })

+ 6 - 2
html/static/script_util2.js

@@ -1,7 +1,7 @@
 // Check Route
  checkRoute();
 // let card;
-
+$('.loading').hide();
 let userBasics = JSON.parse(localStorage.getItem('user_profile')) || [];
 
 console.log(userBasics);
@@ -351,7 +351,8 @@ $(".next").click(function () {
   setTimeout(function () {
     button.removeAttribute('disabled')
   }, 15000);
-  console.log('submit');
+
+  $('.loading').show();
 
   var Avatar_value 
   var Avatar_value2
@@ -403,6 +404,7 @@ $(".next").click(function () {
     if (xhr.readyState === 4) {
       responseOBJ = JSON.parse(xhr.responseText)
       console.log(responseOBJ.msg);
+      $('.loading').hide();
         //let title = "資料已送出";
         let text;
         if(lan == 'en') {
@@ -418,6 +420,8 @@ $(".next").click(function () {
           confirmButtonColor: '#3085d6',
         });
       
+    } else {
+      $('.loading').hide();
     }
   };
   var data = renderXHR_data(dataOBJ)

+ 1 - 1
html/user_profile2.html

@@ -44,7 +44,7 @@
     <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-5M8S4GH" height="0" width="0"
             style="display:none;visibility:hidden"></iframe></noscript>
     <!-- End Google Tag Manager (noscript) -->
-
+    <div class="loading"></div>
     <div class="body-content" style="overflow-x: hidden;">
         <div class="card">
             <img class="profile-bgimg img-fluid" src="./static/img/nav-bg.png" class="card-img" alt="...">