let in for loop, dismiss menu on note change
This commit is contained in:
@@ -75,6 +75,8 @@ angular.module('app.frontend')
|
|||||||
|
|
||||||
this.setNote = function(note, oldNote) {
|
this.setNote = function(note, oldNote) {
|
||||||
this.editorMode = 'edit';
|
this.editorMode = 'edit';
|
||||||
|
this.showExtensions = false;
|
||||||
|
this.showMenu = false;
|
||||||
|
|
||||||
if(note.safeText().length == 0 && note.dummy) {
|
if(note.safeText().length == 0 && note.dummy) {
|
||||||
this.focusTitle(100);
|
this.focusTitle(100);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ class ContextualExtensionsMenu {
|
|||||||
return _.cloneDeep(ext);
|
return _.cloneDeep(ext);
|
||||||
});
|
});
|
||||||
|
|
||||||
for(var ext of $scope.extensions) {
|
for(let ext of $scope.extensions) {
|
||||||
ext.loading = true;
|
ext.loading = true;
|
||||||
extensionManager.loadExtensionInContextOfItem(ext, $scope.item, function(scopedExtension) {
|
extensionManager.loadExtensionInContextOfItem(ext, $scope.item, function(scopedExtension) {
|
||||||
ext.loading = false;
|
ext.loading = false;
|
||||||
|
|||||||
@@ -78,11 +78,10 @@ class ExtensionManager {
|
|||||||
loadExtensionInContextOfItem(extension, item, callback) {
|
loadExtensionInContextOfItem(extension, item, callback) {
|
||||||
this.Restangular.oneUrl(extension.url, extension.url).customGET("", {content_type: item.content_type, item_uuid: item.uuid}).then(function(response){
|
this.Restangular.oneUrl(extension.url, extension.url).customGET("", {content_type: item.content_type, item_uuid: item.uuid}).then(function(response){
|
||||||
var scopedExtension = new Extension(response.plain());
|
var scopedExtension = new Extension(response.plain());
|
||||||
scopedExtension.url = extension.url;
|
|
||||||
callback(scopedExtension);
|
callback(scopedExtension);
|
||||||
}.bind(this))
|
}.bind(this))
|
||||||
.catch(function(response){
|
.catch(function(response){
|
||||||
console.log("Error reloading extension", response);
|
console.log("Error loading extension", response);
|
||||||
callback(null);
|
callback(null);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
Last run {{action.lastExecuted | appDateTime}}
|
Last run {{action.lastExecuted | appDateTime}}
|
||||||
.error{"ng-if" => "action.error"}
|
.error{"ng-if" => "action.error"}
|
||||||
Error performing action.
|
Error performing action.
|
||||||
%a{"ng-click" => "ctrl.deleteExtension(extension)", "style" => "margin-top: 22px; display: block;"} Remove extension
|
%a{"ng-click" => "ctrl.deleteExtension(extension)", "style" => "margin-top: 22px; display: block; text-align: center;"} Remove extension
|
||||||
|
|
||||||
.extension-link
|
.extension-link
|
||||||
%a{"ng-click" => "ctrl.toggleExtensionForm()"} Add new extension
|
%a{"ng-click" => "ctrl.toggleExtensionForm()"} Add new extension
|
||||||
|
|||||||
Reference in New Issue
Block a user