|
@@ -1,10 +1,13 @@
|
|
checkRoute();
|
|
checkRoute();
|
|
|
|
|
|
let userBasics = JSON.parse(localStorage.getItem('user_profile')) || [];
|
|
let userBasics = JSON.parse(localStorage.getItem('user_profile')) || [];
|
|
|
|
+
|
|
|
|
+
|
|
if(userBasics !== []){
|
|
if(userBasics !== []){
|
|
$('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hi ${userBasics.user_info.userName}</h2>`);
|
|
$('.userName').html(`<h2 class="user-name text-white mt-4 fw-bold">Hi ${userBasics.user_info.userName}</h2>`);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
function checkRoute() {
|
|
function checkRoute() {
|
|
let jwt_token = get_jwt_token();
|
|
let jwt_token = get_jwt_token();
|
|
if(jwt_token == undefined) {
|
|
if(jwt_token == undefined) {
|
|
@@ -41,6 +44,25 @@ function loginControl() {
|
|
|
|
|
|
loginControl();
|
|
loginControl();
|
|
|
|
|
|
|
|
+let lan = localStorage.getItem('lan');
|
|
|
|
+
|
|
|
|
+$('.dropdown-toggle').click(() => {
|
|
|
|
+ lan = localStorage.getItem('lan');
|
|
|
|
+ checkLan();
|
|
|
|
+});
|
|
|
|
+
|
|
|
|
+checkLan();
|
|
|
|
+
|
|
|
|
+function checkLan() {
|
|
|
|
+ if(lan == 'en') {
|
|
|
|
+ $('.btn-makev').css('display', 'none');
|
|
|
|
+ $('.btn-makelong').css('display', 'none');
|
|
|
|
+ } else {
|
|
|
|
+ $('.btn-makev').css('display', 'block');
|
|
|
|
+ $('.btn-makelong').css('display', 'block');
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
var client_id = Date.now()
|
|
var client_id = Date.now()
|
|
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
|
|
var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
|
|
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|
var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
|
|
@@ -159,7 +181,7 @@ $(".next").click(function () {
|
|
console.log(responseOBJ.msg);
|
|
console.log(responseOBJ.msg);
|
|
//let title = "資料已送出";
|
|
//let title = "資料已送出";
|
|
let text;
|
|
let text;
|
|
- if(lang == 'en') {
|
|
|
|
|
|
+ if(lan == 'en') {
|
|
//title = 'Submitted Successfully!';
|
|
//title = 'Submitted Successfully!';
|
|
text = responseOBJ.msg.eng;
|
|
text = responseOBJ.msg.eng;
|
|
} else {
|
|
} else {
|
|
@@ -218,7 +240,7 @@ $("#sendBTN").click(function () {
|
|
if (responseOBJ.msg=='ok'){
|
|
if (responseOBJ.msg=='ok'){
|
|
let title = "資料已送出";
|
|
let title = "資料已送出";
|
|
let text = '資料已傳送,請耐心等候';
|
|
let text = '資料已傳送,請耐心等候';
|
|
- if (lang == 'en') { // 英文版訊息
|
|
|
|
|
|
+ if (lan == 'en') { // 英文版訊息
|
|
title = "Submitted Successfully!";
|
|
title = "Submitted Successfully!";
|
|
text = 'We are working on your video. You will get notfication in line group when your video is done.';
|
|
text = 'We are working on your video. You will get notfication in line group when your video is done.';
|
|
}
|
|
}
|
|
@@ -231,7 +253,7 @@ $("#sendBTN").click(function () {
|
|
} else {
|
|
} else {
|
|
let title = '發生錯誤';
|
|
let title = '發生錯誤';
|
|
let text;
|
|
let text;
|
|
- if(lang == 'en') {
|
|
|
|
|
|
+ if(lan == 'en') {
|
|
title = 'Error';
|
|
title = 'Error';
|
|
text = responseOBJ.msg.eng;
|
|
text = responseOBJ.msg.eng;
|
|
} else {
|
|
} else {
|
|
@@ -274,7 +296,7 @@ $("#send_slide").click(function () {
|
|
if (xhr.readyState === 4) {
|
|
if (xhr.readyState === 4) {
|
|
let title = "資料已送出";
|
|
let title = "資料已送出";
|
|
let text = '資料已傳送,請耐心等候';
|
|
let text = '資料已傳送,請耐心等候';
|
|
- if (lang == 'en') { // 英文版訊息
|
|
|
|
|
|
+ if (lan == 'en') { // 英文版訊息
|
|
title = "Submitted Successfully!";
|
|
title = "Submitted Successfully!";
|
|
text = 'We are working on your video. You will get notfication in line group when your video is done.';
|
|
text = 'We are working on your video. You will get notfication in line group when your video is done.';
|
|
}
|
|
}
|
|
@@ -463,7 +485,7 @@ function load_data(tid, loaded_data, draft = false) {
|
|
imguploadlabel.setAttribute('for', `img${i + 1}`);
|
|
imguploadlabel.setAttribute('for', `img${i + 1}`);
|
|
imguploadlabel.classList.add('upload-btn');
|
|
imguploadlabel.classList.add('upload-btn');
|
|
imguploadlabel.textContent = '上傳檔案';
|
|
imguploadlabel.textContent = '上傳檔案';
|
|
- if(lang == 'en') {
|
|
|
|
|
|
+ if(lan == 'en') {
|
|
imguploadlabel.textContent = 'Upload';
|
|
imguploadlabel.textContent = 'Upload';
|
|
}
|
|
}
|
|
imguploadlabel.setAttribute('set-lan', `html:upload_file`);
|
|
imguploadlabel.setAttribute('set-lan', `html:upload_file`);
|
|
@@ -601,7 +623,7 @@ function renderimgBlock(i) {
|
|
imguploadlabel.setAttribute('for', `img${i}`);
|
|
imguploadlabel.setAttribute('for', `img${i}`);
|
|
imguploadlabel.classList.add('upload-btn');
|
|
imguploadlabel.classList.add('upload-btn');
|
|
imguploadlabel.textContent = '上傳檔案';
|
|
imguploadlabel.textContent = '上傳檔案';
|
|
- if(lang == 'en') {
|
|
|
|
|
|
+ if(lan == 'en') {
|
|
imguploadlabel.textContent = 'Upload';
|
|
imguploadlabel.textContent = 'Upload';
|
|
}
|
|
}
|
|
imguploadlabel.setAttribute('set-lan', `html:upload_file`);
|
|
imguploadlabel.setAttribute('set-lan', `html:upload_file`);
|
|
@@ -636,7 +658,7 @@ $('.owl-carousel').owlCarousel({
|
|
$('.draft-btn').click(() => {
|
|
$('.draft-btn').click(() => {
|
|
let text = '儲存中...';
|
|
let text = '儲存中...';
|
|
|
|
|
|
- if (lang == 'en') {
|
|
|
|
|
|
+ if (lan == 'en') {
|
|
text = 'Saving...';
|
|
text = 'Saving...';
|
|
}
|
|
}
|
|
|
|
|
|
@@ -684,7 +706,7 @@ $('.draft-btn').click(() => {
|
|
console.log(res.data);
|
|
console.log(res.data);
|
|
$('.draft-btn').text('存為草稿');
|
|
$('.draft-btn').text('存為草稿');
|
|
let title = "儲存完成";
|
|
let title = "儲存完成";
|
|
- if(lang == 'en') {
|
|
|
|
|
|
+ if(lan == 'en') {
|
|
title = 'Saved!'
|
|
title = 'Saved!'
|
|
$('.draft-btn').text('Save as Draft');
|
|
$('.draft-btn').text('Save as Draft');
|
|
}
|
|
}
|