From 318618fae6144314bcb57ad80c999f497bae8d7f Mon Sep 17 00:00:00 2001
From: Lukas Krause <lkrause@suse.de>
Date: Wed, 9 May 2018 15:02:29 +0200
Subject: [PATCH 3/3] Dev: Remove json extension from javascript delete
 operations

---
 hawk/app/assets/javascripts/module/alerts.js      | 3 +--
 hawk/app/assets/javascripts/module/clones.js      | 3 +--
 hawk/app/assets/javascripts/module/colocations.js | 3 +--
 hawk/app/assets/javascripts/module/constraints.js | 5 ++---
 hawk/app/assets/javascripts/module/groups.js      | 3 +--
 hawk/app/assets/javascripts/module/locations.js   | 3 +--
 hawk/app/assets/javascripts/module/masters.js     | 3 +--
 hawk/app/assets/javascripts/module/orders.js      | 3 +--
 hawk/app/assets/javascripts/module/primitives.js  | 3 +--
 hawk/app/assets/javascripts/module/reports.js     | 3 +--
 hawk/app/assets/javascripts/module/resources.js   | 2 +-
 hawk/app/assets/javascripts/module/roles.js       | 3 +--
 hawk/app/assets/javascripts/module/tags.js        | 3 +--
 hawk/app/assets/javascripts/module/users.js       | 3 +--
 14 files changed, 15 insertions(+), 28 deletions(-)

Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/alerts.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/alerts.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/alerts.js
@@ -50,8 +50,7 @@ $(function() {
                 },
                 url: Routes.cib_alert_path(
                   $('body').data('cib'),
-                  row.id,
-                  { format: 'json' }
+                  row.id
                 ),
 
                 success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/clones.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/clones.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/clones.js
@@ -48,8 +48,7 @@ $(function() {
                 },
                 url: Routes.cib_clone_path(
                   $('body').data('cib'),
-                  row.id,
-                  { format: 'json' }
+                  row.id
                 ),
 
                 success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/colocations.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/colocations.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/colocations.js
@@ -50,8 +50,7 @@ $(function() {
                   },
                   url: Routes.cib_colocation_path(
                     $('body').data('cib'),
-                    row.id,
-                    { format: 'json' }
+                    row.id
                   ),
 
                   success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/constraints.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/constraints.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/constraints.js
@@ -105,9 +105,8 @@ $(function() {
                   _method: 'delete'
                 },
                 url: [
-                  $self.attr('href'),
-                  ".json"
-                ].join(""),
+                  $self.attr('href')
+                ],
 
                 success: function(data) {
                   if (data.success) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/groups.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/groups.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/groups.js
@@ -48,8 +48,7 @@ $(function() {
                 },
                 url: Routes.cib_group_path(
                   $('body').data('cib'),
-                  row.id,
-                  { format: 'json' }
+                  row.id
                 ),
 
                 success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/locations.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/locations.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/locations.js
@@ -48,8 +48,7 @@ $(function() {
                 },
                 url: Routes.cib_location_path(
                   $('body').data('cib'),
-                  row.id,
-                  { format: 'json' }
+                  row.id
                 ),
 
                 success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/masters.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/masters.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/masters.js
@@ -48,8 +48,7 @@ $(function() {
                 },
                 url: Routes.cib_master_path(
                   $('body').data('cib'),
-                  row.id,
-                  { format: 'json' }
+                  row.id
                 ),
 
                 success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/orders.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/orders.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/orders.js
@@ -48,8 +48,7 @@ $(function() {
                 },
                 url: Routes.cib_order_path(
                   $('body').data('cib'),
-                  row.id,
-                  { format: 'json' }
+                  row.id
                 ),
 
                 success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/primitives.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/primitives.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/primitives.js
@@ -91,8 +91,7 @@ $(function() {
                   },
                   url: controller_type.cib_primitive_path(
                     $('body').data('cib'),
-                    row.id,
-                    { format: 'json' }
+                    row.id
                   ),
 
                   success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/reports.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/reports.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/reports.js
@@ -318,8 +318,7 @@ $(function() {
                     _method: 'delete'
                   },
                   url: Routes.report_path(
-                    row.id,
-                    { format: 'json' }
+                    row.id
                   ),
 
                   success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/resources.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/resources.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/resources.js
@@ -706,7 +706,7 @@ $(function() {
         events: {
           'click .delete': function (e, value, row, index) {
             e.preventDefault();
-            $.hawkDeleteOperation(row.id, [$(this).attr('href'), ".json"].join(""));
+            $.hawkDeleteOperation(row.id, $(this).attr('href'));
             return false;
           }
         },
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/roles.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/roles.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/roles.js
@@ -48,8 +48,7 @@ $(function() {
                 },
                 url: Routes.cib_role_path(
                   $('body').data('cib'),
-                  row.id,
-                  { format: 'json' }
+                  row.id
                 ),
 
                 success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/tags.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/tags.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/tags.js
@@ -59,8 +59,7 @@ $(function() {
                 },
                 url: Routes.cib_tag_path(
                   $('body').data('cib'),
-                  row.id,
-                  { format: 'json' }
+                  row.id
                 ),
 
                 success: function(data) {
Index: hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/users.js
===================================================================
--- hawk2-2.1.0+git.1516013868.bada8da4.orig/hawk/app/assets/javascripts/module/users.js
+++ hawk2-2.1.0+git.1516013868.bada8da4/hawk/app/assets/javascripts/module/users.js
@@ -48,8 +48,7 @@ $(function() {
                 },
                 url: Routes.cib_user_path(
                   $('body').data('cib'),
-                  row.id,
-                  { format: 'json' }
+                  row.id
                 ),
 
                 success: function(data) {
