# HG changeset patch # User Edouard Tisserant # Date 1596718744 -7200 # Node ID 360300a8b995f7f6ae7be2e24f2f253c87a00726 # Parent bbffdefd2eed84464342c077f4a1ee20a76d4ce4 SVGHMI : have to move some JS declarations from "preamble" to "declarations" and others from "declarations" to "definitions" section to make room for JS libraries that would be used by widget classes. diff -r bbffdefd2eed -r 360300a8b995 svghmi/detachable_pages.ysl2 --- a/svghmi/detachable_pages.ysl2 Wed Aug 05 18:53:56 2020 +0200 +++ b/svghmi/detachable_pages.ysl2 Thu Aug 06 14:59:04 2020 +0200 @@ -168,7 +168,7 @@ | }`if "position()!=last()" > ,` } -emit "declarations:page-desc" { +emit "definitions:page-desc" { | | var page_desc = { apply "$hmi_pages", mode="page_desc"; diff -r bbffdefd2eed -r 360300a8b995 svghmi/widgets_common.ysl2 --- a/svghmi/widgets_common.ysl2 Wed Aug 05 18:53:56 2020 +0200 +++ b/svghmi/widgets_common.ysl2 Thu Aug 06 14:59:04 2020 +0200 @@ -156,7 +156,7 @@ || } -emit "preamble:hmi-classes" { +emit "declarations:hmi-classes" { const "used_widget_types", "func:unique_types($parsed_widgets/widget)"; apply "$used_widget_types", mode="widget_class"; } @@ -171,7 +171,7 @@ const "excluded_types", "str:split('Page Lang')"; const "excluded_ids","$parsed_widgets/widget[not(@type = $excluded_types)]/@id"; -emit "preamble:hmi-elements" { +emit "declarations:hmi-elements" { | var hmi_widgets = { apply "$hmi_elements[@id = $excluded_ids]", mode="hmi_widgets"; | }