Quitada librería con tema bootstrap.
Añadida libería con todos los temas para primefaces 7. Añadido selector de tema en la pantalla home.
This commit is contained in:
26
1.sources/MyHealth/src/managedbean/common/CurrentTheme.java
Normal file
26
1.sources/MyHealth/src/managedbean/common/CurrentTheme.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package managedbean.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import javax.annotation.ManagedBean;
|
||||
import javax.enterprise.context.SessionScoped;
|
||||
|
||||
@ManagedBean
|
||||
@SessionScoped
|
||||
public class CurrentTheme implements Serializable {
|
||||
|
||||
private Theme currentTheme;
|
||||
|
||||
public CurrentTheme() {
|
||||
}
|
||||
|
||||
public Theme getCurrentTheme() {
|
||||
return currentTheme;
|
||||
}
|
||||
|
||||
public void setCurrentTheme(Theme currentTheme) {
|
||||
this.currentTheme = currentTheme;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
46
1.sources/MyHealth/src/managedbean/common/Theme.java
Normal file
46
1.sources/MyHealth/src/managedbean/common/Theme.java
Normal file
@@ -0,0 +1,46 @@
|
||||
package managedbean.common;
|
||||
|
||||
public class Theme {
|
||||
|
||||
private int id;
|
||||
private String displayName;
|
||||
private String name;
|
||||
|
||||
public Theme() {
|
||||
}
|
||||
|
||||
public Theme(int id, String displayName, String name) {
|
||||
this.id = id;
|
||||
this.displayName = displayName;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getDisplayName() {
|
||||
return displayName;
|
||||
}
|
||||
|
||||
public void setDisplayName(String displayName) {
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
53
1.sources/MyHealth/src/managedbean/common/ThemeService.java
Normal file
53
1.sources/MyHealth/src/managedbean/common/ThemeService.java
Normal file
@@ -0,0 +1,53 @@
|
||||
package managedbean.common;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ThemeService {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String DEFAULT_THEME = "aristo";
|
||||
public static final List<Theme> THEMES = new ArrayList<Theme>() {
|
||||
{
|
||||
add(new Theme(1, "afterdark", "afterdark"));
|
||||
add(new Theme(2, "afternoon", "afternoon"));
|
||||
add(new Theme(3, "afterwork", "afterwork"));
|
||||
add(new Theme(4, "black-tie", "black-tie"));
|
||||
add(new Theme(5, "blitzer", "blitzer"));
|
||||
add(new Theme(6, "bluesky", "bluesky"));
|
||||
add(new Theme(7, "bootstrap", "bootstrap"));
|
||||
add(new Theme(8, "casablanca", "casablanca"));
|
||||
add(new Theme(9, "cruze", "cruze"));
|
||||
add(new Theme(10, "cupertino", "cupertino"));
|
||||
add(new Theme(11, "dark-hive", "dark-hive"));
|
||||
add(new Theme(12, "dot-luv", "dot-luv"));
|
||||
add(new Theme(13, "eggplant", "eggplant"));
|
||||
add(new Theme(14, "excite-bike", "excite-bike"));
|
||||
add(new Theme(15, "flick", "flick"));
|
||||
add(new Theme(16, "glass-x", "glass-x"));
|
||||
add(new Theme(17, "home", "home"));
|
||||
add(new Theme(18, "hot-sneaks", "hot-sneaks"));
|
||||
add(new Theme(19, "humanity", "humanity"));
|
||||
add(new Theme(20, "le-frog", "le-frog"));
|
||||
add(new Theme(21, "midnight", "midnight"));
|
||||
add(new Theme(22, "mint-choc", "mint-choc"));
|
||||
add(new Theme(23, "overcast", "overcast"));
|
||||
add(new Theme(24, "pepper-grinder", "pepper-grinder"));
|
||||
add(new Theme(25, "redmond", "redmond"));
|
||||
add(new Theme(26, "rocket", "rocket"));
|
||||
add(new Theme(27, "sam", "sam"));
|
||||
add(new Theme(28, "smoothness", "smoothness"));
|
||||
add(new Theme(29, "south-street", "south-street"));
|
||||
add(new Theme(30, "start", "start"));
|
||||
add(new Theme(31, "sunny", "sunny"));
|
||||
add(new Theme(32, "swanky-purse", "swanky-purse"));
|
||||
add(new Theme(33, "trontastic", "trontastic"));
|
||||
add(new Theme(34, "ui-darkness", "ui-darkness"));
|
||||
add(new Theme(35, "ui-lightness", "ui-lightness"));
|
||||
add(new Theme(36, "vader", "vader"));
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -1,9 +1,11 @@
|
||||
package managedbean.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import javax.enterprise.context.RequestScoped;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
/***
|
||||
@@ -23,6 +25,10 @@ public class homeMBean implements Serializable {
|
||||
isLogedIn = SessionUtils.isLogedIn();
|
||||
}
|
||||
|
||||
public List<Theme> getThemes() {
|
||||
return ThemeService.THEMES;
|
||||
}
|
||||
|
||||
public boolean isLogedIn() {
|
||||
return this.isLogedIn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user