From 5e8f0709eb66dc6a0d05f72cfbf7617f652ab448 Mon Sep 17 00:00:00 2001 From: Marcin P Date: Thu, 5 Jun 2014 22:16:02 +0200 Subject: [PATCH] [#145] DELETE in "Any request" tab needs confirm Fix for issues: #145 and possibly #65. --- dist/app.js | 5 +++++ src/app/ui/anyRequest/anyRequest.js | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/dist/app.js b/dist/app.js index 9c5ececd..737c9a4a 100644 --- a/dist/app.js +++ b/dist/app.js @@ -2697,6 +2697,11 @@ this.transformEl.val(item.transform); }, _request_handler: function(jEv) { + // Confirm that user really want to DELETE something + var isDeleteMethodSelected = (this.typeEl.val() === "DELETE"); + if( isDeleteMethodSelected && (prompt( i18n.text("AliasForm.DeleteAliasMessage", i18n.text("Command.DELETE") ) ) !== i18n.text("Command.DELETE")) ) { + return; + } if(! this._validateJson_handler()) { return; } diff --git a/src/app/ui/anyRequest/anyRequest.js b/src/app/ui/anyRequest/anyRequest.js index b42dc2bd..6e3e6fab 100644 --- a/src/app/ui/anyRequest/anyRequest.js +++ b/src/app/ui/anyRequest/anyRequest.js @@ -37,6 +37,11 @@ this.transformEl.val(item.transform); }, _request_handler: function(jEv) { + // Confirm that user really want to DELETE something + var isDeleteMethodSelected = (this.typeEl.val() === "DELETE"); + if( isDeleteMethodSelected && (prompt( i18n.text("AliasForm.DeleteAliasMessage", i18n.text("Command.DELETE") ) ) !== i18n.text("Command.DELETE")) ) { + return; + } if(! this._validateJson_handler()) { return; }