Bug 23623: (RM follow-up) Minor JS Tidy
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 23 Sep 2019 10:03:02 +0000 (11:03 +0100)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 23 Sep 2019 10:04:13 +0000 (11:04 +0100)
Apply 'Break lines on chained methods' to the new JS code introduced in
this patchset to prevent really long lines.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-memberentry.tt

index cc96be9..8761cc8 100644 (file)
                         $.ajax({
                             url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_checkouts",
                             type: "PUT",
-                            data: JSON.stringify({ allowed: can_see_checkouts }),
+                            data: JSON.stringify({
+                                allowed: can_see_checkouts
+                            }),
                             contentType: "application/json",
-                            success: function() {
-                                $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( _("Your setting has been updated!") ).delay( 5000 ).fadeOut("slow");
+                            success: function () {
+                                $('#update_privacy_guarantor_checkouts_message')
+                                    .fadeIn("slow")
+                                    .text(_("Your setting has been updated!"))
+                                    .delay(5000)
+                                    .fadeOut("slow");
                             },
-                            error: function() {
-                                $('#update_privacy_guarantor_checkouts_message').fadeIn("slow").text( _("Unable to update your setting!") ).delay( 5000 ).fadeOut("slow");
+                            error: function () {
+                                $('#update_privacy_guarantor_checkouts_message')
+                                    .fadeIn("slow")
+                                    .text(_("Unable to update your setting!"))
+                                    .delay(5000)
+                                    .fadeOut("slow");
                             }
                         });
                     });
                         $.ajax({
                             url: "/api/v1/public/patrons/[% logged_in_user.borrowernumber | uri %]/guarantors/can_see_charges",
                             type: 'PUT',
-                            data: JSON.stringify({ allowed: can_see_charges }),
+                            data: JSON.stringify({ 
+                                allowed: can_see_charges
+                            }),
                             contentType: 'application/json',
                             success: function() {
-                                $('#update_privacy_guarantor_fines_message').fadeIn("slow").text( _("Your setting has been updated!") ).delay( 5000 ).fadeOut("slow");
+                                $('#update_privacy_guarantor_fines_message')
+                                    .fadeIn("slow")
+                                    .text( _("Your setting has been updated!") )
+                                    .delay( 5000 )
+                                    .fadeOut("slow");
                             },
                             error: function() {
-                                $('#update_privacy_guarantor_fines_message').fadeIn("slow").text( _("Unable to update your setting!") ).delay( 5000 ).fadeOut("slow");
+                                $('#update_privacy_guarantor_fines_message')
+                                    .fadeIn("slow")
+                                    .text( _("Unable to update your setting!") )
+                                    .delay( 5000 )
+                                    .fadeOut("slow");
                             }
                         });
                     });