1- using System . Collections . Generic ;
2- using System . Linq ;
1+ using System . Linq ;
32using WebExpress . WebApp . WebControl ;
43using WebExpress . WebCore . Internationalization ;
54using WebExpress . WebCore . WebComponent ;
@@ -77,25 +76,28 @@ public VisualTreeWebApp(IComponentHub componentHub, IPageContext pageContext)
7776 : base ( componentHub , pageContext )
7877 {
7978 var applicationContext = pageContext ? . ApplicationContext ;
79+ var baseUri = RouteEndpoint . Combine ( applicationContext ? . Route , "assets" ) ;
8080
8181 Header . Fixed = TypeFixed . Top ;
82- Header . Styles = new List < string > ( [ "position: sticky; top: 0; z-index: 99;" ] ) ;
82+ Header . Styles = [ "position: sticky; top: 0; z-index: 99;" ] ;
8383
8484 Breadcrumb . Uri = pageContext ? . Route . ToUri ( ) ;
8585 Breadcrumb . Margin = new PropertySpacingMargin ( PropertySpacing . Space . Null ) ;
8686 Content . Margin = new PropertySpacingMargin ( PropertySpacing . Space . Two , PropertySpacing . Space . None , PropertySpacing . Space . None , PropertySpacing . Space . None ) ;
8787
88- AddCssLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "/assets/css/webexpress.webapp.css" ) ) ;
89- AddCssLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "/assets/css/webexpress.webapp.popupnotification.css" ) ) ;
90- AddCssLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "/assets/css/webexpress.webapp.table.css" ) ) ;
91- AddCssLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "/assets/css/webexpress.webapp.taskprogressbar.css" ) ) ;
92- AddCssLink ( Theme ? . ThemeStyle . ToString ( ) ?? RouteEndpoint . Combine ( applicationContext ? . Route , "/assets/css/webexpress.webapp.theme.css" ) ) ;
93- AddHeaderScriptLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "assets/js/webexpress.webapp.js" ) ) ;
94- AddHeaderScriptLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "assets/js/webexpress.webapp.popupnotification.js" ) ) ;
95- AddHeaderScriptLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "assets/js/webexpress.webapp.selection.js" ) ) ;
96- AddHeaderScriptLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "assets/js/webexpress.webapp.modalform.js" ) ) ;
97- AddHeaderScriptLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "assets/js/webexpress.webapp.table.js" ) ) ;
98- AddHeaderScriptLink ( RouteEndpoint . Combine ( applicationContext ? . Route , "assets/js/webexpress.webapp.taskprogressbar.js" ) ) ;
88+ AddCssLink ( RouteEndpoint . Combine ( baseUri , "css/webexpress.webapp.css" ) ) ;
89+ AddCssLink ( RouteEndpoint . Combine ( baseUri , "css/webexpress.webapp.popupnotification.css" ) ) ;
90+ AddCssLink ( RouteEndpoint . Combine ( baseUri , "css/webexpress.webapp.table.css" ) ) ;
91+ AddCssLink ( RouteEndpoint . Combine ( baseUri , "css/webexpress.webapp.taskprogressbar.css" ) ) ;
92+ AddCssLink ( Theme ? . ThemeStyle . ToString ( ) ?? RouteEndpoint . Combine ( baseUri , "css/webexpress.webapp.theme.css" ) ) ;
93+ AddHeaderLanguageLink ( RouteEndpoint . Combine ( baseUri , "js/i18n/en.js" ) ) ;
94+ AddHeaderLanguageLink ( RouteEndpoint . Combine ( baseUri , "js/i18n/de.js" ) ) ;
95+ AddHeaderScriptLink ( RouteEndpoint . Combine ( baseUri , "js/webexpress.webapp.js" ) ) ;
96+ AddHeaderScriptLink ( RouteEndpoint . Combine ( baseUri , "js/webexpress.webapp.popupnotification.js" ) ) ;
97+ AddHeaderScriptLink ( RouteEndpoint . Combine ( baseUri , "assets/js/webexpress.webapp.selection.js" ) ) ;
98+ AddHeaderScriptLink ( RouteEndpoint . Combine ( baseUri , "js/webexpress.webapp.modalform.js" ) ) ;
99+ AddHeaderScriptLink ( RouteEndpoint . Combine ( baseUri , "js/webexpress.webapp.table.js" ) ) ;
100+ AddHeaderScriptLink ( RouteEndpoint . Combine ( baseUri , "js/webexpress.webapp.taskprogressbar.js" ) ) ;
99101 }
100102
101103 /// <summary>
@@ -115,7 +117,8 @@ public override IHtmlNode Render(IVisualTreeContext context)
115117 html . Head . Meta = Meta ;
116118 html . Head . Scripts = HeaderScripts ;
117119 html . Head . CssLinks = CssLinks . Where ( x => x != null ) . Select ( x => x . ToString ( ) ) ;
118- html . Head . ScriptLinks = HeaderScriptLinks ? . Where ( x => x != null ) . Select ( x => x . ToString ( ) ) ;
120+ html . Head . ScriptLinks = HeaderLanguageLinks ? . Where ( x => x != null ) . Select ( x => x . ToString ( ) )
121+ . Union ( HeaderScriptLinks ? . Where ( x => x != null ) . Select ( x => x . ToString ( ) ) ) ;
119122
120123 // header
121124 Header . AppTitle . Text = html . Head . Title ;
0 commit comments