contextual extension menu
This commit is contained in:
@@ -18,7 +18,6 @@ class Item {
|
||||
}
|
||||
|
||||
get contentObject() {
|
||||
// console.log("getting content object from content", this.content);
|
||||
if(!this.content) {
|
||||
return {};
|
||||
}
|
||||
|
||||
@@ -56,6 +56,12 @@ class Extension extends Item {
|
||||
})
|
||||
}
|
||||
|
||||
actionsWithContextForItem(item) {
|
||||
return this.actions.filter(function(action){
|
||||
return action.context == item.content_type || action.context == "Item";
|
||||
})
|
||||
}
|
||||
|
||||
mapContentToLocalProperties(contentObject) {
|
||||
super.mapContentToLocalProperties(contentObject)
|
||||
this.name = contentObject.name;
|
||||
|
||||
Reference in New Issue
Block a user