fix: use bricks.getWidgetById(sage_main_content) instead of location.href
All filter buttons now internally navigate via:
bricks.getWidgetById('sage_main_content', bricks.app)
→ clear_widgets() → widgetBuild(urlwidget)
This keeps model_plaza within the app shell instead of standalone page.
This commit is contained in:
parent
21bf30d2a6
commit
1623c891ab
@ -27,7 +27,7 @@
|
|||||||
},
|
},
|
||||||
"binds": [{
|
"binds": [{
|
||||||
"wid": "self", "event": "search", "actiontype": "script", "target": "self",
|
"wid": "self", "event": "search", "actiontype": "script", "target": "self",
|
||||||
"script": "var kw=(event.params&&event.params.keyword)||event.keyword||'';location.href='{{base}}?providerid={{active_provider}}&catelogid={{active_catelog}}&search='+encodeURIComponent(kw);"
|
"script": "var kw=(event.params&&event.params.keyword)||event.keyword||'';var u='{{base}}?providerid={{active_provider}}&catelogid={{active_catelog}}&search='+encodeURIComponent(kw);var t=bricks.getWidgetById('sage_main_content',bricks.app);if(t){t.clear_widgets();bricks.widgetBuild({widgettype:'urlwidget',options:{url:u}},t);}"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -45,7 +45,7 @@
|
|||||||
},
|
},
|
||||||
"binds": [{
|
"binds": [{
|
||||||
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
||||||
"script": "location.href='{{base}}?providerid={{active_provider}}&search={{active_search}}';"
|
"script": "var t=bricks.getWidgetById('sage_main_content',bricks.app);if(t){t.clear_widgets();bricks.widgetBuild({widgettype:'urlwidget',options:{url:'{{base}}?providerid={{active_provider}}&search={{active_search}}'}},t);}"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
{% for c in catelogs %}
|
{% for c in catelogs %}
|
||||||
@ -58,7 +58,7 @@
|
|||||||
},
|
},
|
||||||
"binds": [{
|
"binds": [{
|
||||||
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
||||||
"script": "location.href='{{base}}?providerid={{active_provider}}&catelogid={{c.id}}&search={{active_search}}';"
|
"script": "var t=bricks.getWidgetById('sage_main_content',bricks.app);if(t){t.clear_widgets();bricks.widgetBuild({widgettype:'urlwidget',options:{url:'{{base}}?providerid={{active_provider}}&catelogid={{c.id}}&search={{active_search}}'}},t);}"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
@ -93,7 +93,7 @@
|
|||||||
},
|
},
|
||||||
"binds": [{
|
"binds": [{
|
||||||
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
||||||
"script": "location.href='{{base}}?catelogid={{active_catelog}}&search={{active_search}}';"
|
"script": "var t=bricks.getWidgetById('sage_main_content',bricks.app);if(t){t.clear_widgets();bricks.widgetBuild({widgettype:'urlwidget',options:{url:'{{base}}?catelogid={{active_catelog}}&search={{active_search}}'}},t);}"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
{% for p in providers %}
|
{% for p in providers %}
|
||||||
@ -106,7 +106,7 @@
|
|||||||
},
|
},
|
||||||
"binds": [{
|
"binds": [{
|
||||||
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
"wid": "self", "event": "click", "actiontype": "script", "target": "self",
|
||||||
"script": "location.href='{{base}}?providerid={{p.providerid}}&catelogid={{active_catelog}}&search={{active_search}}';"
|
"script": "var t=bricks.getWidgetById('sage_main_content',bricks.app);if(t){t.clear_widgets();bricks.widgetBuild({widgettype:'urlwidget',options:{url:'{{base}}?providerid={{p.providerid}}&catelogid={{active_catelog}}&search={{active_search}}'}},t);}"
|
||||||
}]
|
}]
|
||||||
}
|
}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user