/** * Includes the js and css resources for the dashboard macro. * * @param editMode whether the dashboard is in edit mode or not (js resources need to be loaded only in edit mode) */ protected void includeResources(boolean editMode) { Map<String, Object> fxParamsForceSkinAction = new HashMap<String, Object>(); fxParamsForceSkinAction.put("forceSkinAction", true); this.ssfx.use("uicomponents/dashboard/dashboard.css", fxParamsForceSkinAction); // include the js resources, for editing, in edit mode only if (editMode) { // include the effects.js and dragdrop.js that are needed by the dashboard js this.jsfx.use("js/scriptaculous/effects.js"); this.jsfx.use("js/scriptaculous/dragdrop.js"); this.jsfx.use("uicomponents/dashboard/dashboard.js", fxParamsForceSkinAction); } }
private void activeJSX(IconSet iconSet) { jsExtension.use(iconSet.getJsx()); } }
private void activeSSX(IconSet iconSet) { skinExtension.use(iconSet.getSsx()); }
private void activeCSS(IconSet iconSet) throws IconException { String url = velocityRenderer.render(iconSet.getCss()); Map<String, Object> parameters = new HashMap(); parameters.put("rel", "stylesheet"); linkExtension.use(url, parameters); }
private void use(Object value) { SkinExtensionInfo info = (SkinExtensionInfo) value; // Find the right skin extension SkinExtension skinExtension; try { skinExtension = this.componentManager.getInstance(SkinExtension.class, info.getType()); } catch (ComponentLookupException e) { this.logger.error("Failed to load the skin extension with type [{}]", info.getType(), e); return; } // Inject the skin extension if (info.getParameters() != null) { skinExtension.use(info.getResource(), info.getParameters()); } else { skinExtension.use(info.getResource()); } }
skinxParams.put("forceSkinAction", true); ssfx.use("uicomponents/container/columns.css", skinxParams);