]> _ Git - fluidbook-toolbox.git/commitdiff
wait #6135 @0.75
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 17 Jul 2023 16:21:54 +0000 (18:21 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Mon, 17 Jul 2023 16:21:54 +0000 (18:21 +0200)
resources/linkeditor/js/linkeditor.form.js
resources/linkeditor/style/inc/_form.sass

index 08169686d2fafc0ed0b9a06f01359d0b00079a77..fcb4ac3c6011cc244f15f08acd6e1ee117e67512 100644 (file)
@@ -9,9 +9,19 @@ LinkeditorForm.prototype = {
     init: function () {
         var $this = this;
 
+        $(document).on('click', '.freefile-file a.upload', function (e) {
+            var c = $(this).closest('.freefile-file');
+            let f = $(c).find('.freefile-file-input');
+            if (e.originalEvent.ctrlKey && $(c).find('.freefile-file-input-directory').length > 0) {
+                f = $(c).find('.freefile-file-input-directory');
+            }
+            f.get(0).click();
+            return false;
+        });
+
+
         $(document).on('change', '.calculation', function () {
             var v = $(this).val();
-            console.log(v);
             if (/[0-9\., \-\+\*\/]+/.test(v)) {
                 try {
                     v = eval(v.replace(/,/g, '.'));
@@ -50,11 +60,11 @@ LinkeditorForm.prototype = {
             if ($this._maskChangeEvent) {
                 return;
             }
-
             $this.saveFormDataInLink();
         });
 
-        $(document).on('change', ".freefile-file-input", function () {
+
+        $(document).on('change', ".freefile-file-input, .freefile-file-input-directory", function () {
             var form = $('#linkupload').clone();
 
             var id = 'linkupload_' + Math.round(Math.random() * 10000000);
@@ -207,8 +217,10 @@ LinkeditorForm.prototype = {
 
         $(form).attr('id', null);
         $(form).data('link', link);
+        $(form).find('.init-tooltip').removeClass('init-tooltip');
         this.updateFormData(form);
         container.append(form);
+        this.linkeditor.initTooltips();
 
         this.initSelect2();
         this.initSpectrum();
index 205c324d21b5a61949dc9e0d40d072d0d99c3609..c3e71005d05daec0ed889347cb01380fb124c747 100644 (file)
@@ -164,11 +164,20 @@ button
 
         input[type=file]
             position: absolute
-            right: 0px
+            right: 0
+            width: 35px
+            opacity: 0
+            height: 100%
+            cursor: pointer
+
+        a.upload
+            position: absolute
+            right: 0
             width: 35px
             opacity: 0
             height: 100%
             cursor: pointer
+            z-index: 2
 
 
     .input-group