From ce9ee2561d4cb54eba89b387ab14e99baea7d7f5 Mon Sep 17 00:00:00 2001 From: soufiane Date: Wed, 31 Jan 2024 11:20:36 +0100 Subject: [PATCH] disabled popup linkeditor --- resources/linkeditor/js/linkeditor.js | 64 --------------------------- 1 file changed, 64 deletions(-) diff --git a/resources/linkeditor/js/linkeditor.js b/resources/linkeditor/js/linkeditor.js index c838113c3..8d2c2e235 100644 --- a/resources/linkeditor/js/linkeditor.js +++ b/resources/linkeditor/js/linkeditor.js @@ -580,70 +580,6 @@ LinkEditor.prototype = { $(function () { window.linkeditor = new LinkEditor(); - - let userID = $("#userID").data('id') - let interval = null - let token = $("[data-token]").data("token") - - function intervalConnection(clear) { - let unload = localStorage.getItem('unload') - let token_ = localStorage.getItem('token') - - $.ajax({ - method: "POST", - url: '/fluidbook-publication/' + FLUIDBOOK_DATA.id + '/edit/links', - data: {id: FLUIDBOOK_DATA.id, token: token_ ?? token, unload: unload, clear: clear} - }).done(function (msg) { - let response = JSON.parse(msg) - //console.log(response.queueEditor) - if (response.status === "unavailable" ) { - if ($("#popup-overlay").find('.popup').length === 0) { - $("#popup-overlay").addClass("show") - - let popupName = 'unavailable'; - if(response.infos_connection.id === userID) popupName = 'unavailable-twin-connection'; - window.linkeditor.popup.open(popupName); - - // Bloquer les raccourcis clavier - keyfilter(false,true) - - $("#username").text(response.infos_connection.user) - $("#id").text(response.infos_connection.id) - } - } else { - if ($("#popup-overlay").find('.popup[data-popup^="unavailable"]').length > 0) { - $("#popup-overlay").removeClass("show") - window.linkeditor.popup.close(); - } - window.key.filter = function (event) { - let tagName = (event.target || event.srcElement).tagName; - if (tagName === 'TEXTAREA' && event.keyCode === 13) { - return false; - } - return true; - }; - } - localStorage.removeItem('unload'); - localStorage.removeItem('token'); - setTimeout(function () { intervalConnection(); }, 1000) - }); - } - //interval = setTimeout(function () { intervalConnection() }, 1000) - - // - $("body").on("click", "#connectTo", function(e) { - e.preventDefault() - clearTimeout(interval) - intervalConnection("1"); - }) - - // - /*$(window).on("unload",function(){ - clearTimeout(interval) - //console.log("token",token) - localStorage.setItem('token', token) - localStorage.setItem('unload', '1'); - })*/ }); (function (old) { -- 2.39.5