added bootstrap webjar

This commit is contained in:
Athou
2014-03-03 11:33:44 +01:00
parent 840bc2ef7a
commit 464ac36ddb
8 changed files with 27 additions and 29 deletions

View File

@@ -398,6 +398,11 @@
<artifactId>jquery</artifactId>
<version>1.11.0</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.1.1</version>
</dependency>
<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery-mousewheel</artifactId>

View File

@@ -0,0 +1,18 @@
package com.commafeed.frontend.resources;
import ro.isdc.wro.model.resource.processor.impl.css.CssUrlRewritingProcessor;
public class CustomCssUrlRewritingProcessor extends CssUrlRewritingProcessor {
/**
* ignore webjar image replacements since they won't be available at runtime anyway
*/
@Override
protected String replaceImageUrl(String cssUri, String imageUrl) {
if (cssUri.startsWith("webjar:")) {
return imageUrl;
}
return super.replaceImageUrl(cssUri, imageUrl);
}
}

View File

@@ -20,6 +20,7 @@ public class WroAdditionalProvider implements ProcessorProvider {
map.put("sassOnlyProcessor", new SassOnlyProcessor());
map.put("sassImport", new SassImportProcessor());
map.put("timestamp", new TimestampProcessor());
map.put("cssUrlRewriting", new CustomCssUrlRewritingProcessor());
return map;
}

View File

@@ -16,6 +16,7 @@ public class WroManagerFactory extends ConfigurableWroManagerFactory {
map.put("sassOnlyProcessor", new SassOnlyProcessor());
map.put("sassImport", new SassImportProcessor());
map.put("timestamp", new TimestampProcessor());
map.put("cssUrlRewriting", new CustomCssUrlRewritingProcessor());
}
}

View File

@@ -10,8 +10,8 @@
<js>/vendor/jqueryui/*.js</js>
<css>/vendor/jqueryui/*.css</css>
<js>/vendor/bootstrap/*.js</js>
<css>/vendor/bootstrap/*.css</css>
<js>webjar:bootstrap.min.js</js>
<css>webjar:bootstrap.min.css</css>
<css>/vendor/fontawesome/css/*.css</css>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long