]> git.mxchange.org Git - friendica.git/commitdiff
Fix indenting in friendica-tagsinput.js
authorHypolite Petovan <hypolite@mrpetovan.com>
Sat, 10 Oct 2020 22:41:12 +0000 (18:41 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Sat, 10 Oct 2020 23:04:25 +0000 (19:04 -0400)
view/js/friendica-tagsinput/friendica-tagsinput.js

index af722d789ee04c39de7b46086fb152bc666b54e4..e3db53df41a6b29d04358ba93ef4e528affcd487 100644 (file)
       var tagsinput = $(this).data('tagsinput');
       // Initialize a new tags input
       if (!tagsinput) {
-          tagsinput = new TagsInput(this, arg1);
-          $(this).data('tagsinput', tagsinput);
-          results.push(tagsinput);
+        tagsinput = new TagsInput(this, arg1);
+        $(this).data('tagsinput', tagsinput);
+        results.push(tagsinput);
 
-          if (this.tagName === 'SELECT') {
-              $('option', $(this)).attr('selected', 'selected');
-          }
+        if (this.tagName === 'SELECT') {
+          $('option', $(this)).attr('selected', 'selected');
+        }
 
-          // Init tags from $(this).val()
-          $(this).val($(this).val());
+        // Init tags from $(this).val()
+        $(this).val($(this).val());
       } else if (!arg1 && !arg2) {
-          // tagsinput already exists
-          // no function, trying to init
-          results.push(tagsinput);
+        // tagsinput already exists
+        // no function, trying to init
+        results.push(tagsinput);
       } else if(tagsinput[arg1] !== undefined) {
-          // Invoke function on existing tags input
-            if(tagsinput[arg1].length === 3 && arg3 !== undefined){
-               var retVal = tagsinput[arg1](arg2, null, arg3);
-            }else{
-               var retVal = tagsinput[arg1](arg2);
-            }
-          if (retVal !== undefined)
-              results.push(retVal);
+        // Invoke function on existing tags input
+        if(tagsinput[arg1].length === 3 && arg3 !== undefined){
+          var retVal = tagsinput[arg1](arg2, null, arg3);
+        }else{
+          var retVal = tagsinput[arg1](arg2);
+        }
+        if (retVal !== undefined)
+          results.push(retVal);
       }
     });