From: Roland Haeder Date: Tue, 1 Sep 2015 13:26:42 +0000 (+0200) Subject: Refacturing towards JSF: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=41fceee4732f757e045650dbaab3908940e90ac4;p=pizzaservice-war.git Refacturing towards JSF: - Well, this sucks a bit: getAvailableProducts() needs to return something that is Collection and not Iterator (which worked in JSP) - Added initial index.xhtml and CSS layout for upcoming rewrite (origin: NetBeans) - updated jcore/jshop Signed-off-by:Roland Häder --- diff --git a/lib/jcore.jar b/lib/jcore.jar index 8b05d574..f2672bd2 100644 Binary files a/lib/jcore.jar and b/lib/jcore.jar differ diff --git a/lib/jshop.jar b/lib/jshop.jar index e6c9d7bd..26abcd4c 100644 Binary files a/lib/jshop.jar and b/lib/jshop.jar differ diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData new file mode 100644 index 00000000..e69de29b diff --git a/nbproject/project.properties b/nbproject/project.properties index b8c86591..6836c4a1 100644 --- a/nbproject/project.properties +++ b/nbproject/project.properties @@ -3,6 +3,7 @@ annotation.processing.enabled.in.editor=true annotation.processing.processors.list= annotation.processing.run.all.processors=true annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output +auxiliary.org-netbeans-modules-html-editor-lib.default-xhtml-public-id=-//W3C//DTD XHTML 1.0 Transitional//EN auxiliary.org-netbeans-modules-projectapi.jsf_2e_language=Facelets build.classes.dir=${build.web.dir}/WEB-INF/classes build.classes.excludes=**/*.java,**/*.form diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java index 051ddcd9..aa400cea 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaApplication.java @@ -18,6 +18,7 @@ package org.mxchange.pizzaapplication.application; import java.io.IOException; import java.sql.SQLException; +import java.util.Deque; import java.util.Iterator; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -52,6 +53,30 @@ public interface PizzaApplication extends Application { @Deprecated static final String HTTP_PARAM_MASK = "%s[%s]"; //NOI18N + /** + * Some "getter" for a linked list of only available products + * + * @return Only available products + * @throws javax.servlet.ServletException If anything went wrong + */ + public Deque getAvailableProducts () throws ServletException; + + /** + * Some "getter" for a linked list of all products + * + * @return All products + * @throws javax.servlet.ServletException If anything went wrong + */ + public Deque getAllProducts () throws ServletException; + + /** + * Some "getter" for a linked list of all categories + * + * @return All categories + * @throws javax.servlet.ServletException If anything went wrong + */ + public Deque getAllCategories () throws ServletException; + /** * Initializes this instance with given ServletContext * @@ -98,7 +123,7 @@ public interface PizzaApplication extends Application { * @return Only available products * @throws javax.servlet.ServletException If anything went wrong */ - public Iterator getAvailableProducts () throws ServletException; + public Iterator getAvailableProductsIterator () throws ServletException; /** * Some "getter" for a an array of all products @@ -106,7 +131,7 @@ public interface PizzaApplication extends Application { * @return All products * @throws javax.servlet.ServletException If anything went wrong */ - public Iterator getAllProducts () throws ServletException; + public Iterator getAllProductsIterator () throws ServletException; /** * Some "getter" for a an array of all categories @@ -114,7 +139,7 @@ public interface PizzaApplication extends Application { * @return All categories * @throws javax.servlet.ServletException If anything went wrong */ - public Iterator getAllCategories () throws ServletException; + public Iterator getAllCategoriesIterator () throws ServletException; /** * Checks if given Product instance is available and returns a printable diff --git a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java index a5e35eb3..9bf32b49 100644 --- a/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java +++ b/src/java/org/mxchange/pizzaapplication/application/PizzaServiceApplication.java @@ -21,6 +21,7 @@ import java.io.UnsupportedEncodingException; import java.lang.reflect.InvocationTargetException; import java.sql.SQLException; import java.text.MessageFormat; +import java.util.Deque; import java.util.Iterator; import javax.servlet.ServletContext; import javax.servlet.ServletException; @@ -50,12 +51,12 @@ import org.mxchange.pizzaapplication.BasePizzaServiceSystem; */ public class PizzaServiceApplication extends BasePizzaServiceSystem implements PizzaApplication { /** - * Frontend for products + * Database frontend for products */ private ProductFrontend productFrontend; /** - * Frontend for categories + * Database frontend for categories */ private CategoryFrontend categoryFrontend; @@ -67,6 +68,39 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P this.getLogger().trace("CALLED!"); //NOI18N } + @Override + public Deque getAllCategories () throws ServletException { + try { + // Deligate to frontend + return this.categoryFrontend.getAllCategories(); + } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { + // Continue to throw + throw new ServletException(ex); + } + } + + @Override + public Deque getAllProducts () throws ServletException { + try { + // Deligate to frontend + return this.productFrontend.getAllProducts(); + } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { + // Continue to throw + throw new ServletException(ex); + } + } + + @Override + public Deque getAvailableProducts () throws ServletException { + try { + // Deligate to frontend + return this.productFrontend.getAllAvailableProducts(); + } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | IllegalArgumentException | InvocationTargetException ex) { + // Continue to throw + throw new ServletException(ex); + } + } + @Override public void init (final ServletContext context) throws UnsupportedDatabaseBackendException, SQLException { // Trace message @@ -119,7 +153,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P // Init/declare total price and iterator int totalAmount = 0; - Iterator iterator = this.getAvailableProducts(); + Iterator iterator = this.getAvailableProductsIterator(); // "Walk" over all products while (iterator.hasNext()) { @@ -295,7 +329,8 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P } @Override - public Iterator getAvailableProducts () throws ServletException { + @SuppressWarnings ("unchecked") + public Iterator getAvailableProductsIterator () throws ServletException { // categoryFrontend must be set if (null == this.productFrontend) { // Abort here @@ -304,14 +339,15 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P try { // Ask frontend for a list of products - return this.productFrontend.getAvailableProducts(); + return (Iterator) this.productFrontend.getAvailableProductsIterator(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { throw new ServletException(ex); } } @Override - public Iterator getAllProducts () throws ServletException { + @SuppressWarnings ("unchecked") + public Iterator getAllProductsIterator () throws ServletException { // Trace message this.getLogger().trace("CALLED!"); //NOI18N @@ -323,14 +359,15 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P try { // Ask frontend for a list of products - return this.productFrontend.getAllProducts(); + return (Iterator) this.productFrontend.getAllProductsIterator(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { throw new ServletException(ex); } } @Override - public Iterator getAllCategories () throws ServletException { + @SuppressWarnings ("unchecked") + public Iterator getAllCategoriesIterator () throws ServletException { // Trace message this.getLogger().trace("CALLED!"); //NOI18N @@ -342,7 +379,7 @@ public class PizzaServiceApplication extends BasePizzaServiceSystem implements P try { // Ask frontend for a list of categories - return this.categoryFrontend.getAllCategories(); + return (Iterator) this.categoryFrontend.getAllCategoriesIterator(); } catch (final IOException | BadTokenException | SQLException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { throw new ServletException(ex); } diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java index 1a7eda3f..18bed800 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaBean.java @@ -16,6 +16,7 @@ */ package org.mxchange.pizzaapplication.beans.controller; +import java.util.Deque; import java.util.Iterator; import javax.faces.FacesException; import javax.servlet.ServletException; @@ -70,28 +71,52 @@ public interface PizzaBean extends FrameworkBean { public void setValueInSession (final HttpSession session, final String key, final Object value); /** - * Some "getter" for a an array of only available products + * Some "getter" for an iterator of only available products * * @return Only available products * @throws javax.servlet.ServletException If anything went wrong */ - public Iterator getAvailableProducts () throws ServletException; + public Iterator getAvailableProductsIterator () throws ServletException; /** - * Some "getter" for a an array of all products + * Some "getter" for an iterator of all products * * @return All products * @throws javax.servlet.ServletException If anything went wrong */ - public Iterator getAllProducts () throws ServletException; + public Iterator getAllProductsIterator () throws ServletException; /** - * Some "getter" for a an array of all categories + * Some "getter" for an iterator of all categories * * @return All categories * @throws javax.servlet.ServletException If anything went wrong */ - public Iterator getAllCategories () throws ServletException; + public Iterator getAllCategoriesIterator () throws ServletException; + + /** + * Some "getter" for a linked list of only available products + * + * @return Only available products + * @throws javax.servlet.ServletException If anything went wrong + */ + public Deque getAvailableProducts () throws ServletException; + + /** + * Some "getter" for a linked list of all products + * + * @return All products + * @throws javax.servlet.ServletException If anything went wrong + */ + public Deque getAllProducts () throws ServletException; + + /** + * Some "getter" for a linked list of all categories + * + * @return All categories + * @throws javax.servlet.ServletException If anything went wrong + */ + public Deque getAllCategories () throws ServletException; /** * Checks if given Product instance is available and returns a printable diff --git a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java index 86b10097..a61838d6 100644 --- a/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java +++ b/src/java/org/mxchange/pizzaapplication/beans/controller/PizzaServiceBean.java @@ -19,6 +19,7 @@ package org.mxchange.pizzaapplication.beans.controller; import java.io.IOException; import java.sql.SQLException; import java.text.MessageFormat; +import java.util.Deque; import java.util.Iterator; import javax.annotation.PostConstruct; import javax.enterprise.context.SessionScoped; @@ -93,80 +94,51 @@ public class PizzaServiceBean extends BaseFrameworkBean implements PizzaBean { } } - /** - * Some "getter" for HTML code 'checked="checked"' if the product is choosen - * - * @param product Product instance - * @param request Request instance - * @param session Session instance - * @return Whether the product is choosen - */ @Override public String getCheckedHtmlFromProduct (final Product product, final ServletRequest request, final HttpSession session) { return this.app.getCheckedHtmlFromProduct(product, request, session); } - /** - * Some "getter" for HTML code 'disabled="disabled"' for e.g. submit buttons - * - * @param request Request instance - * @param session Session instance - * @return Whether the product is choosen - */ @Override public String getDisabledHtmlFromSession (final ServletRequest request, final HttpSession session) throws ServletException { return this.app.getDisabledHtmlFromSession(request, session); } - /** - * Checks if given Product instance is available and returns a printable - * (human-readable) string. - * - * @param product Product instance to check - * @return Human-readable version of product availability - */ @Override public String getPrintableProduktAvailability (final Product product) { return this.app.getPrintableProduktAvailability(product); } - /** - * Some "getter" for a an array of only available products - * - * @return All products - */ @Override - public Iterator getAvailableProducts () throws ServletException { + public Iterator getAvailableProductsIterator () throws ServletException { + return this.app.getAvailableProductsIterator(); + } + + @Override + public Iterator getAllProductsIterator () throws ServletException { + return this.app.getAllProductsIterator(); + } + + @Override + public Deque getAvailableProducts () throws ServletException { return this.app.getAvailableProducts(); } - /** - * Some "getter" for a an array of all products - * - * @return All products - */ @Override - public Iterator getAllProducts () throws ServletException { + public Deque getAllProducts () throws ServletException { return this.app.getAllProducts(); } - /** - * Some "getter" for a an array of all categories - * - * @return All categories - */ @Override - public Iterator getAllCategories () throws ServletException { + public Iterator getAllCategoriesIterator () throws ServletException { + return this.app.getAllCategoriesIterator(); + } + + @Override + public Deque getAllCategories () throws ServletException { return this.app.getAllCategories(); } - /** - * Somewhat setter in session - * - * @param session Session instance - * @param key Session key to set - * @param value Value to set - */ @Override public void setValueInSession (final HttpSession session, final String key, final Object value) { this.app.setValueInSession(session, key, value); diff --git a/src/java/org/mxchange/pizzaapplication/filter/servlet/basket/BasketItemAddedFilter.java b/src/java/org/mxchange/pizzaapplication/filter/servlet/basket/BasketItemAddedFilter.java index 66089c88..c2475b4c 100644 --- a/src/java/org/mxchange/pizzaapplication/filter/servlet/basket/BasketItemAddedFilter.java +++ b/src/java/org/mxchange/pizzaapplication/filter/servlet/basket/BasketItemAddedFilter.java @@ -17,8 +17,6 @@ package org.mxchange.pizzaapplication.filter.servlet.basket; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.sql.SQLException; import java.text.MessageFormat; import javax.servlet.Filter; import javax.servlet.FilterChain; @@ -28,8 +26,6 @@ import javax.servlet.ServletResponse; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; -import org.mxchange.jcore.exceptions.BadTokenException; -import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException; import org.mxchange.jshop.beans.basket.BasketBean; import org.mxchange.jshop.item.AddableBasketItem; import org.mxchange.pizzaapplication.filter.servlet.BaseServletFilter; @@ -83,60 +79,55 @@ public class BasketItemAddedFilter extends BaseServletFilter implements Filter { // Debug message this.getLogger().debug(MessageFormat.format("item.id={0},item.itemId={1},item.itemType={2},item.amount={3}", item.getId(), item.getItemId(), item.getItemType(), item.getAmount())); //NOI18N - try { - // Cast to servlet request - HttpServletRequest servletRequest = (HttpServletRequest) request; + // Cast to servlet request + HttpServletRequest servletRequest = (HttpServletRequest) request; - // Get session instance - HttpSession session = servletRequest.getSession(); + // Get session instance + HttpSession session = servletRequest.getSession(); - // Debug message - this.getLogger().debug(MessageFormat.format("session={0}", session)); //NOI18N + // Debug message + this.getLogger().debug(MessageFormat.format("session={0}", session)); //NOI18N - // Should not be null - if (null == session) { - // session is null - throw new NullPointerException("session is null"); //NOI18N - } + // Should not be null + if (null == session) { + // session is null + throw new NullPointerException("session is null"); //NOI18N + } - // Get basket instance - BasketBean basket = (BasketBean) session.getAttribute("basket"); //NOI18N + // Get basket instance + BasketBean basket = (BasketBean) session.getAttribute("basket"); //NOI18N + // Debug message + this.getLogger().debug(MessageFormat.format("basket={0}", basket)); //NOI18N + + // Is the item already added? + if (item.getItemId() == null) { + // Item id is not set + throw new NullPointerException(MessageFormat.format("item id of item={0} is null", item)); //NOI18N + } else if (item.getItemType() == null) { + // Item type is not set + throw new NullPointerException(MessageFormat.format("item type of item={0} is null", item)); //NOI18N + } else if ((item.getAmount() == null) || (item.getAmount() == 0)) { // Debug message - this.getLogger().debug(MessageFormat.format("basket={0}", basket)); //NOI18N - - // Is the item already added? - if (item.getItemId() == null) { - // Item id is not set - throw new NullPointerException(MessageFormat.format("item id of item={0} is null", item)); //NOI18N - } else if (item.getItemType() == null) { - // Item type is not set - throw new NullPointerException(MessageFormat.format("item type of item={0} is null", item)); //NOI18N - } else if ((item.getAmount() == null) || (item.getAmount() == 0)) { - // Debug message - this.getLogger().debug(MessageFormat.format("Amount for item {0} is null - EXIT!", item)); //NOI18N - - // Amount is not entered - return; - } else if (basket.isItemAdded(item)) { - // Yes, then throw exception here - throw new ServletException(MessageFormat.format("item id={0} has already been added.", item.getItemId())); //NOI18N - } - - // Register item with it - basket.addItem(item); - - // Is amount null or zero? - if ((item.getAmount() == null) || (item.getAmount() == 0)) { - // Then redirect to added=0 - ((HttpServletResponse) response).sendRedirect(servletRequest.getContextPath() + "/?add=0"); //NOI18N - } else { - // Redirect to proper URL - ((HttpServletResponse) response).sendRedirect(servletRequest.getContextPath() + "/?add=1"); //NOI18N - } - } catch (final SQLException | BadTokenException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { - // Continue to throw - throw new ServletException(ex); + this.getLogger().debug(MessageFormat.format("Amount for item {0} is null - EXIT!", item)); //NOI18N + + // Amount is not entered + return; + } else if (basket.isItemAdded(item)) { + // Yes, then throw exception here + throw new ServletException(MessageFormat.format("item id={0} has already been added.", item.getItemId())); //NOI18N + } + + // Register item with it + basket.addItem(item); + + // Is amount null or zero? + if ((item.getAmount() == null) || (item.getAmount() == 0)) { + // Then redirect to added=0 + ((HttpServletResponse) response).sendRedirect(servletRequest.getContextPath() + "/?add=0"); //NOI18N + } else { + // Redirect to proper URL + ((HttpServletResponse) response).sendRedirect(servletRequest.getContextPath() + "/?add=1"); //NOI18N } // Trace message diff --git a/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java b/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java index 9cdd3cd2..0154ed8e 100644 --- a/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java +++ b/src/java/org/mxchange/pizzaapplication/tags/basket/MiniBasketTag.java @@ -17,16 +17,12 @@ package org.mxchange.pizzaapplication.tags.basket; import java.io.IOException; -import java.lang.reflect.InvocationTargetException; -import java.sql.SQLException; import java.text.MessageFormat; import javax.servlet.ServletException; import javax.servlet.jsp.JspException; import javax.servlet.jsp.tagext.BodyTagSupport; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.mxchange.jcore.exceptions.BadTokenException; -import org.mxchange.jcore.exceptions.CorruptedDatabaseFileException; import org.mxchange.jshop.beans.basket.BasketBean; import org.mxchange.jshop.item.AddableBasketItem; import org.mxchange.jshop.product.Product; @@ -138,7 +134,7 @@ public class MiniBasketTag extends BodyTagSupport implements BasketTag { out.append(" \n"); //NOI18N out.append("\n"); //NOI18N } - } catch (final ServletException | IOException | SQLException | BadTokenException | CorruptedDatabaseFileException | NoSuchMethodException | IllegalAccessException | InvocationTargetException ex) { + } catch (final ServletException ex) { // Continue to throw throw new JspException(ex); } diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml new file mode 100644 index 00000000..eef85cfe --- /dev/null +++ b/web/WEB-INF/faces-config.xml @@ -0,0 +1,7 @@ + + + + diff --git a/web/WEB-INF/templates/base.tpl b/web/WEB-INF/templates/base.tpl new file mode 100644 index 00000000..07d3cf50 --- /dev/null +++ b/web/WEB-INF/templates/base.tpl @@ -0,0 +1,43 @@ + + + + + + + + + Pizza-Service - <ui:insert name="title">Default title</ui:insert> + + + +
+ + + +
+ +
+
+ Default menu +
+ +
+ Default content header + Default content +
+ +
+
+ + +
+ diff --git a/web/WEB-INF/templates/guest/guest_footer.tpl b/web/WEB-INF/templates/guest/guest_footer.tpl new file mode 100644 index 00000000..a3c9ec7e --- /dev/null +++ b/web/WEB-INF/templates/guest/guest_footer.tpl @@ -0,0 +1,16 @@ + + + +
+
diff --git a/web/WEB-INF/templates/guest/guest_menu.tpl b/web/WEB-INF/templates/guest/guest_menu.tpl new file mode 100644 index 00000000..cf2ebcf8 --- /dev/null +++ b/web/WEB-INF/templates/guest/guest_menu.tpl @@ -0,0 +1,19 @@ + + + diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml index 0851cde8..6ddf5b86 100644 --- a/web/WEB-INF/web.xml +++ b/web/WEB-INF/web.xml @@ -76,7 +76,7 @@ - - index.jsp + faces/index.xhtml + diff --git a/web/admin/category.jsp b/web/admin/category.jsp index 47da4f06..8aefece3 100644 --- a/web/admin/category.jsp +++ b/web/admin/category.jsp @@ -63,7 +63,7 @@ - + ${category.categoryId}: diff --git a/web/admin/product.jsp b/web/admin/product.jsp index 67d48d0d..49af00a1 100644 --- a/web/admin/product.jsp +++ b/web/admin/product.jsp @@ -68,7 +68,7 @@ - + ${product.itemId}: diff --git a/web/index.jsp b/web/index.jsp index 7d3dbe81..ec70c2df 100644 --- a/web/index.jsp +++ b/web/index.jsp @@ -45,6 +45,7 @@
+ @@ -74,7 +75,7 @@
- + diff --git a/web/index.xhtml b/web/index.xhtml new file mode 100644 index 00000000..958400df --- /dev/null +++ b/web/index.xhtml @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + Willkommen! + + + + + + + Eingangsseite (dummy) + + + + + + + + + + + + + + + + + + + + +
+ Folgendes kann bestellt werden: +
+ Bestellen? + + Anzahl: + + Produkt: + + Einzelpreis: +
+ + + + + + + + + + + + + + + + + +
+ Warenkorb + + #{controller.basket.item.amount} + + #{product.title} + + + + +
+
+ + + + + + + + + + + + + + +
+ + + + + + + #{product.title} + + + + +
+
+
+
+
+ + + + +
+ diff --git a/web/resources/css/cssLayout.css b/web/resources/css/cssLayout.css new file mode 100644 index 00000000..3d3b2cb1 --- /dev/null +++ b/web/resources/css/cssLayout.css @@ -0,0 +1,136 @@ +#top { + position: relative; + background-color: #036fab; + color: white; + padding: 5px; + margin: 0px 0px 10px 0px; +} + +#footer { + position: relative; + background-color: #c2dfef; + padding: 5px; + margin: 10px 0px 0px 0px; +} + +#left { + float: left; + background-color: #ece3a5; + padding: 5px; + width: 150px; +} + +#right { + float: right; + background-color: #ece3a5; + padding: 5px; + width: 150px; +} + +.center_content { + position: relative; + background-color: #dddddd; + padding: 5px; +} + +.left_content { + background-color: #dddddd; + padding: 5px; + margin-left: 170px; +} + +.right_content { + background-color: #dddddd; + padding: 5px; + margin: 0px 170px 0px 170px; +} + +#top a:link, #top a:visited { + color: white; + font-weight : bold; + text-decoration: none; +} + +#top a:link:hover, #top a:visited:hover { + color: black; + font-weight : bold; + text-decoration : underline; +} + +/** +div { + border: 1px solid #ff0000; +} +/**/ + +table, .table { + margin: 0px; + padding: 0px; +} + +.table { + width: 500px; +} + +.table_row { + width: 100%; +} + +.table_left { + width: 250px; + float: left; +} + +.table_right { + width: 200px; + float: right; +} + +.table_left25 { + width: 20px; + float: left; +} + +.table_right75 { + width: 430px; + float: right; +} + +.para { + padding: 5px 5px 5px 5px; +} + +.clear { + clear: both; +} + +ul.footer_nav { + text-align: center; + width : 500px; + list-style: none; + margin: 0px; +} + +ul.footer_nav li { + float: left; + width: 100px; +} + +.menu ul { + list-style: none; + padding-left: 5px; +} + +.table_header { + text-align: center; + font-weight: bold; + font-size: 20px; +} + +.table_header_column { + width: 100px; +} + +.table_data_column { + width: 100px; +} diff --git a/web/resources/css/default.css b/web/resources/css/default.css new file mode 100644 index 00000000..c658b11b --- /dev/null +++ b/web/resources/css/default.css @@ -0,0 +1,28 @@ +body { + background-color: #ffffff; + font-size: 12px; + font-family: lucida; + color: #000000; + margin: 10px; +} + +h1 { + border-bottom: 1px solid #AFAFAF; + font-size: 16px; + font-weight: bold; + margin: 0px; + padding: 0px; + color: #D20005; +} + +a:link, a:visited { + color: #045491; + font-weight : bold; + text-decoration: none; +} + +a:link:hover, a:visited:hover { + color: #045491; + font-weight : bold; + text-decoration : underline; +} diff --git a/web/static/admin/admin_category_selection_box.jsp b/web/static/admin/admin_category_selection_box.jsp index 920de9f4..e1d2bece 100644 --- a/web/static/admin/admin_category_selection_box.jsp +++ b/web/static/admin/admin_category_selection_box.jsp @@ -10,7 +10,7 @@ diff --git a/web/static/admin/admin_parent_category_selection_box.jsp b/web/static/admin/admin_parent_category_selection_box.jsp index eb98e8de..c00a925e 100644 --- a/web/static/admin/admin_parent_category_selection_box.jsp +++ b/web/static/admin/admin_parent_category_selection_box.jsp @@ -11,7 +11,7 @@