public Asset map(String path) { Asset asset = assetSource.getExpandedAsset(path); return asset; } };
public Asset map(String value) { return assetSource.getExpandedAsset(value); }
public Asset map(String path) { return assetSource.getExpandedAsset(path); } };
public List<Asset> getJavaScriptLibraries() { final List<Asset> javaScriptStack = new ArrayList<Asset>(); javaScriptStack.add(assetSource.getExpandedAsset("${assets.path}/components/slider/slider.js")); javaScriptStack.add(assetSource.getExpandedAsset("${jquery.ui.path}/jquery.ui.mouse.js")); javaScriptStack.add(assetSource.getExpandedAsset("${jquery.ui.path}/jquery.ui.slider.js")); return javaScriptStack; }
public List<Asset> getJavaScriptLibraries() { final List<Asset> javaScriptStack = new ArrayList<Asset>(); javaScriptStack.add(assetSource.getExpandedAsset("${assets.path}/mixins/confirm/confirm.js")); return javaScriptStack; }
public List<Asset> getJavaScriptLibraries() { String jQueryUIPath = symbolSource.valueForSymbol(JQuerySymbolConstants.JQUERY_UI_PATH); if ( ! jQueryUIPath.endsWith("/")) { jQueryUIPath += "/"; } final List<Asset> javaScriptStack = new ArrayList<Asset>(); javaScriptStack.add(assetSource.getClasspathAsset(String.format("%s/datepicker.js", jQueryUIPath))); final Asset datePickerI18nAsset = getLocaleAsset(threadLocale.getLocale(), jQueryUIPath); if (includeDatePickerI18N && datePickerI18nAsset != null) { javaScriptStack.add(datePickerI18nAsset); } javaScriptStack.add(assetSource.getExpandedAsset("${assets.path}/components/datefield/datefield.js")); return javaScriptStack; }
public Asset getAsset(Asset original) { if(javaScriptFilesConfiguration.containsKey(original.getResource().getFile())) { String assetPath = javaScriptFilesConfiguration.get(original.getResource().getFile()); return InternalUtils.isBlank(assetPath) ? null : this.as.getExpandedAsset(assetPath); } return original; } }
public void advise(MethodInvocation invocation) { String path = (annotation!=null && InternalUtils.isNonBlank(annotation.theme())) ? annotation.theme() : themePath; javaScriptSupport.importStylesheet(assetSource.getExpandedAsset(path)); if(mouseWheelIncluded) javaScriptSupport.require("vendor/jquerymousewheel"); invocation.proceed(); } });
@Test public void get_expanded_asset() { AssetFactory factory = mockAssetFactory(); Asset asset = mockAsset(); SymbolSource symbolSource = mockSymbolSource(); Resource expectedResource = baseResource.forFile("SimpleComponent.properties"); train_getRootResource(factory, rootResource); train_createAsset(factory, expectedResource, asset); train_expandSymbols(symbolSource, "${path}/SimpleComponent.properties", "org/apache/tapestry5/internal/services/SimpleComponent.properties"); Map<String, AssetFactory> configuration = Collections.singletonMap("classpath", factory); replay(); AssetSource source = new AssetSourceImpl(null, configuration, symbolSource, null, tracker); // First try creates it: assertSame(source.getExpandedAsset("${path}/SimpleComponent.properties"), asset); verify(); }