Commit 9cbddf5c authored by Laurent Wouters's avatar Laurent Wouters
Browse files

[fix] Enable views to return suggested resources upon rendering

parent f838d755de16
......@@ -107,7 +107,7 @@ class BookRendering implements implementation.ViewImplementation {
renderer: application.ViewRenderer,
context: application.RenderingContext,
target: string
): HTMLElement {
): application.ViewRendering {
let book = loadEntity(renderer, context, target, BOOK_METACLASS);
let result = document.createElement("div");
let vm = new Vue({
......@@ -131,7 +131,11 @@ class BookRendering implements implementation.ViewImplementation {
});
vm.$mount(result);
vm.$forceUpdate();
return vm.$el;
return {
dom: vm.$el,
viewId: this.descriptor.identifier,
suggestedResources: []
};
}
}
......
......@@ -152,7 +152,7 @@ class PersonRendering implements implementation.ViewImplementation {
renderer: application.ViewRenderer,
context: application.RenderingContext,
target: string
): HTMLElement {
): application.ViewRendering {
let person = loadEntity(renderer, context, target, PERSON_METACLASS);
let result = document.createElement("div");
let vm = new Vue({
......@@ -176,7 +176,11 @@ class PersonRendering implements implementation.ViewImplementation {
});
vm.$mount(result);
vm.$forceUpdate();
return vm.$el;
return {
dom: vm.$el,
viewId: this.descriptor.identifier,
suggestedResources: []
};
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment