-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
christopher-szu
committed
Nov 10, 2015
1 parent
77278fb
commit 5086b6d
Showing
6 changed files
with
734 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
src/main/java/org/zkoss/theme/atlantic/AtlanticEEThemeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.zkoss.theme.atlantic; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.zkoss.html.StyleSheet; | ||
import org.zkoss.lang.Library; | ||
import org.zkoss.zk.ui.Execution; | ||
import org.zkoss.zkmax.theme.StandardThemeProvider; | ||
|
||
public class AtlanticEEThemeProvider extends StandardThemeProvider { | ||
|
||
/** Library property key. */ | ||
private static final String DONT_USE_GOOGLE_FONT = "org.zkoss.theme.atlantic.useGoogleFont.disabled"; | ||
|
||
@Override | ||
public Collection<Object> getThemeURIs(Execution exec, List<Object> uris) { | ||
if (!Boolean.parseBoolean(Library.getProperty(DONT_USE_GOOGLE_FONT))) { //false by default | ||
//ZK-2931 can't start the url with "//", encodeURL will prepend | ||
//current context path if no scheme were given | ||
uris.add(new StyleSheet(exec.getScheme() + "://fonts.googleapis.com/css?family=Open+Sans", "text/css")); | ||
} | ||
return super.getThemeURIs(exec, uris); | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/org/zkoss/theme/atlantic/AtlanticPEThemeProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package org.zkoss.theme.atlantic; | ||
|
||
import java.util.Collection; | ||
import java.util.List; | ||
|
||
import org.zkoss.html.StyleSheet; | ||
import org.zkoss.lang.Library; | ||
import org.zkoss.zk.ui.Execution; | ||
import org.zkoss.zkex.theme.StandardThemeProvider; | ||
|
||
public class AtlanticPEThemeProvider extends StandardThemeProvider { | ||
|
||
/** Library property key. */ | ||
private static final String DONT_USE_GOOGLE_FONT = "org.zkoss.theme.atlantic.useGoogleFont.disabled"; | ||
|
||
@Override | ||
public Collection<Object> getThemeURIs(Execution exec, List<Object> uris) { | ||
if (!Boolean.parseBoolean(Library.getProperty(DONT_USE_GOOGLE_FONT))) { //false by default | ||
//ZK-2931 can't start the url with "//", encodeURL will prepend | ||
//current context path if no scheme were given | ||
uris.add(new StyleSheet(exec.getScheme() + "://fonts.googleapis.com/css?family=Open+Sans", "text/css")); | ||
} | ||
return super.getThemeURIs(exec, uris); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.