]> _ Git - fluidbook-toolbox.git/commitdiff
wait #7498 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 25 Apr 2025 12:57:17 +0000 (14:57 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Fri, 25 Apr 2025 12:57:17 +0000 (14:57 +0200)
resources/linkeditor-stable/js/linkeditor.form.js

index 673f09d7f2cbc30fb7d274d9e947346acede2c2a..425d44c15c02a64c489737d52de07e9f9a268cf9 100644 (file)
@@ -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;
             }