click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r784478 - in /incubator/click/trunk/click: extras/src/org/apache/click/extras/control/TableInlinePaginator.java framework/src/org/apache/click/control/Table.java framework/src/org/apache/click/control/TablePaginator.java
Date Sat, 13 Jun 2009 21:28:46 GMT
Author: sabob
Date: Sat Jun 13 21:28:45 2009
New Revision: 784478

URL: http://svn.apache.org/viewvc?rev=784478&view=rev
Log:
removed class attributes from table rendered links

Modified:
    incubator/click/trunk/click/extras/src/org/apache/click/extras/control/TableInlinePaginator.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/TablePaginator.java

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/control/TableInlinePaginator.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/control/TableInlinePaginator.java?rev=784478&r1=784477&r2=784478&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/control/TableInlinePaginator.java
(original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/control/TableInlinePaginator.java
Sat Jun 13 21:28:45 2009
@@ -104,22 +104,11 @@
             controlLink.setImageSrc(paginatorMessages.getMessage("table-inline-first-image"));
             controlLink.setParameter(Table.PAGE, String.valueOf(0));
             controlLink.setTitle(table.getMessage("table-first-title"));
-            String styleClass = controlLink.getAttribute("class");
-            if (styleClass == null) {
-                controlLink.setAttribute("class", "control-first");
-            } else {
-                controlLink.setAttribute("class", styleClass + " control-first");
-            }
             firstLabel = controlLink.toString();
 
             controlLink.setImageSrc(paginatorMessages.getMessage("table-inline-previous-image"));
             controlLink.setParameter(Table.PAGE, String.valueOf(table.getPageNumber() - 1));
             controlLink.setTitle(table.getMessage("table-previous-title"));
-            if (styleClass == null) {
-                controlLink.setAttribute("class", "control-previous");
-            } else {
-                controlLink.setAttribute("class", styleClass + " control-previous");
-            }
             previousLabel = controlLink.toString();
 
         } else {
@@ -128,22 +117,11 @@
             controlLink.setImageSrc(paginatorMessages.getMessage("table-inline-first-disabled-image"));
             controlLink.setParameter(Table.PAGE, null);
             controlLink.setTitle(null);
-            String styleClass = controlLink.getAttribute("class");
-            if (styleClass == null) {
-                controlLink.setAttribute("class", "control-first");
-            } else {
-                controlLink.setAttribute("class", styleClass + " control-first");
-            }
             firstLabel = controlLink.toString();
 
             controlLink.setImageSrc(paginatorMessages.getMessage("table-inline-previous-disabled-image"));
             controlLink.setParameter(Table.PAGE, null);
             controlLink.setTitle(null);
-            if (styleClass == null) {
-                controlLink.setAttribute("class", "control-previous");
-            } else {
-                controlLink.setAttribute("class", styleClass + " control-previous");
-            }
             previousLabel = controlLink.toString();
         }
 
@@ -170,12 +148,6 @@
                 controlLink.setLabel(pageNumber);
                 controlLink.setParameter(Table.PAGE, String.valueOf(i));
                 controlLink.setTitle(gotoTitle + " " + pageNumber);
-                String styleClass = controlLink.getAttribute("class");
-                if (styleClass == null) {
-                   controlLink.setAttribute("class", "control-page");
-                } else {
-                    controlLink.setAttribute("class", styleClass + " control-page");
-                }
                 pagesBuffer.append(controlLink.toString());
             }
 
@@ -192,22 +164,11 @@
             controlLink.setImageSrc(paginatorMessages.getMessage("table-inline-next-image"));
             controlLink.setParameter(Table.PAGE, String.valueOf(table.getPageNumber() + 1));
             controlLink.setTitle(table.getMessage("table-next-title"));
-            String styleClass = controlLink.getAttribute("class");
-            if (styleClass == null) {
-               controlLink.setAttribute("class", "control-next");
-            } else {
-                controlLink.setAttribute("class", styleClass + " control-next");
-            }
             nextLabel = controlLink.toString();
 
             controlLink.setImageSrc(paginatorMessages.getMessage("table-inline-last-image"));
             controlLink.setParameter(Table.PAGE, String.valueOf(table.getNumberPages() -
1));
             controlLink.setTitle(table.getMessage("table-last-title"));
-            if (styleClass == null) {
-               controlLink.setAttribute("class", "control-last");
-            } else {
-                controlLink.setAttribute("class", styleClass + " control-last");
-            }
             lastLabel = controlLink.toString();
 
         } else {
@@ -216,22 +177,11 @@
             controlLink.setImageSrc(paginatorMessages.getMessage("table-inline-next-disabled-image"));
             controlLink.setParameter(Table.PAGE, null);
             controlLink.setTitle(null);
-            String styleClass = controlLink.getAttribute("class");
-            if (styleClass == null) {
-               controlLink.setAttribute("class", "control-next");
-            } else {
-                controlLink.setAttribute("class", styleClass + " control-next");
-            }
             nextLabel = controlLink.toString();
 
             controlLink.setImageSrc(paginatorMessages.getMessage("table-inline-last-disabled-image"));
             controlLink.setParameter(Table.PAGE, null);
             controlLink.setTitle(null);
-            if (styleClass == null) {
-               controlLink.setAttribute("class", "control-last");
-            } else {
-                controlLink.setAttribute("class", styleClass + " control-last");
-            }
             lastLabel = controlLink.toString();
         }
 

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java?rev=784478&r1=784477&r2=784478&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java Sat Jun
13 21:28:45 2009
@@ -1707,22 +1707,11 @@
                 link.setLabel(firstLabel);
                 link.setParameter(PAGE, String.valueOf(0));
                 link.setAttribute("title", firstTitle);
-                String styleClass = link.getAttribute("class");
-                if (styleClass == null) {
-                    link.setAttribute("class", "control-first");
-                } else {
-                    link.setAttribute("class", styleClass + " control-first");
-                }
                 firstLabel = link.toString();
 
                 link.setLabel(previousLabel);
                 link.setParameter(PAGE, String.valueOf(getPageNumber() - 1));
                 link.setAttribute("title", previousTitle);
-                if (styleClass == null) {
-                    link.setAttribute("class", "control-previous");
-                } else {
-                    link.setAttribute("class", styleClass + " control-previous");
-                }
                 previousLabel = link.toString();
             }
 
@@ -1745,12 +1734,6 @@
                     link.setLabel(pageNumber);
                     link.setParameter(PAGE, String.valueOf(i));
                     link.setAttribute("title", gotoTitle + " " + pageNumber);
-                    String styleClass = link.getAttribute("class");
-                    if (styleClass == null) {
-                       link.setAttribute("class", "control-page");
-                    } else {
-                        link.setAttribute("class", styleClass + " control-page");
-                    }
                     pagesBuffer.append(link.toString());
                 }
 
@@ -1764,22 +1747,11 @@
                 link.setLabel(nextLabel);
                 link.setParameter(PAGE, String.valueOf(getPageNumber() + 1));
                 link.setAttribute("title", nextTitle);
-                String styleClass = link.getAttribute("class");
-                if (styleClass == null) {
-                   link.setAttribute("class", "control-next");
-                } else {
-                    link.setAttribute("class", styleClass + " control-next");
-                }
                 nextLabel = link.toString();
 
                 link.setLabel(lastLabel);
                 link.setParameter(PAGE, String.valueOf(getNumberPages() - 1));
                 link.setAttribute("title", lastTitle);
-                if (styleClass == null) {
-                   link.setAttribute("class", "control-last");
-                } else {
-                    link.setAttribute("class", styleClass + " control-last");
-                }
                 lastLabel = link.toString();
             }
 

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/TablePaginator.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/TablePaginator.java?rev=784478&r1=784477&r2=784478&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/TablePaginator.java
(original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/TablePaginator.java
Sat Jun 13 21:28:45 2009
@@ -137,22 +137,11 @@
                 controlLink.setLabel(firstLabel);
                 controlLink.setParameter(Table.PAGE, String.valueOf(0));
                 controlLink.setTitle(firstTitle);
-                String styleClass = controlLink.getAttribute("class");
-                if (styleClass == null) {
-                   controlLink.setAttribute("class", "control-first");
-                } else {
-                    controlLink.setAttribute("class", styleClass + " control-first");
-                }
                 firstLabel = controlLink.toString();
 
                 controlLink.setLabel(previousLabel);
                 controlLink.setParameter(Table.PAGE, String.valueOf(table.getPageNumber()
- 1));
                 controlLink.setTitle(previousTitle);
-                if (styleClass == null) {
-                   controlLink.setAttribute("class", "control-previous");
-                } else {
-                    controlLink.setAttribute("class", styleClass + " control-previous");
-                }
                 previousLabel = controlLink.toString();
             }
 
@@ -175,12 +164,6 @@
                     controlLink.setLabel(pageNumber);
                     controlLink.setParameter(Table.PAGE, String.valueOf(i));
                     controlLink.setTitle(gotoTitle + " " + pageNumber);
-                    String styleClass = controlLink.getAttribute("class");
-                    if (styleClass == null) {
-                        controlLink.setAttribute("class", "control-page");
-                    } else {
-                        controlLink.setAttribute("class", styleClass + " control-page");
-                    }
                     controlLink.render(pagesBuffer);
                 }
 
@@ -194,22 +177,11 @@
                 controlLink.setLabel(nextLabel);
                 controlLink.setParameter(Table.PAGE, String.valueOf(table.getPageNumber()
+ 1));
                 controlLink.setTitle(nextTitle);
-                String styleClass = controlLink.getAttribute("class");
-                if (styleClass == null) {
-                   controlLink.setAttribute("class", "control-next");
-                } else {
-                    controlLink.setAttribute("class", styleClass + " control-next");
-                }
                 nextLabel = controlLink.toString();
 
                 controlLink.setLabel(lastLabel);
                 controlLink.setParameter(Table.PAGE, String.valueOf(table.getNumberPages()
- 1));
                 controlLink.setTitle(lastTitle);
-                if (styleClass == null) {
-                   controlLink.setAttribute("class", "control-last");
-                } else {
-                    controlLink.setAttribute("class", styleClass + " control-last");
-                }
                 lastLabel = controlLink.toString();
             }
 



Mime
View raw message