-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #401 from l0rdn1kk0n/issue_349
- Loading branch information
Showing
45 changed files
with
104 additions
and
556 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,13 +6,22 @@ | |
import org.apache.wicket.util.string.Strings; | ||
|
||
import java.util.ArrayList; | ||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
/** | ||
* # Description | ||
* | ||
* A default {@link ThemeProvider} implementation that only contains | ||
* the {@link de.agilecoders.wicket.core.markup.html.themes.bootstrap.BootstrapTheme}. | ||
* | ||
* @author miha | ||
* # Usage | ||
* | ||
* ```java | ||
* settings.setThemeProvider(new DefaultThemeProvider(settings)); | ||
* ``` | ||
* | ||
* @author Michael Haitz <[email protected]> | ||
*/ | ||
public class DefaultThemeProvider implements ThemeProvider { | ||
|
||
|
@@ -106,7 +115,7 @@ public DefaultThemeProvider defaultTheme(final ITheme theme) { | |
public DefaultThemeProvider defaultTheme(final String themeName) { | ||
ITheme newDefaultTheme = byName(themeName); | ||
|
||
if (defaultTheme != newDefaultTheme) { | ||
if (newDefaultTheme != null && !newDefaultTheme.equals(defaultTheme)) { | ||
defaultTheme = newDefaultTheme; | ||
} | ||
|
||
|
@@ -128,7 +137,7 @@ public ITheme byName(String name) { | |
|
||
@Override | ||
public List<ITheme> available() { | ||
return new ArrayList<ITheme>(themes); | ||
return Collections.unmodifiableList(themes); | ||
} | ||
|
||
@Override | ||
|
26 changes: 0 additions & 26 deletions
26
...mes/src/main/java/de/agilecoders/wicket/themes/markup/html/bootstrap/Bootstrap3Theme.java
This file was deleted.
Oops, something went wrong.
47 changes: 0 additions & 47 deletions
47
.../java/de/agilecoders/wicket/themes/markup/html/bootstrap/Bootstrap3ThemeCssReference.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.