no extensions box

This commit is contained in:
Mo Bitar
2017-05-16 11:55:52 -05:00
parent b65ed8c90c
commit 5ec4797d85
13 changed files with 315 additions and 156 deletions

View File

@@ -26,7 +26,7 @@ class ContextualExtensionsMenu {
})
}
$scope.executeAction = function(action, extension) {
$scope.executeAction = function(action, extension, parentAction) {
if(!$scope.isActionEnabled(action, extension)) {
alert("This action requires " + action.access_type + " access to this note. You can change this setting in the Extensions menu on the bottom of the app.");
return;
@@ -41,7 +41,13 @@ class ContextualExtensionsMenu {
$scope.handleActionResponse(action, response);
// reload extension actions
extensionManager.loadExtensionInContextOfItem(extension, $scope.item, null);
extensionManager.loadExtensionInContextOfItem(extension, $scope.item, function(ext){
// keep nested state
if(parentAction) {
var matchingAction = _.find(ext.actions, {label: parentAction.label});
matchingAction.showNestedActions = true;
}
});
})
}