|
@@ -328,7 +328,8 @@ function openNav() {
|
|
|
boxTitle.classList.add('box-title');
|
|
|
boxTitle.textContent = obj.name;
|
|
|
boxTitle.id = obj.id;
|
|
|
- boxTitle.setAttribute('onclick', `load_data(${obj.id}, ${loaded_data})`);
|
|
|
+ console.log(loaded_data);
|
|
|
+ boxTitle.setAttribute('onclick', `direct(${obj.id})`);
|
|
|
|
|
|
var boxLink = document.createElement('span');
|
|
|
boxLink.classList.add('box-link');
|
|
@@ -338,7 +339,7 @@ function openNav() {
|
|
|
contentBox.appendChild(boxTitle);
|
|
|
contentBox.appendChild(boxLink);
|
|
|
list.classList.add("historyList-item");
|
|
|
- list.setAttribute('onclick', `load_data(${obj.id}, ${loaded_data})`);
|
|
|
+ list.setAttribute('onclick', `direct(${obj.id})`);
|
|
|
list.appendChild(divImgfr);
|
|
|
list.appendChild(contentBox);
|
|
|
historyList.appendChild(list);
|
|
@@ -384,6 +385,11 @@ function get_jwt_token(){
|
|
|
return jwt_raw.split('=')[1];
|
|
|
}
|
|
|
|
|
|
+function direct(id) {
|
|
|
+ location.href = `make_video.html?id=${id}`;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
function load_data(tid, loaded_data, draft = false) {
|
|
|
if(!tid) {
|
|
|
return;
|
|
@@ -646,3 +652,30 @@ function getDraftData() {
|
|
|
|
|
|
}
|
|
|
|
|
|
+$(".copy").click(function(){
|
|
|
+ const copyStr = $(this).next().text();
|
|
|
+ copyToClipboard(copyStr);
|
|
|
+});
|
|
|
+
|
|
|
+const copyToClipboard = str => {
|
|
|
+ const el = document.createElement('textarea');
|
|
|
+ el.value = str;
|
|
|
+ el.setAttribute('readonly', '');
|
|
|
+ el.style.position = 'absolute';
|
|
|
+ el.style.left = '-9999px';
|
|
|
+ document.body.appendChild(el);
|
|
|
+ el.select();
|
|
|
+ document.execCommand('copy');
|
|
|
+ document.body.removeChild(el);
|
|
|
+ Swal.fire({
|
|
|
+ toast: true,
|
|
|
+ icon: 'success',
|
|
|
+ position: 'top-end',
|
|
|
+ title: 'Link copied!',
|
|
|
+ timerProgressBar: true,
|
|
|
+ showConfirmButton: false,
|
|
|
+ timer: 1000,
|
|
|
+ backdrop: false
|
|
|
+ })
|
|
|
+};
|
|
|
+
|