MOBILE-3340 siteplugins: Update preSets when using samePage=true
parent
6d06a7e41c
commit
253abb7f3c
|
@ -170,12 +170,14 @@ export class CoreSitePluginsPluginContentComponent implements OnInit, DoCheck {
|
||||||
* @param component New component. If not provided, current component
|
* @param component New component. If not provided, current component
|
||||||
* @param method New method. If not provided, current method
|
* @param method New method. If not provided, current method
|
||||||
* @param jsData JS variables to pass to the new view so they can be used in the template or JS.
|
* @param jsData JS variables to pass to the new view so they can be used in the template or JS.
|
||||||
|
* @param preSets New preSets to use. If not provided, use current preSets.
|
||||||
*/
|
*/
|
||||||
updateContent(args: any, component?: string, method?: string, jsData?: any): void {
|
updateContent(args: any, component?: string, method?: string, jsData?: any, preSets?: any): void {
|
||||||
this.component = component || this.component;
|
this.component = component || this.component;
|
||||||
this.method = method || this.method;
|
this.method = method || this.method;
|
||||||
this.args = args;
|
this.args = args;
|
||||||
this.dataLoaded = false;
|
this.dataLoaded = false;
|
||||||
|
this.preSets = preSets || this.preSets;
|
||||||
if (jsData) {
|
if (jsData) {
|
||||||
Object.assign(this.data, jsData);
|
Object.assign(this.data, jsData);
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,7 +87,7 @@ export class CoreSitePluginsCallWSNewContentDirective extends CoreSitePluginsCal
|
||||||
if (this.utils.isTrueOrOne(this.samePage)) {
|
if (this.utils.isTrueOrOne(this.samePage)) {
|
||||||
// Update the parent content (if it exists).
|
// Update the parent content (if it exists).
|
||||||
if (this.parentContent) {
|
if (this.parentContent) {
|
||||||
this.parentContent.updateContent(args, this.component, this.method, this.jsData);
|
this.parentContent.updateContent(args, this.component, this.method, this.jsData, this.newContentPreSets);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let jsData = this.jsData;
|
let jsData = this.jsData;
|
||||||
|
|
|
@ -84,7 +84,7 @@ export class CoreSitePluginsNewContentDirective implements OnInit {
|
||||||
if (this.utils.isTrueOrOne(this.samePage)) {
|
if (this.utils.isTrueOrOne(this.samePage)) {
|
||||||
// Update the parent content (if it exists).
|
// Update the parent content (if it exists).
|
||||||
if (this.parentContent) {
|
if (this.parentContent) {
|
||||||
this.parentContent.updateContent(args, this.component, this.method, this.jsData);
|
this.parentContent.updateContent(args, this.component, this.method, this.jsData, this.preSets);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let jsData = this.jsData;
|
let jsData = this.jsData;
|
||||||
|
|
Loading…
Reference in New Issue