From 6ba14b35f237704bfb8b8f351e9abe9c64ef4af9 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Fri, 25 Apr 2025 14:57:17 +0200 Subject: [PATCH] wait #7498 @0.75 --- resources/linkeditor-stable/js/linkeditor.form.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.39.5