public static void addCSSAndJS (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final HCSpecialNodes aSpecialNodes) { ValueEnforcer.notNull (aRequestScope, "RequestScope"); // Grab per-request CSS/JS only in success case! // Grab all CSS/JS independent of conditional comment :( final boolean bRegular = HCSettings.isUseRegularResources (); for (final ICSSPathProvider aCSS : PhotonCSS.getAllRegisteredCSSIncludesForThisRequest ()) aSpecialNodes.addExternalCSS (aCSS.getMediaList (), PhotonHTMLSettings.getCSSPath (aRequestScope, aCSS, bRegular) .getAsStringWithEncodedParameters ()); for (final IJSPathProvider aJS : PhotonJS.getAllRegisteredJSIncludesForThisRequest ()) aSpecialNodes.addExternalJS (PhotonHTMLSettings.getJSPath (aRequestScope, aJS, bRegular) .getAsStringWithEncodedParameters ()); }
/** * Add all global and per-request CSS and JS includes to the HTML page. * * @param aRequestScope * Current request scope. Never <code>null</code>. * @param aHtml * The current HTML object. Never <code>null</code>. */ @OverrideOnDemand protected void addGlobalAndPerRequestCSSAndJS (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope, @Nonnull final HCHtml aHtml) { final boolean bRegular = HCSettings.isUseRegularResources (); final HCHead aHead = aHtml.head (); // Add configured and per-request CSS final ICommonsOrderedSet <ICSSPathProvider> aCSSs = PhotonCSS.getAllRegisteredCSSIncludesForGlobal (); PhotonCSS.getAllRegisteredCSSIncludesForThisRequest (aCSSs); // Add each CSS separately for (final ICSSPathProvider aCSS : aCSSs) aHead.addCSS (PhotonHTMLHelper.getCSSNode (aRequestScope, aCSS, bRegular)); // Add all configured and per-request JS final ICommonsOrderedSet <IJSPathProvider> aJSs = PhotonJS.getAllRegisteredJSIncludesForGlobal (); PhotonJS.getAllRegisteredJSIncludesForThisRequest (aJSs); // Add each JS separately for (final IJSPathProvider aJS : aJSs) aHead.addJS (PhotonHTMLHelper.getJSNode (aRequestScope, aJS, bRegular)); }
final boolean bRegular = HCSettings.isUseRegularResources ();
HCSettings.isScriptsInBody ()); final boolean bUseRegularResources = aWPEC.params ().isCheckBoxChecked (FIELD_USE_REGULAR_RESOURCES, HCSettings.isUseRegularResources ()); aForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_USE_REGULAR_RESOURCES.getDisplayText (aDisplayLocale)) .setCtrl (new BootstrapCheckBox (new RequestFieldBoolean (FIELD_USE_REGULAR_RESOURCES, HCSettings.isUseRegularResources ()))));
final boolean bUseRegularResources = aWPEC.params () .isCheckBoxChecked (FIELD_USE_REGULAR_RESOURCES, HCSettings.isUseRegularResources ()); aForm.addFormGroup (new BootstrapFormGroup ().setLabel (EText.MSG_USE_REGULAR_RESOURCES.getDisplayText (aDisplayLocale)) .setCtrl (new HCCheckBox (new RequestFieldBoolean (FIELD_USE_REGULAR_RESOURCES, HCSettings.isUseRegularResources ()))));