diff --git a/app/assets/javascripts/app/directives/views/actionsMenu.js b/app/assets/javascripts/app/directives/views/actionsMenu.js index 09620d377..78f2cf90b 100644 --- a/app/assets/javascripts/app/directives/views/actionsMenu.js +++ b/app/assets/javascripts/app/directives/views/actionsMenu.js @@ -39,10 +39,13 @@ class ActionsMenu { // reload extension actions actionsManager.loadExtensionInContextOfItem(extension, $scope.item, function(ext){ // keep nested state - if(parentAction) { - var matchingAction = _.find(ext.actions, {label: parentAction.label}); - matchingAction.subrows = $scope.subRowsForAction(parentAction, extension); - } + // 4/1/2019: We're not going to do this anymore because we're no longer using nested actions for version history, + // and also because finding the parentAction based on only label is not good enough. Two actions can have same label. + // We'd need a way to track actions after they are reloaded, but there's no good way to do this. + // if(parentAction) { + // var matchingAction = _.find(ext.actions, {label: parentAction.label}); + // matchingAction.subrows = $scope.subRowsForAction(parentAction, extension); + // } }); }) } diff --git a/app/assets/javascripts/app/services/actionsManager.js b/app/assets/javascripts/app/services/actionsManager.js index f23dfd379..3c474119e 100644 --- a/app/assets/javascripts/app/services/actionsManager.js +++ b/app/assets/javascripts/app/services/actionsManager.js @@ -122,18 +122,19 @@ class ActionsManager { switch (action.verb) { case "get": { - this.httpManager.getAbsolute(action.url, {}, async (response) => { - action.error = false; - handleResponseDecryption(response, await this.authManager.keys(), true); - }, (response) => { - action.error = true; - customCallback(null); - }) + if(confirm("Are you sure you want to replace the current note contents with this action's results?")) { + this.httpManager.getAbsolute(action.url, {}, async (response) => { + action.error = false; + handleResponseDecryption(response, await this.authManager.keys(), true); + }, (response) => { + action.error = true; + customCallback(null); + }) + } break; } case "render": { - this.httpManager.getAbsolute(action.url, {}, async (response) => { action.error = false; handleResponseDecryption(response, await this.authManager.keys(), false);