made server gui work and auto generate xml imports
This commit is contained in:
parent
01b3b5cc54
commit
c259e28e44
69 changed files with 1669 additions and 1230 deletions
|
|
@ -208,36 +208,4 @@ public class VascMenuControllerImpl implements VascMenuControllerLocal,VascMenuC
|
|||
Collections.sort(result,vascMenuWebComparator);
|
||||
return result;
|
||||
}
|
||||
|
||||
private List<VascMenuWeb> getMenuFiltered(VascMenuWebType type) {
|
||||
return getFilteredMenuWeb(type);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMenuBarLeft() {
|
||||
return getMenuFiltered(VascMenuWebType.BAR_LEFT);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMenuBarRight() {
|
||||
return getMenuFiltered(VascMenuWebType.BAR_RIGHT);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMenuBarBottom() {
|
||||
return getMenuFiltered(VascMenuWebType.BAR_BOTTOM);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMenuPageIndex() {
|
||||
return getMenuFiltered(VascMenuWebType.PAGE_INDEX);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMenuPageUserLeft() {
|
||||
return getMenuFiltered(VascMenuWebType.PAGE_USER_LEFT);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMenuPageUserRight() {
|
||||
return getMenuFiltered(VascMenuWebType.PAGE_USER_RIGHT);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMenuPageAdmin() {
|
||||
return getMenuFiltered(VascMenuWebType.PAGE_ADMIN);
|
||||
}
|
||||
}
|
||||
|
|
@ -34,6 +34,10 @@ public enum VascMenuWebType {
|
|||
BAR_RIGHT,
|
||||
BAR_BOTTOM,
|
||||
|
||||
MAIN_MENU_0,
|
||||
MAIN_MENU_1,
|
||||
MAIN_MENU_2,
|
||||
|
||||
PAGE_INDEX,
|
||||
PAGE_USER_LEFT,
|
||||
PAGE_USER_RIGHT,
|
||||
|
|
|
|||
|
|
@ -23,23 +23,13 @@
|
|||
package net.forwardfire.vasc.demo.tech.web.beans;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.ejb.EJB;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
import javax.naming.NamingException;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import net.forwardfire.vasc.demo.tech.ejb3.menu.VascMenuController;
|
||||
import net.forwardfire.vasc.demo.tech.ejb3.menu.model.VascMenuGroup;
|
||||
import net.forwardfire.vasc.demo.tech.ejb3.menu.model.VascMenuWebComparator;
|
||||
import net.forwardfire.vasc.demo.tech.ejb3.menu.model.VascMenuWeb;
|
||||
import net.forwardfire.vasc.demo.tech.ejb3.menu.model.VascMenuWebType;
|
||||
|
||||
|
|
@ -52,7 +42,6 @@ import net.forwardfire.vasc.demo.tech.ejb3.menu.model.VascMenuWebType;
|
|||
public class MenuController implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6820749860984575869L;
|
||||
private List<VascMenuWeb> userVascMenu = null;
|
||||
private UserController userController = null;
|
||||
private VascMenuController vascMenuController = null;
|
||||
|
||||
|
|
@ -108,6 +97,17 @@ public class MenuController implements Serializable {
|
|||
return getMenuFiltered(VascMenuWebType.PAGE_ADMIN);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMainMenu0() {
|
||||
return getMenuFiltered(VascMenuWebType.MAIN_MENU_0);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMainMenu1() {
|
||||
return getMenuFiltered(VascMenuWebType.MAIN_MENU_1);
|
||||
}
|
||||
|
||||
public List<VascMenuWeb> getMainMenu2() {
|
||||
return getMenuFiltered(VascMenuWebType.MAIN_MENU_2);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the userController
|
||||
|
|
|
|||
|
|
@ -23,24 +23,34 @@
|
|||
package net.forwardfire.vasc.demo.tech.web.pages;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Method;
|
||||
import java.sql.Connection;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.naming.Context;
|
||||
import javax.naming.InitialContext;
|
||||
import javax.naming.NamingException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import net.forwardfire.vasc.demo.tech.ejb3.menu.model.VascMenuWebComparator;
|
||||
import de.tudarmstadt.ukp.wikipedia.parser.ParsedPage;
|
||||
import de.tudarmstadt.ukp.wikipedia.parser.Section;
|
||||
import de.tudarmstadt.ukp.wikipedia.parser.html.HtmlWriter;
|
||||
import de.tudarmstadt.ukp.wikipedia.parser.mediawiki.MediaWikiParser;
|
||||
import de.tudarmstadt.ukp.wikipedia.parser.mediawiki.MediaWikiParserFactory;
|
||||
|
||||
import net.forwardfire.vasc.demo.tech.web.beans.UserController;
|
||||
import net.forwardfire.vasc.demo.tech.web.pages.model.VascPage;
|
||||
import net.forwardfire.vasc.demo.tech.web.pages.model.VascPagePart;
|
||||
import net.forwardfire.vasc.demo.tech.web.pages.model.VascPagePartType;
|
||||
|
||||
/**
|
||||
* MenuController Shows the menu for the user.
|
||||
* VascPageController very hacky page context controller.
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 May 19, 2012
|
||||
|
|
@ -48,40 +58,32 @@ import net.forwardfire.vasc.demo.tech.web.beans.UserController;
|
|||
public class VascPageController implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = -6820749860984575869L;
|
||||
//private List<VascMenu> userVascMenu = null;
|
||||
//private VascMenuComparator vascMenuComparator = null;
|
||||
private UserController userController = null;
|
||||
private VascPage page = null;
|
||||
|
||||
/*
|
||||
public List<VascMenu> fetchVascPage() {
|
||||
|
||||
vascMenuComparator = new VascMenuComparator();
|
||||
userVascMenu = new ArrayList<VascMenu>(50);
|
||||
|
||||
|
||||
|
||||
public VascPage fetchVascPage(String slug) {
|
||||
VascPage result = null;
|
||||
Connection connection = null;
|
||||
try {
|
||||
DataSource ds = getDataSource("java:comp/env/jdbc/DemoManagerDataDS");
|
||||
connection = ds.getConnection();
|
||||
Statement s = connection.createStatement();
|
||||
s.execute("SELECT * FROM VASC_MENU");
|
||||
s.execute("SELECT * FROM VASC_PAGE WHERE SLUG='"+slug+"'"); // bad so redo ..
|
||||
ResultSet rs = s.getResultSet();
|
||||
//int cols = rs.getMetaData().getColumnCount();
|
||||
while (rs.next()) {
|
||||
VascMenu menu = new VascMenu();
|
||||
menu.setId(rs.getInt(1));
|
||||
menu.setHref(rs.getString(2));
|
||||
menu.setTitle(rs.getString(3));
|
||||
menu.setTarget(rs.getString(4));
|
||||
menu.setActive(rs.getBoolean(5));
|
||||
menu.setRoles(rs.getString(6));
|
||||
if (rs.next()) {
|
||||
result = new VascPage();
|
||||
result.setId(rs.getInt(1));
|
||||
result.setSlug(rs.getString(2));
|
||||
result.setTitle(rs.getString(3));
|
||||
result.setActive(rs.getBoolean(4));
|
||||
result.setSitemap(rs.getBoolean(5));
|
||||
result.setRoles(rs.getString(6));
|
||||
/*
|
||||
menu.setMenuOrder(rs.getInt(7));
|
||||
menu.setMenuType(VascMenuType.valueOf(rs.getString(8)));
|
||||
if (filterVascMenuRoles(menu)==false) {
|
||||
continue;
|
||||
}
|
||||
userVascMenu.add(menu);
|
||||
}*/
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
|
@ -93,8 +95,48 @@ public class VascPageController implements Serializable {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
return userVascMenu;
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<VascPagePart> fetchVascPageParts(int pageId) {
|
||||
List<VascPagePart> result = new ArrayList<VascPagePart>(50);
|
||||
Connection connection = null;
|
||||
try {
|
||||
DataSource ds = getDataSource("java:comp/env/jdbc/DemoManagerDataDS");
|
||||
connection = ds.getConnection();
|
||||
Statement s = connection.createStatement();
|
||||
s.execute("SELECT * FROM VASC_PAGE_PART WHERE PAGE_ID="+pageId); // bad
|
||||
ResultSet rs = s.getResultSet();
|
||||
while (rs.next()) {
|
||||
VascPagePart menu = new VascPagePart();
|
||||
menu.setId(rs.getInt(1));
|
||||
menu.setPageId(rs.getInt(2));
|
||||
menu.setTitle(rs.getString(3));
|
||||
menu.setText(rs.getString(4));
|
||||
menu.setActive(rs.getBoolean(5));
|
||||
menu.setSitemap(rs.getBoolean(6));
|
||||
menu.setPartOrder(rs.getInt(7));
|
||||
menu.setPartType(VascPagePartType.valueOf(rs.getString(8)));
|
||||
menu.setRoles(rs.getString(9));
|
||||
/*
|
||||
menu.setMenuOrder(rs.getInt(7));
|
||||
menu.setMenuType(VascMenuType.valueOf(rs.getString(8)));
|
||||
if (filterVascMenuRoles(menu)==false) {
|
||||
continue;
|
||||
}*/
|
||||
result.add(menu);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
if (connection!=null) {
|
||||
try {
|
||||
connection.close();
|
||||
} catch (Exception e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
private DataSource getDataSource(String name) throws SQLException {
|
||||
|
|
@ -110,6 +152,7 @@ public class VascPageController implements Serializable {
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
private boolean filterVascMenuRoles(VascMenu menu) {
|
||||
if (menu.getActive()!=null && menu.getActive()==false) {
|
||||
return false;
|
||||
|
|
@ -127,30 +170,100 @@ public class VascPageController implements Serializable {
|
|||
}
|
||||
return true;
|
||||
}
|
||||
*/
|
||||
|
||||
private List<VascMenu> getMenuFiltered(VascMenuType type) {
|
||||
if (type==null) {
|
||||
throw new NullPointerException("Can't filter on null type.");
|
||||
public VascPage getPage() {
|
||||
|
||||
FacesContext context = FacesContext.getCurrentInstance();
|
||||
String pageId = (String)((ServletRequest)context.getExternalContext().getRequest()).getAttribute("pageId");
|
||||
|
||||
if (pageId==null) {
|
||||
return null; // todo send somewhere
|
||||
}
|
||||
List<VascMenu> result = new ArrayList<VascMenu>(15);
|
||||
for (VascMenu menu:fetchVascMenu()) {
|
||||
if (type.equals(menu.getMenuType())) {
|
||||
result.add(menu);
|
||||
if (page!=null && page.getSlug().equals(pageId)) {
|
||||
return page;
|
||||
}
|
||||
|
||||
page = fetchVascPage(pageId);
|
||||
page.getPageParts().addAll(fetchVascPageParts(page.getId()));
|
||||
|
||||
return page;
|
||||
}
|
||||
|
||||
public String renderContent(VascPagePart part) {
|
||||
if (part==null) {
|
||||
return "";
|
||||
}
|
||||
if (VascPagePartType.HTML.equals(part.getPartType())) {
|
||||
return part.getText();
|
||||
} else if (VascPagePartType.PRE.equals(part.getPartType())) {
|
||||
return "<pre>"+part.getText()+"</pre>\n";
|
||||
} else {
|
||||
MediaWikiParserFactory pf = new MediaWikiParserFactory();
|
||||
MediaWikiParser parser = pf.createParser();
|
||||
ParsedPage page = parser.parse(part.getText());
|
||||
String result = FixedHtmlWriter.parsedPageToHtml(page);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
static class FixedHtmlWriter extends HtmlWriter {
|
||||
public static String parsedPageToHtml( ParsedPage pp ){
|
||||
StringBuilder result = new StringBuilder();
|
||||
|
||||
if( pp != null ) {
|
||||
//Title
|
||||
result.append(
|
||||
"<table class=\"ParsedPage\">\n"+
|
||||
"<tr><th class=\"ParsedPage\">ParsedPage: \n" +
|
||||
pp.getName()+
|
||||
"</th></tr>\n");
|
||||
|
||||
//Sections
|
||||
result.append(
|
||||
"<tr><td class=\"ParsedPage\">\n" );
|
||||
for( Section s: pp.getSections() ) {
|
||||
result.append( invokePrivate("sectionToHtml",s));
|
||||
}
|
||||
result.append(
|
||||
"</td></tr>\n");
|
||||
|
||||
//Categories
|
||||
if( pp.getCategoryElement()!= null ){
|
||||
result.append("<tr><td class=\"ParsedPage\">\n");
|
||||
result.append("Categories:\n" + invokePrivate("contentElementToHtml",pp.getCategoryElement() ));
|
||||
result.append("</td></tr>\n");
|
||||
}
|
||||
|
||||
//Languages
|
||||
if( pp.getLanguagesElement()!= null ){
|
||||
result.append("<tr><td class=\"ParsedPage\">\n");
|
||||
result.append("Languages:\n" + invokePrivate("contentElementToHtml",pp.getLanguagesElement() ));
|
||||
result.append("</td></tr>\n");
|
||||
}
|
||||
|
||||
//Finalize
|
||||
result.append("</table>\n");
|
||||
}
|
||||
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
static private String invokePrivate(String method,Object arg) {
|
||||
for (Method m:FixedHtmlWriter.class.getDeclaredMethods()) {
|
||||
if (m.getName().equals(method)) {
|
||||
m.setAccessible(true);
|
||||
try {
|
||||
return (String)m.invoke(null, arg);
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
Collections.sort(result,vascMenuComparator);
|
||||
return result;
|
||||
}
|
||||
|
||||
public List<VascMenu> getMenuBarLeft() {
|
||||
return getMenuFiltered(VascMenuType.BAR_LEFT);
|
||||
}
|
||||
|
||||
public List<VascMenu> getMenuBarRight() {
|
||||
return getMenuFiltered(VascMenuType.BAR_RIGHT);
|
||||
}
|
||||
*/
|
||||
|
||||
/**
|
||||
* @return the userController
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,160 @@
|
|||
/*
|
||||
* Copyright 2009-2012 forwardfire.net All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without modification, are permitted provided
|
||||
* that the following conditions are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright notice, this list of conditions and the
|
||||
* following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and
|
||||
* the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
|
||||
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
|
||||
* THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
|
||||
* OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
|
||||
* TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
package net.forwardfire.vasc.demo.tech.web.pages;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import javax.faces.FactoryFinder;
|
||||
import javax.faces.application.ViewExpiredException;
|
||||
import javax.faces.component.UIViewRoot;
|
||||
import javax.faces.context.FacesContext;
|
||||
import javax.faces.context.FacesContextFactory;
|
||||
import javax.faces.lifecycle.Lifecycle;
|
||||
import javax.faces.lifecycle.LifecycleFactory;
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
||||
import javax.servlet.FilterConfig;
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
import javax.servlet.ServletRequest;
|
||||
import javax.servlet.ServletResponse;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
/**
|
||||
* VascPageServket
|
||||
*
|
||||
* @author Willem Cazander
|
||||
* @version 1.0 Nov 29, 2012
|
||||
*/
|
||||
public class VascPageFilter implements Filter {
|
||||
|
||||
|
||||
private Logger logger = null;
|
||||
private String templateFile = null;
|
||||
private ServletContext servletContext = null;
|
||||
|
||||
/**
|
||||
* @see javax.servlet.Filter#destroy()
|
||||
*/
|
||||
public void destroy() {
|
||||
servletContext = null;
|
||||
templateFile = null;
|
||||
logger = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.Filter#init(javax.servlet.FilterConfig)
|
||||
*/
|
||||
public void init(FilterConfig config) throws ServletException {
|
||||
logger = Logger.getLogger(VascPageFilter.class.getName());
|
||||
servletContext = config.getServletContext();
|
||||
templateFile = config.getInitParameter("templateFile");
|
||||
if (templateFile==null) {
|
||||
throw new ServletException("No templateFile init-param found.");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see javax.servlet.Filter#doFilter(javax.servlet.ServletRequest, javax.servlet.ServletResponse, javax.servlet.FilterChain)
|
||||
*/
|
||||
public void doFilter(ServletRequest servletRequest,ServletResponse servletResponse,FilterChain chain) throws IOException, ServletException {
|
||||
|
||||
HttpServletRequest request = (HttpServletRequest)servletRequest;
|
||||
HttpServletResponse response = (HttpServletResponse)servletResponse;
|
||||
|
||||
// request info
|
||||
String path = request.getRequestURI();
|
||||
String v = "/page/";
|
||||
if (path.contains(v)) {
|
||||
path = path.substring(path.indexOf(v)+v.length());
|
||||
}
|
||||
|
||||
// stuff to fill
|
||||
String pageId = null;
|
||||
String actionName = null;
|
||||
String actionRecordId = null;
|
||||
|
||||
// parse request info
|
||||
//path = path.substring(1); // rm /
|
||||
int index = path.indexOf("/"); // check next /
|
||||
String actionString = null;
|
||||
if (index>0) {
|
||||
actionString = path.substring(index+1);
|
||||
pageId = path.substring(0,index);
|
||||
} else {
|
||||
pageId = path;
|
||||
}
|
||||
|
||||
if (actionString!=null) {
|
||||
index = actionString.indexOf("/");
|
||||
String recordString = null;
|
||||
if (index>0) {
|
||||
recordString = actionString.substring(index+1);
|
||||
actionName = actionString.substring(0,index);
|
||||
} else {
|
||||
actionName = actionString;
|
||||
}
|
||||
if (recordString!=null) {
|
||||
actionRecordId = recordString;
|
||||
}
|
||||
}
|
||||
|
||||
//log
|
||||
if (logger.isLoggable(Level.FINE)) {
|
||||
logger.log(Level.FINE,"pageId="+pageId+" actionName="+actionName+" actionRecordId="+actionRecordId);
|
||||
}
|
||||
|
||||
// Acquire the FacesContext instance for this request
|
||||
FacesContext facesContext = FacesContext.getCurrentInstance();
|
||||
if (facesContext == null) {
|
||||
FacesContextFactory facesContextFactory = (FacesContextFactory)FactoryFinder.getFactory(FactoryFinder.FACES_CONTEXT_FACTORY);
|
||||
LifecycleFactory lifecycleFactory = (LifecycleFactory)FactoryFinder.getFactory(FactoryFinder.LIFECYCLE_FACTORY);
|
||||
Lifecycle lifecycle = lifecycleFactory.getLifecycle(LifecycleFactory.DEFAULT_LIFECYCLE);
|
||||
|
||||
facesContext = facesContextFactory.getFacesContext(servletContext, request, response, lifecycle);
|
||||
ProtectedFacesContext.setFacesContextAsCurrentInstance(facesContext);
|
||||
|
||||
UIViewRoot viewRoot = facesContext.getApplication().getViewHandler().createView(facesContext,pageId+actionName);
|
||||
facesContext.setViewRoot(viewRoot);
|
||||
}
|
||||
|
||||
// add to request attributes
|
||||
request.setAttribute("pageId", pageId);
|
||||
|
||||
// And dispatch to the vasc template file.
|
||||
try {
|
||||
request.getRequestDispatcher(templateFile).forward(request, response);
|
||||
} catch (ViewExpiredException e) {
|
||||
response.sendRedirect(request.getRequestURL().toString()); // lets try again
|
||||
}
|
||||
}
|
||||
|
||||
private abstract static class ProtectedFacesContext extends FacesContext {
|
||||
protected static void setFacesContextAsCurrentInstance(FacesContext facesContext) {
|
||||
FacesContext.setCurrentInstance(facesContext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,9 @@
|
|||
|
||||
package net.forwardfire.vasc.demo.tech.web.pages.model;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -35,10 +38,10 @@ public class VascPage {
|
|||
private Integer id = null;
|
||||
private String slug = null;
|
||||
private String title = null;
|
||||
private Boolean i18nKey = null;
|
||||
private Boolean active = null;
|
||||
private Boolean sitemap = null;
|
||||
private String roles = null;
|
||||
private List<VascPagePart> pageParts = new ArrayList<VascPagePart>();
|
||||
|
||||
/**
|
||||
* @return the id
|
||||
|
|
@ -81,20 +84,6 @@ public class VascPage {
|
|||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the i18nKey
|
||||
*/
|
||||
public Boolean getI18nKey() {
|
||||
return i18nKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param i18nKey the i18nKey to set
|
||||
*/
|
||||
public void setI18nKey(Boolean i18nKey) {
|
||||
this.i18nKey = i18nKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the active
|
||||
*/
|
||||
|
|
@ -119,7 +108,7 @@ public class VascPage {
|
|||
/**
|
||||
* @param sitemap the sitemap to set
|
||||
*/
|
||||
public void setSiteMap(Boolean sitemap) {
|
||||
public void setSitemap(Boolean sitemap) {
|
||||
this.sitemap = sitemap;
|
||||
}
|
||||
|
||||
|
|
@ -135,5 +124,19 @@ public class VascPage {
|
|||
*/
|
||||
public void setRoles(String roles) {
|
||||
this.roles = roles;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the pageParts
|
||||
*/
|
||||
public List<VascPagePart> getPageParts() {
|
||||
return pageParts;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param pageParts the pageParts to set
|
||||
*/
|
||||
public void setPageParts(List<VascPagePart> pageParts) {
|
||||
this.pageParts = pageParts;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,10 +33,9 @@ package net.forwardfire.vasc.demo.tech.web.pages.model;
|
|||
public class VascPagePart {
|
||||
|
||||
private Integer id = null;
|
||||
private VascPage vascPage = null;
|
||||
private Integer pageId = null;
|
||||
private String title = null;
|
||||
private String text = null;
|
||||
private Boolean i18nKey = null;
|
||||
private Boolean active = null;
|
||||
private Boolean sitemap = null;
|
||||
private Integer partOrder = null;
|
||||
|
|
@ -58,19 +57,19 @@ public class VascPagePart {
|
|||
}
|
||||
|
||||
/**
|
||||
* @return the vascPage
|
||||
* @return the pageId
|
||||
*/
|
||||
public VascPage getVascPage() {
|
||||
return vascPage;
|
||||
public Integer getPageId() {
|
||||
return pageId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param vascPage the vascPage to set
|
||||
* @param pageId the pageId to set
|
||||
*/
|
||||
public void setVascPage(VascPage vascPage) {
|
||||
this.vascPage = vascPage;
|
||||
public void setPageId(Integer pageId) {
|
||||
this.pageId = pageId;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the title
|
||||
*/
|
||||
|
|
@ -99,20 +98,6 @@ public class VascPagePart {
|
|||
this.text = text;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the i18nKey
|
||||
*/
|
||||
public Boolean getI18nKey() {
|
||||
return i18nKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param i18nKey the i18nKey to set
|
||||
*/
|
||||
public void setI18nKey(Boolean i18nKey) {
|
||||
this.i18nKey = i18nKey;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the active
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -45,6 +45,17 @@
|
|||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>Controls the Pages</description>
|
||||
<managed-bean-name>pageController</managed-bean-name>
|
||||
<managed-bean-class>net.forwardfire.vasc.demo.tech.web.pages.VascPageController</managed-bean-class>
|
||||
<managed-bean-scope>session</managed-bean-scope>
|
||||
<managed-property>
|
||||
<property-name>userController</property-name>
|
||||
<value>#{userController}</value>
|
||||
</managed-property>
|
||||
</managed-bean>
|
||||
|
||||
<managed-bean>
|
||||
<description>Controls Vasc Export Url Generator</description>
|
||||
<managed-bean-name>exportController</managed-bean-name>
|
||||
|
|
|
|||
|
|
@ -4,15 +4,17 @@
|
|||
xmlns:jawr="https://jawr.dev.java.net/jsf/facelets"
|
||||
>
|
||||
<ui:define name="page_title">
|
||||
<h:outputText value="#{vascPageController.pageTitle}" />
|
||||
<h:outputText value="#{pageController.page.title}" />
|
||||
</ui:define>
|
||||
<ui:insert name="main_head_js">
|
||||
<jawr:script src="/jawr/wiki.js" />
|
||||
</ui:insert>
|
||||
<ui:define name="page_content">
|
||||
<ui:repeat var="part" value="#{vascPageController.pageParts}">
|
||||
<ui:repeat var="part" value="#{pageController.page.pageParts}">
|
||||
<h2><h:outputText value="#{part.title}"/></h2>
|
||||
<h:outputText value="#{vascPageController.renderContent(part)}" escape="false"/>
|
||||
<p>
|
||||
<h:outputText value="#{pageController.renderContent(part)}" escape="false"/>
|
||||
</p>
|
||||
</ui:repeat>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
|
|
|
|||
|
|
@ -5,22 +5,24 @@
|
|||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
>
|
||||
<div id="body-footer">
|
||||
<div id="body-footer-text">
|
||||
<span><h:outputText value="#{i18n['Application.web.footer.center']}"/></span>
|
||||
</div>
|
||||
<div id="body-footer-menu">
|
||||
<span>
|
||||
<h:outputText value="- "/>
|
||||
<ui:repeat var="menuEntry" value="#{menuController.menuBarBottom}">
|
||||
<a href="#{contextPathController.rootPath}#{menuEntry.href}" title="#{menuEntry.title}" target="#{menuEntry.target}">#{menuEntry.title}</a><h:outputText value=" - "/>
|
||||
</ui:repeat>
|
||||
</span>
|
||||
</div>
|
||||
<div id="body-footer-copyright">
|
||||
<span><h:outputText escape="false" value="#{i18n['Application.web.footer.left']}"/></span>
|
||||
</div>
|
||||
<div id="body-footer-version">
|
||||
<span><h:outputText escape="false" value="#{i18n['Application.web.footer.right']}"/></span>
|
||||
<div id="body-footer-content">
|
||||
<div id="body-footer-text">
|
||||
<span><h:outputText value="#{i18n['Application.web.footer.center']}"/></span>
|
||||
</div>
|
||||
<div id="body-footer-menu">
|
||||
<span>
|
||||
<h:outputText value="- "/>
|
||||
<ui:repeat var="menuEntry" value="#{menuController.menuBarBottom}">
|
||||
<a href="#{contextPathController.rootPath}#{menuEntry.href}" title="#{menuEntry.title}" target="#{menuEntry.target}">#{menuEntry.title}</a><h:outputText value=" - "/>
|
||||
</ui:repeat>
|
||||
</span>
|
||||
</div>
|
||||
<div id="body-footer-copyright">
|
||||
<span><h:outputText escape="false" value="#{i18n['Application.web.footer.left']}"/></span>
|
||||
</div>
|
||||
<div id="body-footer-version">
|
||||
<span><h:outputText escape="false" value="#{i18n['Application.web.footer.right']}"/></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ui:composition>
|
||||
|
|
|
|||
|
|
@ -15,21 +15,5 @@
|
|||
<a href="#{contextPathController.rootPath}#{menuEntry.href}" title="#{menuEntry.title}" target="#{menuEntry.target}">#{menuEntry.title}</a>
|
||||
</ui:repeat>
|
||||
</div>
|
||||
<div id="page-header-info">
|
||||
<div id="page-header-info-body">
|
||||
<h:form>
|
||||
<h:outputLink rendered="#{facesContext.externalContext.isUserInRole('login') == false}" value="#{contextPathController.rootPath}/html/user/index.jsf">
|
||||
<h:outputText value="#{i18n['Application.web.header.login']}"/>
|
||||
</h:outputLink>
|
||||
<h:panelGroup rendered="#{facesContext.externalContext.isUserInRole('login') == true}">
|
||||
<h:commandLink actionListener="#{userController.logoutAction}">
|
||||
<h:outputText value="#{i18n['Application.web.header.logout']}"/>
|
||||
</h:commandLink>
|
||||
<h:outputText value=" - "/>
|
||||
<h:outputText value="#{userController.webUserName}"/>
|
||||
</h:panelGroup>
|
||||
</h:form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ui:composition>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
<ui:composition
|
||||
xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:ui="http://java.sun.com/jsf/facelets"
|
||||
xmlns:h="http://java.sun.com/jsf/html"
|
||||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
>
|
||||
<div id="page-body-login">
|
||||
<h:form>
|
||||
<h:outputLink rendered="#{facesContext.externalContext.isUserInRole('login') == false}" value="#{contextPathController.rootPath}/html/user/index.jsf">
|
||||
<h:outputText value="#{i18n['Application.web.header.login']}"/>
|
||||
</h:outputLink>
|
||||
<h:panelGroup rendered="#{facesContext.externalContext.isUserInRole('login') == true}">
|
||||
<h:commandLink actionListener="#{userController.logoutAction}">
|
||||
<h:outputText value="#{i18n['Application.web.header.logout']}"/>
|
||||
</h:commandLink>
|
||||
<h:outputText value=" - "/>
|
||||
<h:outputText value="#{userController.webUserName}"/>
|
||||
</h:panelGroup>
|
||||
</h:form>
|
||||
</div>
|
||||
</ui:composition>
|
||||
|
|
@ -5,17 +5,53 @@
|
|||
xmlns:f="http://java.sun.com/jsf/core"
|
||||
>
|
||||
<div id="body-deco-menu">
|
||||
<h:panelGroup rendered="#{not empty menuController.mainMenu0}">
|
||||
<div class="body-deco-menu-group">
|
||||
<h4>
|
||||
<span><h:outputText value="#{i18n['menu.mainMenu0.title']}"/></span>
|
||||
</h4>
|
||||
<ul>
|
||||
<ui:repeat var="menu" value="#{menuController.mainMenu0}">
|
||||
<li><a href="#{contextPathController.rootPath}#{menu.href}" target="#{menu.target}" title="#{menu.title}">#{menu.title}</a></li>
|
||||
</ui:repeat>
|
||||
</ul>
|
||||
</div>
|
||||
</h:panelGroup>
|
||||
<h:panelGroup rendered="#{not empty menuController.mainMenu1}">
|
||||
<div class="body-deco-menu-group">
|
||||
<h4>
|
||||
<span><h:outputText value="#{i18n['menu.mainMenu1.title']}"/></span>
|
||||
</h4>
|
||||
<ul>
|
||||
<ui:repeat var="menu" value="#{menuController.mainMenu1}">
|
||||
<li><a href="#{contextPathController.rootPath}#{menu.href}" target="#{menu.target}" title="#{menu.title}">#{menu.title}</a></li>
|
||||
</ui:repeat>
|
||||
</ul>
|
||||
</div>
|
||||
</h:panelGroup>
|
||||
<h:panelGroup rendered="#{not empty menuController.mainMenu2}">
|
||||
<div class="body-deco-menu-group">
|
||||
<h4>
|
||||
<span><h:outputText value="#{i18n['menu.mainMenu2.title']}"/></span>
|
||||
</h4>
|
||||
<ul>
|
||||
<ui:repeat var="menu" value="#{menuController.mainMenu2}">
|
||||
<li><a href="#{contextPathController.rootPath}#{menu.href}" target="#{menu.target}" title="#{menu.title}">#{menu.title}</a></li>
|
||||
</ui:repeat>
|
||||
</ul>
|
||||
</div>
|
||||
</h:panelGroup>
|
||||
<ui:repeat var="menuGroup" value="#{menuController.vascMenuGroup}">
|
||||
<div id="body-deco-menu-group">
|
||||
<div class="body-deco-menu-group">
|
||||
<h4>
|
||||
<span><h:outputText value="#{i18n[menuGroup.titleKey]}"/></span>
|
||||
</h4>
|
||||
<ul>
|
||||
<ui:repeat var="menu" value="#{menuGroup.menus}">
|
||||
<li><a href="#{contextPathController.rootPath}/vasc/#{menu.vascEntryId}/list,jsf" title="#{i18n[menu.titleKey]}">#{i18n[menu.titleKey]}</a></li>
|
||||
<li><a href="#{contextPathController.rootPath}/vasc/#{menu.vascEntryId}/list.jsf" title="#{i18n[menu.titleKey]}">#{i18n[menu.titleKey]}</a></li>
|
||||
</ui:repeat>
|
||||
</ul>
|
||||
</div>
|
||||
</ui:repeat>
|
||||
</ui:repeat>
|
||||
</div>
|
||||
</ui:composition>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
>
|
||||
<f:view>
|
||||
<div id="body-view">
|
||||
<ui:insert name="main_body_login">
|
||||
<ui:include src="/WEB-INF/template/structure/main-body-login.xhtml"/>
|
||||
</ui:insert>
|
||||
<ui:insert name="main_body_header">
|
||||
<ui:include src="/WEB-INF/template/structure/main-body-header.xhtml"/>
|
||||
</ui:insert>
|
||||
|
|
@ -21,10 +24,10 @@
|
|||
<h1><ui:insert name="page_title"/></h1>
|
||||
<h:messages globalOnly="true" />
|
||||
<ui:insert name="page_content"/>
|
||||
<ui:insert name="main_body_footer">
|
||||
<ui:include src="/WEB-INF/template/structure/main-body-footer.xhtml"/>
|
||||
</ui:insert>
|
||||
</div>
|
||||
<ui:insert name="main_body_footer">
|
||||
<ui:include src="/WEB-INF/template/structure/main-body-footer.xhtml"/>
|
||||
</ui:insert>
|
||||
</div>
|
||||
</ui:insert>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -212,27 +212,6 @@
|
|||
<filter-name>vascFilter</filter-name>
|
||||
<url-pattern>/vasc/*</url-pattern>
|
||||
<dispatcher>REQUEST</dispatcher>
|
||||
<!-- <dispatcher>FORWARD</dispatcher> -->
|
||||
</filter-mapping>
|
||||
|
||||
<filter>
|
||||
<display-name>VASC Filter</display-name>
|
||||
<filter-name>vascFilterServerAdmin</filter-name>
|
||||
<filter-class>net.forwardfire.vasc.frontend.web.jsf.VascRequestFacesFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>templateFile</param-name>
|
||||
<param-value>/WEB-INF/template/page-vasc.jsf</param-value>
|
||||
</init-param>
|
||||
<init-param>
|
||||
<param-name>vascControllerProvider</param-name>
|
||||
<param-value>java:comp/env/vasc/server-admin@net.forwardfire.vasc.impl.jndi.JndiVascControllerProvider</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>vascFilterServerAdmin</filter-name>
|
||||
<url-pattern>/server-admin/*</url-pattern>
|
||||
<dispatcher>REQUEST</dispatcher>
|
||||
<!-- <dispatcher>FORWARD</dispatcher> -->
|
||||
</filter-mapping>
|
||||
|
||||
<servlet>
|
||||
|
|
@ -267,6 +246,23 @@
|
|||
<url-pattern>/cxf/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
|
||||
<!-- Page Filter -->
|
||||
<filter>
|
||||
<display-name>Page Filter</display-name>
|
||||
<filter-name>pageFilter</filter-name>
|
||||
<filter-class>net.forwardfire.vasc.demo.tech.web.pages.VascPageFilter</filter-class>
|
||||
<init-param>
|
||||
<param-name>templateFile</param-name>
|
||||
<param-value>/WEB-INF/template/page-wiki.jsf</param-value>
|
||||
</init-param>
|
||||
</filter>
|
||||
<filter-mapping>
|
||||
<filter-name>pageFilter</filter-name>
|
||||
<url-pattern>/page/*</url-pattern>
|
||||
<dispatcher>REQUEST</dispatcher>
|
||||
</filter-mapping>
|
||||
|
||||
<!-- Add header tags -->
|
||||
|
||||
<filter>
|
||||
|
|
@ -297,14 +293,13 @@
|
|||
|
||||
<!-- Remote ejb -->
|
||||
|
||||
<servlet>
|
||||
<servlet-name>EjbServerServlet</servlet-name>
|
||||
<servlet-class>org.apache.openejb.server.httpd.ServerServlet</servlet-class>
|
||||
</servlet>
|
||||
|
||||
<servlet-mapping>
|
||||
<servlet-name>EjbServerServlet</servlet-name>
|
||||
<url-pattern>/ejb/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
<servlet>
|
||||
<servlet-name>EjbServerServlet</servlet-name>
|
||||
<servlet-class>org.apache.openejb.server.httpd.ServerServlet</servlet-class>
|
||||
</servlet>
|
||||
<servlet-mapping>
|
||||
<servlet-name>EjbServerServlet</servlet-name>
|
||||
<url-pattern>/ejb/*</url-pattern>
|
||||
</servlet-mapping>
|
||||
|
||||
</web-app>
|
||||
|
|
|
|||
|
|
@ -1,334 +0,0 @@
|
|||
|
||||
body {
|
||||
color:#000000;
|
||||
background-color:#FFFFFF;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size:1.2em;
|
||||
font-weight:bold;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
|
||||
h2 {
|
||||
border-radius:3px;
|
||||
display:block;
|
||||
font-size:1.0em;
|
||||
font-weight:bold;
|
||||
padding:10px 10px 10px 10px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin:10px 10px 10px 10px;
|
||||
}
|
||||
|
||||
img {
|
||||
border:none;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
ul {
|
||||
margin-left:10px;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration:underline;
|
||||
}
|
||||
|
||||
|
||||
/* DIVS */
|
||||
|
||||
|
||||
/* MENU */
|
||||
|
||||
#page_menu_left,#page_menu_right {
|
||||
border-color:#DDCCCC;
|
||||
border-style:solid;
|
||||
border-width:0 0 1px 0;
|
||||
vertical-align:bottom;
|
||||
display:inline;
|
||||
}
|
||||
|
||||
#page_menu_right {
|
||||
position:absolute;
|
||||
bottom:0;
|
||||
right:0;
|
||||
}
|
||||
|
||||
#page_menu_left a,#page_menu_right a {
|
||||
border:1px solid #e0e0e0;
|
||||
background-color:#DDCCCC;
|
||||
border-bottom-width:0px;
|
||||
text-align:center;
|
||||
-moz-border-radius-topleft:3xp;
|
||||
-moz-border-radius-topright:3xp;
|
||||
-webkit-border-top-left-radius:3px;
|
||||
-webkit-border-top-right-radius:3px;
|
||||
-khtml-border-radius-topleft:3px;
|
||||
-khtml-border-radius-topright:3px;
|
||||
color:#000;
|
||||
margin:0px 5px 0px 0px;
|
||||
padding:3px 15px 2px 15px;
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
#page_menu_left a:hover,#page_menu_right a:hover {
|
||||
text-decoration:none;
|
||||
background-color:#fff;
|
||||
border-color:#e0e0e0;
|
||||
}
|
||||
|
||||
#page_menu_left a.active,#page_menu_left a.active {
|
||||
background-color:#fff;
|
||||
font-weight:700;
|
||||
}
|
||||
|
||||
#page_user_info {
|
||||
padding:5px;
|
||||
position:absolute;
|
||||
right:0;
|
||||
top:0;
|
||||
font-size:11px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* TABLES */
|
||||
/*
|
||||
#m_content table {
|
||||
text-align: left;
|
||||
}
|
||||
*/
|
||||
|
||||
table.table5, table.rating_table {
|
||||
border-collapse:collapse;
|
||||
font-size:11px;
|
||||
width:100%;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
table.table5 th, table.rating_table th {
|
||||
padding-top:5px;
|
||||
padding-bottom:5px;
|
||||
font-weight:700;
|
||||
text-align:left;
|
||||
vertical-align:top;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
table.table5 td, table.rating_table td {
|
||||
vertical-align:top;
|
||||
padding-top:5px;
|
||||
padding-bottom:5px;
|
||||
padding-left: 3px;
|
||||
}
|
||||
|
||||
.dataTableHeaderRow {
|
||||
border:1px solid #e0e0e0;
|
||||
background-color:#e4e4e4;
|
||||
border-bottom-width:0;
|
||||
}
|
||||
|
||||
.dataTableHeaderRow th, td {
|
||||
padding-right: 5px;
|
||||
}
|
||||
|
||||
table input,table select {
|
||||
font-size: 11px;
|
||||
margin-left:6px;
|
||||
margin-right:6px;
|
||||
}
|
||||
|
||||
table.table5 tr:nth-child(even) {
|
||||
background-color:#f0f0f0;
|
||||
}
|
||||
|
||||
.table_options_top {
|
||||
-moz-border-radius-topleft:3px;
|
||||
-moz-border-radius-topright:3px;
|
||||
background-color:#DDCCCC;
|
||||
font-size:12px;
|
||||
font-weight:700;
|
||||
padding:6px 15px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.table_options_bottom {
|
||||
-moz-border-radius-bottomleft:3px;
|
||||
-moz-border-radius-bottomright:3px;
|
||||
background-color:#DDCCCC;
|
||||
font-size:12px;
|
||||
font-weight:700;
|
||||
padding:6px 15px;
|
||||
display: block;
|
||||
|
||||
margin-top:5px;
|
||||
}
|
||||
|
||||
|
||||
.table_sub_header {
|
||||
-moz-border-radius-topleft:5px;
|
||||
-moz-border-radius-topright:5px;
|
||||
background-color:#EEEEEE;
|
||||
border:1px solid #BBBBBB;
|
||||
display:block;
|
||||
font-size:14px;
|
||||
font-weight:700;
|
||||
margin:0 2px;
|
||||
padding:3px 6px;
|
||||
text-align:center;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* MESSAGES */
|
||||
|
||||
.message_info,
|
||||
.message_1 {
|
||||
display:block;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
border:solid 1px #a0ff7d;
|
||||
-moz-border-radius:3px;
|
||||
-webkit-border-radius:3px;
|
||||
-khtml-border-radius:3px;
|
||||
background-color: #a0ff7d;
|
||||
padding: 15px 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.message_warning,
|
||||
.message_2 {
|
||||
display:block;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
border:solid 1px #ffae4c;
|
||||
-moz-border-radius:3px;
|
||||
-webkit-border-radius:3px;
|
||||
-khtml-border-radius:3px;
|
||||
background-color: #ffae4c;
|
||||
padding: 15px 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.message_error,
|
||||
.message_3 {
|
||||
display:block;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
border:solid 1px #ff5b43;
|
||||
-moz-border-radius:3px;
|
||||
-webkit-border-radius:3px;
|
||||
-khtml-border-radius:3px;
|
||||
background-color: #ff5b43;
|
||||
padding: 15px 15px;
|
||||
margin-bottom: 15px;
|
||||
}
|
||||
|
||||
.message_4 {
|
||||
display:block;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
border:solid 1px #fc9200;
|
||||
background-color: #fc9200;
|
||||
-moz-border-radius-topleft:3px;
|
||||
-webkit-border-top-left-radius:3px;
|
||||
-khtml-border-radius-topleft:3px;
|
||||
-moz-border-radius-topright:3px;
|
||||
-webkit-border-top-right-radius:3px;
|
||||
-khtml-border-radius-topright:3px;
|
||||
padding: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.message_1 input, .message_1 button, .message_2 input, .message_2 button, .message_3 input, .message_3 button {
|
||||
margin:0px;
|
||||
}
|
||||
|
||||
.message_4 h2 {
|
||||
margin: 0px;
|
||||
padding:5px;
|
||||
}
|
||||
|
||||
.message_4 input {
|
||||
margin: 0px;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
padding: 2px 5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
/* LOGINBOX */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
** WIKI styles
|
||||
*/
|
||||
|
||||
#toc,
|
||||
.toc,
|
||||
.mw-warning {
|
||||
border: 1px solid #aaa;
|
||||
background-color: #f9f9f9;
|
||||
padding: 5px;
|
||||
font-size: 95%;
|
||||
}
|
||||
#toc h2,
|
||||
.toc h2 {
|
||||
display: inline;
|
||||
border: none;
|
||||
padding: 0;
|
||||
font-size: 100%;
|
||||
font-weight: bold;
|
||||
}
|
||||
#toc #toctitle,
|
||||
.toc #toctitle,
|
||||
#toc .toctitle,
|
||||
.toc .toctitle {
|
||||
text-align: center;
|
||||
}
|
||||
#toc ul,
|
||||
.toc ul {
|
||||
list-style-type: none;
|
||||
list-style-image: none;
|
||||
margin-left: 0;
|
||||
padding-left: 0;
|
||||
text-align: left;
|
||||
}
|
||||
#toc ul ul,
|
||||
.toc ul ul {
|
||||
margin: 0 0 0 2em;
|
||||
}
|
||||
#toc .toctoggle,
|
||||
.toc .toctoggle {
|
||||
font-size: 94%;
|
||||
}
|
||||
|
||||
.thumbcaption {
|
||||
border: none;
|
||||
text-align: left;
|
||||
line-height: 1.4em;
|
||||
padding: 3px !important;
|
||||
font-size: 94%;
|
||||
}
|
||||
|
||||
.location-right {
|
||||
clear: right;
|
||||
float: right;
|
||||
border-width: .5em 0 .8em 1.4em;
|
||||
}
|
||||
.location-left {
|
||||
float: left;
|
||||
clear: left;
|
||||
margin-right: .5em;
|
||||
border-width: .5em 1.4em .8em 0;
|
||||
}
|
||||
|
||||
|
|
@ -9,7 +9,7 @@ body {
|
|||
}
|
||||
|
||||
#body-content {
|
||||
margin-left: 200px;
|
||||
margin-left: 210px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
|
|
@ -23,38 +23,40 @@ body {
|
|||
|
||||
#page-header-left {
|
||||
float:left;
|
||||
margin-left: 200px;
|
||||
}
|
||||
|
||||
#page-header-info {
|
||||
float:right;
|
||||
padding-right: 20%;
|
||||
margin-left: 210px;
|
||||
}
|
||||
|
||||
#page-header-right {
|
||||
float:right;
|
||||
}
|
||||
|
||||
#page-header-left,#page-header-right {
|
||||
#page-header-left,#page-header-right {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#page-body-login {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
}
|
||||
|
||||
#body-deco-logo {
|
||||
position: absolute;
|
||||
right: 5px;
|
||||
top: 40px;
|
||||
}
|
||||
|
||||
#body-deco-menu {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
#body-footer {
|
||||
text-align: center;
|
||||
margin-left: 210px;
|
||||
}
|
||||
|
||||
#body-footer-content {
|
||||
padding: 5px;
|
||||
margin-left:20em;
|
||||
margin-right:20em;
|
||||
margin-top:1em;
|
||||
}
|
||||
|
||||
#body-deco-logo {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 50px;
|
||||
}
|
||||
|
||||
#body-deco-menu {
|
||||
float: left;
|
||||
width: 190px;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,28 +8,52 @@ body {
|
|||
}
|
||||
|
||||
#body-content {
|
||||
min-height: 400px;
|
||||
border: 1px solid #ccc;
|
||||
border-bottom-left-radius:3px;
|
||||
border-bottom-right-radius:3px;
|
||||
border-bottom-left-radius:5px;
|
||||
border-bottom-right-radius:5px;
|
||||
background-image: url(/demo/img/skin/default/body-view-bg.png);
|
||||
}
|
||||
|
||||
#page-header-left a,#page-header-right a,#page-header-info-body {
|
||||
#page-body-login {
|
||||
text-align: center;
|
||||
height: 28px;
|
||||
width: 198px;
|
||||
padding-top: 7px;
|
||||
border: 1px solid #BBBBBB;
|
||||
border-top: none;
|
||||
border-bottom-left-radius:5px;
|
||||
border-bottom-right-radius:5px;
|
||||
background-image: url(/demo/img/skin/default/body-view-bg.png);
|
||||
}
|
||||
|
||||
#page-header-left a,#page-header-right a {
|
||||
padding:10px;
|
||||
padding-bottom:5px;
|
||||
}
|
||||
#page-header-left a,#page-header-right a,#page-header-info-body {
|
||||
#page-header-left a,#page-header-right a {
|
||||
background-color:#DDCCCC;
|
||||
font-weight:bold;
|
||||
border-top-left-radius:5px;
|
||||
border-top-right-radius:5px;
|
||||
}
|
||||
#page-header-left a {
|
||||
margin-right: 3px;
|
||||
}
|
||||
#page-header-right a {
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
#body-footer {
|
||||
border-color:#e5e5e5;
|
||||
border-style:solid;
|
||||
border-width:1px 1px 1px 1px;
|
||||
border-radius:3px;
|
||||
margin-top: 10px;
|
||||
border: 1px solid #BBBBBB;
|
||||
border-radius:5px;
|
||||
background-image: url(/demo/img/skin/default/body-view-bg.png);
|
||||
}
|
||||
|
||||
#body-footer-content {
|
||||
text-align:center;
|
||||
font-size:80%;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -42,9 +66,7 @@ h1 {
|
|||
}
|
||||
|
||||
h2 {
|
||||
font-style: italic;
|
||||
float: right;
|
||||
margin-top: -45px;
|
||||
font-style: italic;
|
||||
padding: 10px;
|
||||
color: #2d1100;
|
||||
}
|
||||
|
|
@ -67,50 +89,22 @@ h3 span {
|
|||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
#summary {
|
||||
float: left;
|
||||
width: 200px;
|
||||
margin-right: 15px;
|
||||
text-align: center;
|
||||
border: 1px solid #ccc;
|
||||
padding: 5px;
|
||||
font-family: Georgia, serif;
|
||||
font-style: italic;
|
||||
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
#body-deco-logo {
|
||||
|
||||
}
|
||||
#body-deco-menu {
|
||||
|
||||
}
|
||||
|
||||
#body-deco-logo-div,#body-deco-menu0-div,#body-deco-menu1-div,#body-deco-menu2-div {
|
||||
/*
|
||||
font: 10px verdana, sans-serif;
|
||||
padding: 10px;
|
||||
margin-top: 130px;
|
||||
width: 130px;
|
||||
border: 1px solid #ccc;
|
||||
background-image: url(../../../img/skin/default/wrapper2.png);
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
#body-deco-menu-group {
|
||||
.body-deco-menu-group {
|
||||
padding:5px;
|
||||
margin-top: 5px;
|
||||
margin-bottom: 10px;
|
||||
border-radius:5px;
|
||||
border: 1px solid #BBBBBB;
|
||||
background-image: url(/demo/img/skin/default/body-view-bg.png);
|
||||
}
|
||||
|
||||
.body-deco-menu-group ul {
|
||||
margin-left: 5px;
|
||||
padding-left: 0px;
|
||||
list-style:none;
|
||||
font-size:80%;
|
||||
}
|
||||
|
||||
.rf-p {
|
||||
border-radius:5px;
|
||||
border: 1px solid #BBBBBB;
|
||||
|
|
|
|||
|
|
@ -6,15 +6,15 @@ body {
|
|||
|
||||
|
||||
input:hover,textarea:hover,select:hover{
|
||||
border: 2px solid rgba(100, 224, 64, 0.6);
|
||||
border: 2px solid rgba(10, 224, 64, 0.6);
|
||||
}
|
||||
|
||||
.even {
|
||||
background-color:rgba(70, 180, 60, 0.6);
|
||||
background-color:rgba(70, 18, 60, 0.6);
|
||||
}
|
||||
|
||||
.odd {
|
||||
background-color:rgba(10, 230, 120, 0.6);
|
||||
background-color:rgba(180, 230, 12, 0.6);
|
||||
}
|
||||
|
||||
#page-header-left a,#page-header-right a,#page-header-info-body,.rf-dt-shdr-c a,.table_sub_header {
|
||||
|
|
@ -26,6 +26,6 @@ input:hover,textarea:hover,select:hover{
|
|||
}
|
||||
|
||||
ul.actionboxtab li a:hover,#page-header-left a:hover,#page-header-right a:hover,#page-header-info-body:hover {
|
||||
background-color:rgba(65, 182, 33, 0.6);
|
||||
background-color:rgba(65, 18, 33, 0.6);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
>
|
||||
<ui:define name="page_title">Admin Index</ui:define>
|
||||
<ui:define name="page_content">
|
||||
<h:panelGrid columns="4" id="grid" width="100%">
|
||||
<h:panelGrid columns="2" id="grid" width="60%">
|
||||
<rich:panel>
|
||||
<f:facet name="header">
|
||||
<h:outputText value="Vasc Admin" />
|
||||
|
|
@ -45,6 +45,7 @@
|
|||
</h:outputLink>
|
||||
</h:panelGrid>
|
||||
</h:form>
|
||||
<br/>
|
||||
</rich:panel>
|
||||
<rich:panel>
|
||||
<f:facet name="header">
|
||||
|
|
|
|||
|
|
@ -7,23 +7,7 @@
|
|||
>
|
||||
<ui:define name="page_title">Index</ui:define>
|
||||
<ui:define name="page_content">
|
||||
<h:panelGrid columns="2" id="grid" width="100%">
|
||||
<rich:panel rendered="#{not empty menuController.menuPageIndex}" >
|
||||
<f:facet name="header">
|
||||
<h:outputText value="Pages" />
|
||||
</f:facet>
|
||||
<ul>
|
||||
<ui:repeat var="menuEntry" value="#{menuController.menuPageIndex}">
|
||||
<li><a href="#{contextPathController.rootPath}#{menuEntry.href}" title="#{menuEntry.title}" target="#{menuEntry.target}">#{menuEntry.title}</a></li>
|
||||
</ui:repeat>
|
||||
</ul>
|
||||
</rich:panel>
|
||||
<rich:panel>
|
||||
<f:facet name="header">
|
||||
<h:outputText value="Welcome" />
|
||||
</f:facet>
|
||||
<h:outputText value="todo" />
|
||||
</rich:panel>
|
||||
</h:panelGrid>
|
||||
</ui:define>
|
||||
<p>Welcome to the vasc tech demo.</p>
|
||||
<p>Please login to see more options.</p>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
|
|
|
|||
|
|
@ -16,11 +16,12 @@
|
|||
<f:facet name="header">
|
||||
<h:outputText value="Select skin" />
|
||||
</f:facet>
|
||||
<select name="theme" id="skinSwicther" onchange="JAWR.skin.switchToStyle(this.value);">
|
||||
<option value="default">Default</option>
|
||||
<option value="pink">Pink Skin</option>
|
||||
<option value="green">Green Skin</option>
|
||||
</select>
|
||||
<p>Select theme</p>
|
||||
<ul>
|
||||
<li><a href="/" onclick="JAWR.skin.switchToStyle('default');window.location.reload();return false;">Default</a></li>
|
||||
<li><a href="/" onclick="JAWR.skin.switchToStyle('notheme');window.location.reload();return false;">No Thema</a></li>
|
||||
<li><a href="/" onclick="JAWR.skin.switchToStyle('green');window.location.reload();return false;">Green</a></li>
|
||||
</ul>
|
||||
</rich:panel>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 12 KiB |
Loading…
Add table
Add a link
Reference in a new issue