]> git.mxchange.org Git - friendica.git/commitdiff
Fix code style in itemFiler()
authorHypolite Petovan <hypolite@mrpetovan.com>
Sun, 26 Jan 2025 19:32:14 +0000 (14:32 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 28 Jan 2025 12:50:16 +0000 (07:50 -0500)
view/templates/jot-header.tpl
view/theme/frio/templates/jot-header.tpl

index ca3867e9fcc092240286cf6f4b54c8e025c31460..5276bf5d5e3cc297a16370d383cbdc9b6740723a 100644 (file)
@@ -199,22 +199,21 @@ function enableOnUser(){
        }
 
        function itemFiler(id) {
+               const bordercolor = $("input").css("border-color");
 
-               var bordercolor = $("input").css("border-color");
-
-               $.get('filer/', function(data){
-                       $.colorbox({html:data});
-                       $("#id_term").keypress(function(){
-                               $(this).css("border-color",bordercolor);
+               $.get('filer/', function (data) {
+                       $.colorbox({html: data});
+                       $("#id_term").keypress(function () {
+                               $(this).css("border-color", bordercolor);
                        })
-                       $("#select_term").change(function(){
-                               $("#id_term").css("border-color",bordercolor);
+                       $("#select_term").change(function () {
+                               $("#id_term").css("border-color", bordercolor);
                        })
 
-                       $("#filer_save").click(function(e){
+                       $("#filer_save").click(function (e) {
                                e.preventDefault();
-                               reply = $("#id_term").val();
-                               if(reply && reply.length) {
+                               const reply = $("#id_term").val();
+                               if (reply && reply.length) {
                                        commentBusy = true;
                                        $('body').css('cursor', 'wait');
                                        $.get('filer/' + id + '?term=' + reply, NavUpdate);
@@ -224,12 +223,11 @@ function enableOnUser(){
                                        force_update = true;
                                        $.colorbox.close();
                                } else {
-                                       $("#id_term").css("border-color","#FF0000");
+                                       $("#id_term").css("border-color", "#FF0000");
                                }
                                return false;
                        });
                });
-
        }
 
        function jotClearLocation() {
index e882fdf0c17c667369ba00acf3c5e32c401a573e..d1fdc3dee07fbf20f60a3a2464f3421f37ac1cb2 100644 (file)
        }
 
        function itemFiler(id) {
-               var bordercolor = $("input").css("border-color");
+               const bordercolor = $("input").css("border-color");
 
-               $.get('filer/', function(data){
-                       $.colorbox({html:data});
-                       $("#id_term").keypress(function(){
-                               $(this).css("border-color",bordercolor);
+               $.get('filer/', function (data) {
+                       $.colorbox({html: data});
+                       $("#id_term").keypress(function () {
+                               $(this).css("border-color", bordercolor);
                        })
-                       $("#select_term").change(function(){
-                               $("#id_term").css("border-color",bordercolor);
+                       $("#select_term").change(function () {
+                               $("#id_term").css("border-color", bordercolor);
                        })
 
-                       $("#filer_save").click(function(e){
+                       $("#filer_save").click(function (e) {
                                e.preventDefault();
-                               reply = $("#id_term").val();
-                               if(reply && reply.length) {
+                               const reply = $("#id_term").val();
+                               if (reply && reply.length) {
                                        commentBusy = true;
                                        $('body').css('cursor', 'wait');
                                        $.get('filer/' + id + '?term=' + reply, NavUpdate);
                                        $.colorbox.close();
                                        formModified = true; // Mark the form as modified
                                } else {
-                                       $("#id_term").css("border-color","#FF0000");
+                                       $("#id_term").css("border-color", "#FF0000");
                                }
+
                                return false;
                        });
                });