From: Vincent Vanwaelscappel Date: Fri, 25 Apr 2025 12:57:17 +0000 (+0200) Subject: wait #7498 @0.75 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=6ba14b35f237704bfb8b8f351e9abe9c64ef4af9;p=fluidbook-toolbox.git wait #7498 @0.75 --- diff --git a/resources/linkeditor-stable/js/linkeditor.form.js b/resources/linkeditor-stable/js/linkeditor.form.js index 673f09d7f..425d44c15 100644 --- a/resources/linkeditor-stable/js/linkeditor.form.js +++ b/resources/linkeditor-stable/js/linkeditor.form.js @@ -94,6 +94,7 @@ LinkeditorForm.prototype = { var parent = $(this).closest('.freefile-file'); var tf = $(parent).find('.freefile-text-input'); + tf.attr('data-upload-id', id); let tfname = $(tf).attr('name'); let uid = $this.getCurrentFormUID(); $this.loadingFields[uid + '_' + tfname] = true; @@ -103,7 +104,7 @@ LinkeditorForm.prototype = { var xhr = f.data('jqxhr'); xhr.done(function (data) { if ($this.getCurrentFormUID() === uid) { - let tf = $("#linkeditor-panel-form").find('.freefile-text-input[name="' + tfname + '"]'); + let tf = $("#linkeditor-panel-form").find('[data-upload-id="' + id + '"]'); tf.val(data[0]); tf.trigger('change'); $(tf).closest('.freefile-file').removeClass('loading'); @@ -352,7 +353,7 @@ LinkeditorForm.prototype = { initSelect2: function () { // trigger select2 for each untriggered select2 box $('#linkeditor-panel-form .select2_from_array:not(.init)').each(function (i, obj) { - if($(this).closest('.item.sample').length>0){ + if ($(this).closest('.item.sample').length > 0) { return; }