myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bom...@apache.org
Subject svn commit: r697172 [2/2] - in /myfaces/tobago/branches/tobago-1.0.x/theme: scarborough/src/main/java/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/tag/ scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough...
Date Fri, 19 Sep 2008 18:17:00 GMT
Modified: myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tab.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tab.js?rev=697172&r1=697171&r2=697172&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tab.js
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/script/tab.js
Fri Sep 19 11:17:00 2008
@@ -15,29 +15,75 @@
  * limitations under the License.
  */
 
+function tobago_switchTab(type, controlId, selectedIndex, size) {
+  if ('client' == type) {
+    tobago_selectTab(controlId, selectedIndex, size);
+  } else if ('reloadPage' == type) {
+    tobago_requestTab(controlId, selectedIndex);
+  }
+}
+
+function tobago_nextTab(type, controlId, size) {
+  var hidden = document.getElementById(controlId
+      + '__activeIndex' /* TabGroupRenderer.ACTIVE_INDEX_POSTFIX*/);
+  var selectedIndex = 0;
+  if (hidden) {
+    selectedIndex = hidden.value * 1;
+  }
+  //LOG.error("Selected Index: " + selectedIndex);
+  for (i = selectedIndex + 1; i < size; i++) {
+    var tab = document.getElementById(controlId + Tobago.SUB_COMPONENT_SEP2 + selectedIndex
+ Tobago.SUB_COMPONENT_SEP2 + i);
+    //LOG.error("Search " + controlId + Tobago.SUB_COMPONENT_SEP2 + selectedIndex + Tobago.SUB_COMPONENT_SEP2
+ i);
+    if (tab && tab.className.indexOf('tobago-tab-disabled') == -1) {
+      //LOG.error("Selected Index: " + selectedIndex);
+      selectedIndex = i;
+      break;
+    }
+  }
+  tobago_switchTab(type, controlId, selectedIndex, size);
+}
+
+function tobago_previousTab(type, controlId, size) {
+  var hidden = document.getElementById(controlId
+      + '__activeIndex' /* TabGroupRenderer.ACTIVE_INDEX_POSTFIX*/);
+  var selectedIndex = 0;
+  if (hidden) {
+    selectedIndex = hidden.value;
+  }
+
+  for (i = selectedIndex - 1; i >= 0; i--) {
+    var tab = document.getElementById(controlId + Tobago.SUB_COMPONENT_SEP2 + selectedIndex
+ Tobago.SUB_COMPONENT_SEP2 + i);
+    if (tab && tab.className.indexOf('tobago-tab-disabled') == -1) {
+      selectedIndex = i;
+      break;
+    }
+  }
+  tobago_switchTab(type, controlId, selectedIndex, size);
+}
+
 function tobago_selectTab(controlId, selectedIndex, size) {
   var hidden = document.getElementById(controlId
-      + '::activeIndex' /* TabGroupRenderer.ACTIVE_INDEX_POSTFIX*/);
+      + '__activeIndex' /* TabGroupRenderer.ACTIVE_INDEX_POSTFIX*/);
   if (hidden) {
     hidden.value = selectedIndex;
   }
 
   for (i = 0; i < size; i++) {
-    var tab = document.getElementById(controlId + '.' + i);
+    var tab = document.getElementById(controlId + Tobago.SUB_COMPONENT_SEP2 + i);
     if (tab) {
       if (i == selectedIndex) {
-        tab.style.display='block';
+        tab.style.display = 'block';
       } else {
-        tab.style.display='none';
+        tab.style.display = 'none';
       }
     }
   }
 }
 
-function tobago_requestTab(controlId, selectedIndex, formId) {
+function tobago_requestTab(controlId, selectedIndex) {
 
   var hidden = document.getElementById(controlId
-      + '::activeIndex' /* TabGroupRenderer.ACTIVE_INDEX_POSTFIX*/);
+      + '__activeIndex' /* TabGroupRenderer.ACTIVE_INDEX_POSTFIX*/);
   if (hidden) {
     hidden.value = selectedIndex;
   }

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css?rev=697172&r1=697171&r2=697172&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/scarborough/src/main/resources/org/apache/myfaces/tobago/renderkit/html/scarborough/standard/style/style.css
Fri Sep 19 11:17:00 2008
@@ -47,7 +47,7 @@
 }
 
 div.tobago-tab-selected-inner {
-  margin: 0px 0.7em;
+  margin: 0px 0.4em;
   white-space: nowrap;
 }
 
@@ -58,7 +58,7 @@
 }
 
 div.tobago-tab-unselected-inner {
-  margin: 0px 0.7em;
+  margin: 0px 0.4em;
   white-space: nowrap;
 }
 
@@ -75,6 +75,16 @@
   padding: 11px 11px;
 }
 
+div.tobago-tabnavigationbar {
+  border-bottom-color: #DDEEFF;
+  border-bottom-style: solid;
+  border-bottom-width: 1px;
+  height: 25px;
+  top: 0px;
+  margin-right: 0px;
+  position: absolute;
+}
+
 a:link.tab, a:visited.tab, a:active.tab {
   font-family: arial, helvetica, sans-serif;
   color: #000000;
@@ -447,7 +457,7 @@
 a.tobago-label-markup-number {
   padding-left: 0px;
   padding-right: 8px;
-  
+
 }
 
 div.tobago-label-default {
@@ -532,7 +542,7 @@
   height: 100%;
   top: 0px;
   left: 0px;
-  filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);
+  filter: progid: DXImageTransform . Microsoft . Alpha( style = 0, opacity = 0 );
 }
 
 .tobago-popup-content {
@@ -807,7 +817,7 @@
   overflow: hidden;
 }
 
-fieldset.tobago-separator-default  {
+fieldset.tobago-separator-default {
   border-left: 0px;
   border-bottom: 0px;
   border-right: 0px;
@@ -1031,7 +1041,7 @@
 */
 
 .tobago-tab-disabled {
-   color: #778899;
+  color: #778899;
 }
 
 .tobago-toolBar-button-label {

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java?rev=697172&r1=697171&r2=697172&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/java/org/apache/myfaces/tobago/renderkit/html/speyside/standard/tag/BoxRenderer.java
Fri Sep 19 11:17:00 2008
@@ -24,11 +24,9 @@
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_ICON_SIZE;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_LABEL_POSITION;
 import static org.apache.myfaces.tobago.TobagoConstants.ATTR_STYLE;
-import static org.apache.myfaces.tobago.TobagoConstants.ATTR_SUPPPRESS_TOOLBAR_CONTAINER;
 import static org.apache.myfaces.tobago.TobagoConstants.FACET_LABEL;
 import static org.apache.myfaces.tobago.TobagoConstants.FACET_TOOL_BAR;
 import org.apache.myfaces.tobago.ajax.api.AjaxRenderer;
@@ -65,7 +63,7 @@
     if (style != null) {
       Integer styleHeight = style.getInt("height");
       if (styleHeight != null) {
-        style.put("height", styleHeight-1);
+        style.put("height", styleHeight - 1);
       }
     }
 
@@ -159,13 +157,7 @@
     }
     writer.startElement(HtmlConstants.DIV, null);
     writer.writeClassAttribute(className);
-    attributes.put(ATTR_SUPPPRESS_TOOLBAR_CONTAINER, Boolean.TRUE);
-    if (ToolBarTag.LABEL_BOTTOM.equals(attributes.get(ATTR_LABEL_POSITION))) {
-      attributes.put(ATTR_LABEL_POSITION, ToolBarTag.LABEL_RIGHT);
-    }
-    if (ToolBarTag.ICON_BIG.equals(attributes.get(ATTR_ICON_SIZE))) {
-      attributes.put(ATTR_ICON_SIZE, ToolBarTag.ICON_SMALL);
-    }
+    toolbar.setRendererType("BoxToolBar");
     RenderUtil.encode(facesContext, toolbar);
     writer.endElement(HtmlConstants.DIV);
   }

Added: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabNext.gif
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabNext.gif?rev=697172&view=auto
==============================================================================
Binary file - no diff available.

Propchange: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabNext.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabNextDisabled.gif
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabNextDisabled.gif?rev=697172&view=auto
==============================================================================
Binary file - no diff available.

Propchange: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabNextDisabled.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabPrev.gif
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabPrev.gif?rev=697172&view=auto
==============================================================================
Binary file - no diff available.

Propchange: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabPrev.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabPrevDisabled.gif
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabPrevDisabled.gif?rev=697172&view=auto
==============================================================================
Binary file - no diff available.

Propchange: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/image/tabPrevDisabled.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css?rev=697172&r1=697171&r2=697172&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/speyside/src/main/resources/org/apache/myfaces/tobago/renderkit/html/speyside/standard/style/style.css
Fri Sep 19 11:17:00 2008
@@ -25,14 +25,14 @@
   color: #888888;
 }
 
-hr  {
+hr {
   border-top: 1px solid #E2E2E2;
   border-right: 1px solid #E2E2E2;
   border-bottom: 1px solid #000000;
   border-left: 1px solid #E2E2E2;
 }
 
-h5  {
+h5 {
   font: bold 14px arial, helvetica, sans-serif;
   margin-top: 0px;
   margin-bottom: 0px;
@@ -40,34 +40,30 @@
   padding-bottom: 0px;
 }
 
-
-
-
 /* Styles which are Speyside specific. They are reduced as much as possible,
-   but some definitions couldn?t be integrated into the new class system by
-   now. */
+but some definitions couldn?t be integrated into the new class system by
+now. */
 /*
 table {
   font: 12px arial, helvetica, sans-serif;
 }
 */
 
-.tobago-textArea-spacer-custom  {
+.tobago-textArea-spacer-custom {
   border-bottom-width: 1px;
-  border-bottom-style: solid;
-  /*none;*/
+  border-bottom-style: solid; /*none;*/
 
 }
 
 /*-- Menu --------------------------------------------------------------------*/
 
 td.menu {
- height: 100%;
- background: #c1bebe url(../image/nav_bg.gif) repeat-y right;
+  height: 100%;
+  background: #c1bebe url( ../image/nav_bg.gif ) repeat-y right;
 }
 
 /*-- Popup ------------------------------------------------------------------ */
-.tobago-popup-content  {
+.tobago-popup-content {
   background: #E2E2E2;
 }
 
@@ -75,7 +71,7 @@
   background: #333333;
   -moz-opacity: .5;
   opacity: .5;
-	filter:alpha(opacity=50);
+  filter: alpha( opacity = 50 );
 }
 
 /* Progress Control --------------------------------------------------------- */
@@ -103,19 +99,20 @@
   border-color: #000000;
   padding: 2px 0.2em 1px 0.2em;
   height: 19px;
-  background: url(../image/tab-header-selected-bg.gif) repeat-x top;
+  background: url( ../image/tab-header-selected-bg.gif ) repeat-x top;
   -moz-box-sizing: border-box;
   box-sizing: border-box;
 }
 
 div.tobago-tab-selected-inner {
+  margin: 0px 0.4em;
   font: 12px arial, helvetica, sans-serif;
   color: #660000;
 }
 
 div.tobago-tab-unselected-outer {
   border-color: #000000;
-  background: url(../image/tab-header-unselected-bg.gif) repeat-x top;
+  background: url( ../image/tab-header-unselected-bg.gif ) repeat-x top;
   -moz-box-sizing: border-box;
   box-sizing: border-box;
 }
@@ -128,9 +125,9 @@
 div.tobago-tab-fulfill {
   border-color: #000000;
   margin: 1px;
-  margin-bottom:0px;
-  margin-top:0px;
-  margin-left:0px;
+  margin-bottom: 0px;
+  margin-top: 0px;
+  margin-left: 0px;
 }
 
 .tobago-tab-content {
@@ -151,6 +148,19 @@
   box-sizing: border-box;
 }
 
+div.tobago-tabnavigationbar {
+  border-right-color: transparent;
+  border-right-style: solid;
+  border-right-width: 1px;
+  border-bottom-color: #000000;
+  border-bottom-style: solid;
+  border-bottom-width: 1px;
+  height: 22px;
+  top: -4px;
+  margin-right: 6px;
+  position: absolute;
+}
+
 a:link.tab, a:visited.tab, a:active.tab {
   font-family: arial, helvetica, sans-serif;
   font-size: 12px;
@@ -166,7 +176,7 @@
   height: 16px;
 }
 
-.tree-item-label  {
+.tree-item-label {
   font: 12px arial, helvetica, sans-serif;
 }
 
@@ -180,11 +190,12 @@
   cursor: pointer;
 }
 
-a.tree-folder-label:hover, a.tree-item-label:hover  {
+a.tree-folder-label:hover, a.tree-item-label:hover {
   color: #000000;
   text-decoration: underline;
 }
-a.tree-folder-label-disabled:hover, a.tree-item-label-disabled:hover  {
+
+a.tree-folder-label-disabled:hover, a.tree-item-label-disabled:hover {
   color: #888888;
   text-decoration: none;
   cursor: pointer;
@@ -196,25 +207,26 @@
 }
 
 .tree-item-marker, .tree-item-marker:focus, a.tree-item-marker, a.tree-item-marker:focus
{
-	background-color: #d3d3d3;
+  background-color: #d3d3d3;
 }
 
 /* -----------------------------------------------------------------------------
  these styles are only for tree-items which have no href, for that
 reason they are not defined as a:link
 ----------------------------------------------------------------------------- */
-.tree-item-label, .tree-item-label:hover  {
+.tree-item-label, .tree-item-label:hover {
   color: #000000;
 }
 
-.tree-item-label:hover  {
+.tree-item-label:hover {
   text-decoration: underline;
 }
+
 /* -------------------------------------------------------------------------- */
 
 .tree-item img {
-	vertical-align: top;
-	border: 0px;
+  vertical-align: top;
+  border: 0px;
 }
 
 .tree-icon {
@@ -223,13 +235,13 @@
 }
 
 .tree-junction {
-	width: 19px;
-	height: 16px;
+  width: 19px;
+  height: 16px;
 }
 
 .tobago-tree-menu-icon {
-	width: 16px;
-	height: 16px;
+  width: 16px;
+  height: 16px;
   float: right;
 }
 
@@ -243,7 +255,7 @@
 
 .tobago-treeNode-default img {
   vertical-align: top;
-	border: 0px;
+  border: 0px;
 }
 
 .tobago-treeNode-default a {
@@ -274,7 +286,7 @@
 }
 
 .tobago-treeNode-marker, .tobago-treeNode-marker:focus, .tobago-treeNode-marker a, .tobago-treeNode-marker:focus
a {
-	background-color: #d3d3d3;
+  background-color: #d3d3d3;
 }
 
 /* ----------------------------------------------------------------------------
@@ -286,28 +298,27 @@
 
 /* button ------------------------------------------------------------------ */
 
-.tobago-button-default  {
+.tobago-button-default {
   border: 1px #000000 solid;
   background: #ffffff;
   font: bold 12px arial, helvetica, sans-serif;
   color: #660000;
-  height: 20px;  
+  height: 20px;
 }
 
 .tobago-button-disabled {
   color: GrayText;
 }
 
-
 /* code ------------------------------------------------------------------ */
 
-.tobago-code  {
+.tobago-code {
   font: bold 14px Courier;
   color: #666666;
   padding-bottom: 2px;
 }
 
-.tobago-code-multiline  {
+.tobago-code-multiline {
   background: #CCCCCC;
   width: 530px;
   margin-top: 10px;
@@ -323,10 +334,9 @@
   margin-bottom: 0px;
 }
 
-
 /* file  ------------------------------------------------------------------- */
 
-.tobago-file-default  {
+.tobago-file-default {
   height: 20px;
 }
 
@@ -350,7 +360,7 @@
 
 .tobago-box-header {
   top: -1px;
-  background: #E8E8E8 url(../image/box-header-bg.gif) repeat-x top;
+  background: #E8E8E8 url( ../image/box-header-bg.gif ) repeat-x top;
   height: 20px;
   border: 1px solid black;
   border-bottom: 1px dotted black;
@@ -381,7 +391,6 @@
   top: -1px;
 }
 
-
 .tobago-box-content {
   position: relative;
   top: -1px;
@@ -399,7 +408,7 @@
 
 /* label ------------------------------------------------------------------- */
 
-div.tobago-label-default  {
+div.tobago-label-default {
   background: #E8E8E8;
   border: 0px solid transparent;
   vertical-align: top;
@@ -407,14 +416,14 @@
   margin: 0px;
   padding-top: 0px;
 }
-a.tobago-label-default  {
+
+a.tobago-label-default {
   padding-top: 0px;
 }
 
-label.tobago-label-default  {
-  font: bold 12px arial, helvetica, sans-serif;
-  /*height: 19px;*/
-  /*height: auto;*/
+label.tobago-label-default {
+  font: bold 12px arial, helvetica, sans-serif; /*height: 19px;*/
+/*height: auto;*/
   height: 15px;
   border: 0px solid transparent;
   margin-top: 3px;
@@ -424,9 +433,9 @@
   background-color: transparent;
 }
 
-.tobago-label-td  {
-  border: 0px solid transparent;
- /* border-bottom: 0px solid #E2E2E2;*/ /* see workaround in mozilla style! */
+.tobago-label-td {
+  border: 0px solid transparent; /* border-bottom: 0px solid #E2E2E2;*/
+/* see workaround in mozilla style! */
   vertical-align: top;
   height: 19px;
   margin: 0px;
@@ -442,28 +451,28 @@
   height: 1px;
 }
 
-label.tobago-label-disabled  {
+label.tobago-label-disabled {
   color: #808080;
 }
 
-.tobago-label-inline  {
+.tobago-label-inline {
   padding-top: 5px; /* see workaround in mozilla style! */
   padding-left: 0px;
   margin-top: 1px;
   width: auto;
 }
 
-label.tobago-label-inline  {
+label.tobago-label-inline {
   padding-left: 0px;
 }
 
 label.tobago-label-error {
-  background: url(../image/label-error-bg.gif) no-repeat bottom left;
+  background: url( ../image/label-error-bg.gif ) no-repeat bottom left;
   color: #FF0000;
 }
 
 /* page -------------------------------------------------------------------- */
-.tobago-page-default  {
+.tobago-page-default {
   background: #E2E2E2;
   font: 12px arial, helvetica, sans-serif;
   margin-bottom: 0px;
@@ -486,14 +495,14 @@
 
 /* text -------------------------------------------------------------------- */
 
-.tobago-out-default  {
+.tobago-out-default {
   font-family: arial, helvetica, sans-serif;
   font-size: 12px;
 }
 
 /* textArea ---------------------------------------------------------------- */
 
-.tobago-textArea-default  {
+.tobago-textArea-default {
   font: 12px arial, helvetica, sans-serif;
   background: #ffffff;
   color: #000000;
@@ -502,22 +511,22 @@
   padding-left: 2px;
 }
 
-.tobago-textArea-readonly  {
+.tobago-textArea-readonly {
   background-color: #E8E8E8;
 }
 
-.tobago-textArea-disabled  {
+.tobago-textArea-disabled {
   color: #808080;
   background-color: #E8E8E8;
 }
 
-.tobago-textArea-error  {
+.tobago-textArea-error {
   border: 1px solid #FF0000;
 }
 
 /* in ---------------------------------------------------------------------- */
 
-.tobago-in-default  {
+.tobago-in-default {
   border: 1px #000000 solid;
   height: 20px;
   font: 12px arial, helvetica, sans-serif;
@@ -525,11 +534,11 @@
   padding-right: 2px;
 }
 
-.tobago-in-readonly  {
+.tobago-in-readonly {
   background-color: #E8E8E8;
 }
 
-.tobago-in-disabled  {
+.tobago-in-disabled {
   color: #808080;
   background-color: #E8E8E8;
 }
@@ -538,10 +547,9 @@
   border: 1px solid #FF0000;
 }
 
-
 /* date ---------------------------------------------------------------------- */
 
-.tobago-date-default  {
+.tobago-date-default {
   border: 1px #000000 solid;
   height: 20px;
   font: 12px arial, helvetica, sans-serif;
@@ -549,11 +557,11 @@
   padding-right: 2px;
 }
 
-.tobago-date-readonly  {
+.tobago-date-readonly {
   background-color: #E8E8E8;
 }
 
-.tobago-date-disabled  {
+.tobago-date-disabled {
   color: #808080;
   background-color: #E8E8E8;
 }
@@ -562,35 +570,33 @@
   border: 1px solid #FF0000;
 }
 
-
 /* selectOneChoice --------------------------------------------------------- */
 
-.tobago-selectOneChoice-default  {
+.tobago-selectOneChoice-default {
   border: 1px solid #000000;
   font: 12px arial, helvetica, sans-serif;
   color: #000000;
 }
 
-.tobago-selectOneChoice-error  {
+.tobago-selectOneChoice-error {
   border: 1px solid #FF0000;
 }
 
 /* selectOneRadio --------------------------------------------------------- */
 
-.tobago-selectOneRadio-default  {
+.tobago-selectOneRadio-default {
   border: 1px;
   font: 12px arial, helvetica, sans-serif;
   color: #000000;
 }
 
-.tobago-selectOneRadio-error  {
+.tobago-selectOneRadio-error {
   border: 1px solid #FF0000;
 }
 
-
 /* selectManyListbox ------------------------------------------------------- */
 
-.tobago-selectManyListbox-default  {
+.tobago-selectManyListbox-default {
   font: 12px arial, helvetica, sans-serif;
   padding-top: -1px;
   color: #000000;
@@ -599,7 +605,7 @@
 }
 
 /* selectOnelistbox -------------------------------------------------------- */
-.tobago-selectOneListbox-default  {
+.tobago-selectOneListbox-default {
   font: 12px arial, helvetica, sans-serif;
   color: #000000;
 }
@@ -627,6 +633,7 @@
 .tobago-time-borderDiv-seconds {
   width: 83px;
 }
+
 .tobago-time-input {
   height: 18px;
   font: 12px arial, helvetica, sans-serif;
@@ -645,9 +652,11 @@
 .tobago-time-inc-image {
   left: 60px;
 }
+
 .tobago-time-dec-image {
   left: 60px;
 }
+
 .tobago-time-image-seconds {
   left: 88;
 }
@@ -657,6 +666,7 @@
   font: 12px arial, helvetica, sans-serif;
   color: #000000;
 }
+
 /*
 .tobago-treeListbox-disabled {
   background-color: #E8E8E8;
@@ -723,7 +733,7 @@
   cursor: pointer;
   margin: 0px;
   border: 1px solid #999999;
-  background: #cccccc url(../image/toolbarButtonBoxFacetSelectEnabled.gif) repeat-x top;
+  background: #cccccc url( ../image/toolbarButtonBoxFacetSelectEnabled.gif ) repeat-x top;
 }
 
 .tobago-toolBar-button-disabled {
@@ -740,7 +750,7 @@
 }
 
 .tobago-toolBar-button-menu {
-  width:  15px;
+  width: 15px;
   height: 15px;
 }
 
@@ -753,6 +763,7 @@
   background: #c5c5c5;
   margin: 0px;
 }
+
 .tobago-toolBar-button-menu-focus {
   border: 1px solid black;
   background: #bbbbbb;
@@ -770,11 +781,10 @@
 }
 
 /* - Calendar --------------------------------------------------------------- */
-.tobago-calendar-header  {
+.tobago-calendar-header {
   text-decoration: underline;
 }
 
-
 .tobago-calendar-day {
   font: 12px arial, helvetica, sans-serif;
 }

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tabgroup.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tabgroup.js?rev=697172&r1=697171&r2=697172&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tabgroup.js
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tabgroup.js
Fri Sep 19 11:17:00 2008
@@ -18,31 +18,31 @@
 
 Tobago.TabGroup = function(tabGroupId, activeIndex, size) {
   this.tabGroupId = tabGroupId,
-  this.activeIndex = activeIndex;
+  this.activeIndex = activeIndex * 1;
   this.size = size;
-  this.activeTabId  = tabGroupId + '.' + activeIndex;
+  this.activeTabId = tabGroupId + Tobago.SUB_COMPONENT_SEP2 + activeIndex;
   LOG.debug("activeTabId : " + this.activeTabId);
 
   Tobago.element(this.tabGroupId).jsObject = this;
   Tobago.addJsObject(this);
 
-//  var htmlId = this.tabGroupId;
-//
-//  var onComplete = function() {
-//    LOG.debug("htmlId = " + htmlId);
-//    var obj = document.getElementById(htmlId).jsObject;
-//    LOG.debug("obj = " + typeof obj);
-//    obj.onComplete.apply(obj, []);
-//  };
+  //  var htmlId = this.tabGroupId;
+  //
+  //  var onComplete = function() {
+  //    LOG.debug("htmlId = " + htmlId);
+  //    var obj = document.getElementById(htmlId).jsObject;
+  //    LOG.debug("obj = " + typeof obj);
+  //    obj.onComplete.apply(obj, []);
+  //  };
 
   //    this.options.onComplete = this.onComplete.bind(this);
 
   this.options = {
-      method: 'post',
-      asynchronous: true,
-      parameters: '',
-      evalScripts: true,
-      onComplete: Tobago.bind(this, "onComplete")
+    method: 'post',
+    asynchronous: true,
+    parameters: '',
+    evalScripts: true,
+    onComplete: Tobago.bind(this, "onComplete")
   };
 
   LOG.debug("onComplete = " + this.options.onComplete);
@@ -51,38 +51,148 @@
 };
 
 Tobago.TabGroup.prototype.setUp = function() {
-    LOG.debug("tabgroup id " + this.tabGroupId);
-    LOG.debug("setup tabgroup " + this.activeTabId);
-    LOG.debug("activeIndex " + this.activeIndex);
-    var i = 0;
-    var idPrefix = this.activeTabId + Tobago.SUB_COMPONENT_SEP;
-
-//    var htmlId = this.tabGroupId;
-    for (i = 0; i < this.size; i++) {
-
-      var anchor = Tobago.element(idPrefix + i);
-      if (anchor) {
-        LOG.debug("observe tab " + anchor.id);
-//      if (i != this.activeIndex) {
-//        Event.observe(anchor, "click", this.reload.bindAsEventListener(this));
-//      }
-
-//      var onClick = function(event) {
-//        LOG.debug("htmlId = " + htmlId);
-//        var obj = document.getElementById(htmlId).jsObject;
-//        LOG.debug("obj = " + obj);
-//        LOG.debug("obj.reload = " + obj.reload);
-//        obj.reload.call(obj, event);
-//      };
+  LOG.debug("tabgroup id " + this.tabGroupId);
+  LOG.debug("setup tabgroup " + this.activeTabId);
+  LOG.debug("activeIndex " + this.activeIndex);
+  var i = 0;
+  var idPrefix = this.activeTabId + Tobago.SUB_COMPONENT_SEP2;
+
+  //    var htmlId = this.tabGroupId;
+  for (i = 0; i < this.size; i++) {
+
+    var anchor = Tobago.element(idPrefix + i);
+    if (anchor) {
+      LOG.debug("observe tab " + anchor.id);
+      //      if (i != this.activeIndex) {
+      //        Event.observe(anchor, "click", this.reload.bindAsEventListener(this));
+      //      }
+
+      //      var onClick = function(event) {
+      //        LOG.debug("htmlId = " + htmlId);
+      //        var obj = document.getElementById(htmlId).jsObject;
+      //        LOG.debug("obj = " + obj);
+      //        LOG.debug("obj.reload = " + obj.reload);
+      //        obj.reload.call(obj, event);
+      //      };
 
-//      Tobago.addEventListener(anchor, "click", onClick);
-        Tobago.addBindEventListener(anchor, "click", this, "reload");
+      //      Tobago.addEventListener(anchor, "click", onClick);
+      Tobago.addBindEventListener(anchor, "click", this, "reload");
+    }
+    /*var menu = Tobago.element(idPrefix + i + Tobago.SUB_COMPONENT_SEP2 + "menu");
+     if (menu) {
+     Tobago.addBindEventListener(menu, "click", this, "reload");
+     } else {
+     LOG.error("Menu not found " + idPrefix + i + Tobago.SUB_COMPONENT_SEP2 + "menu");
+     }*/
+  }
+  var next = Tobago.element(idPrefix + "next");
+  var previous = Tobago.element(idPrefix + "previous");
+  if (next) {
+    Tobago.addBindEventListener(next, "click", this, "next");
+  } //else {
+  //LOG.error("Next not found " + idPrefix + "next");
+  //}
+  if (previous) {
+    Tobago.addBindEventListener(previous, "click", this, "previous");
+  } //else {
+  //LOG.error("Previous not found " + idPrefix + "previous");
+  //}
+
+};
+
+Tobago.TabGroup.prototype.next = function(event) {
+  LOG.debug("Reload ");
+  if (event) {
+    var element = Tobago.element(event);
+    if (!element.id) {
+      element = element.parentElement;
+    }
+
+    if (element.className && element.className.indexOf("tobago-") != -1) {
+      //LOG.error(element.id);
+      var idPrefix = element.id.substring(0, element.id.lastIndexOf(Tobago.SUB_COMPONENT_SEP2)
+ Tobago.SUB_COMPONENT_SEP2.length);
+      //LOG.error(idPrefix);
+      for (i = this.activeIndex + 1; i < this.size; i++) {
+        var id = idPrefix + i;
+        var div = Tobago.element(id);
+        if (div) {
+          this.activeIndex = i;
+          break;
+        }
+      }
+      //this.activeIndex =
+      //LOG.error("Request tab with index " + this.activeIndex);
+
+      var hidden = Tobago.element(this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex");
+      if (hidden) {
+        hidden.value = this.activeIndex;
+      }
+      else {
+        LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP2
+ "activeIndex" + "'");
+        LOG.warn("aId = " + aId);
       }
+      if (Tobago.Updater.hasTransport()) {
+        var id = idPrefix + this.activeIndex;
+        this.removeRelatedAcceleratorKeys(id.substring(0, id.lastIndexOf(Tobago.SUB_COMPONENT_SEP2)
+ Tobago.SUB_COMPONENT_SEP2.length));
+        var container = Tobago.element(this.tabGroupId);
+        Tobago.Updater.update2(event.srcElement, container, Tobago.page, this.tabGroupId,
this.tabGroupId, this.options);
+      } else {
+        Tobago.submitAction2(event.srcElement, this.tabGroupId, null, null);
+      }
+    }
+  } else {
+    LOG.info("No reload Event");
+  }
+
+};
+
+Tobago.TabGroup.prototype.previous = function(event) {
+  LOG.debug("Reload ");
+  if (event) {
+    var element = Tobago.element(event);
+    if (!element.id) {
+      element = element.parentElement;
     }
+    //LOG.debug(element.className);
+    if (element.className && element.className.indexOf("tobago") != -1) {
+      //LOG.error(element.id);
+      var idPrefix = element.id.substring(0, element.id.lastIndexOf(Tobago.SUB_COMPONENT_SEP2)
+ Tobago.SUB_COMPONENT_SEP2.length);
+      //LOG.error(idPrefix);
+      for (i = this.activeIndex - 1; i >= 0; i--) {
+        var id = idPrefix + i;
+        var div = Tobago.element(id);
+        if (div) {
+          this.activeIndex = i;
+          break;
+        }
+      }
+      //this.activeIndex =
+      //LOG.error("Request tab with index " + this.activeIndex);
 
+      var hidden = Tobago.element(this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex");
+      if (hidden) {
+        hidden.value = this.activeIndex;
+      }
+      else {
+        LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP2
+ "activeIndex" + "'");
+        LOG.warn("aId = " + aId);
+      }
+      if (Tobago.Updater.hasTransport()) {
+        var id = idPrefix + this.activeIndex;
+        this.removeRelatedAcceleratorKeys(id.substring(0, id.lastIndexOf(Tobago.SUB_COMPONENT_SEP2)
+ Tobago.SUB_COMPONENT_SEP2.length));
+        var container = Tobago.element(this.tabGroupId);
+        Tobago.Updater.update2(event.srcElement, container, Tobago.page, this.tabGroupId,
this.tabGroupId, this.options);
+      } else {
+        Tobago.submitAction2(event.srcElement, this.tabGroupId, null, null);
+      }
+    }
+  } else {
+    LOG.info("No reload Event");
+  }
 
 };
 
+
 Tobago.TabGroup.prototype.reload = function(event) {
   LOG.debug("Reload ");
   if (event) {
@@ -93,19 +203,19 @@
     //LOG.debug(element.className);
     if (element.className && element.className.indexOf("tobago-tab-link") != -1)
{
       var aId = Tobago.findAnchestorWithTagName(element, 'span').id;
-      this.activeIndex = aId.substring(aId.lastIndexOf(Tobago.SUB_COMPONENT_SEP) + Tobago.SUB_COMPONENT_SEP.length);
+      this.activeIndex = aId.substring(aId.lastIndexOf(Tobago.SUB_COMPONENT_SEP2) + Tobago.SUB_COMPONENT_SEP2.length);
       LOG.debug("Request tab with index " + this.activeIndex);
 
-      var hidden = Tobago.element(this.tabGroupId + Tobago.SUB_COMPONENT_SEP + "activeIndex");
+      var hidden = Tobago.element(this.tabGroupId + Tobago.SUB_COMPONENT_SEP2 + "activeIndex");
       if (hidden) {
         hidden.value = this.activeIndex;
       }
       else {
-        LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP
+ "activeIndex" + "'");
+        LOG.warn("No hidden field for tabindex Id='" + this.tabGroupId + Tobago.SUB_COMPONENT_SEP2
+ "activeIndex" + "'");
         LOG.warn("aId = " + aId);
       }
       if (Tobago.Updater.hasTransport()) {
-        this.removeRelatedAcceleratorKeys(aId.substring(0, aId.lastIndexOf(Tobago.SUB_COMPONENT_SEP)
+ Tobago.SUB_COMPONENT_SEP.length));
+        this.removeRelatedAcceleratorKeys(aId.substring(0, aId.lastIndexOf(Tobago.SUB_COMPONENT_SEP2)
+ Tobago.SUB_COMPONENT_SEP2.length));
         var container = Tobago.element(this.tabGroupId);
         Tobago.Updater.update2(event.srcElement, container, Tobago.page, this.tabGroupId,
this.tabGroupId, this.options);
       } else {
@@ -119,19 +229,19 @@
 };
 
 Tobago.TabGroup.prototype.removeRelatedAcceleratorKeys = function(idPrefix) {
-    var regex = new RegExp("Tobago.clickOnElement\\([\"']" + idPrefix);
-    for (var name in Tobago.acceleratorKeys) {
-      if (typeof Tobago.acceleratorKeys[name] == 'object'
-          && typeof Tobago.acceleratorKeys[name].func == 'function'
-          && regex.test(Tobago.acceleratorKeys[name].func.valueOf())) {
-        Tobago.acceleratorKeys.remove(Tobago.acceleratorKeys[name]);
-      }
+  var regex = new RegExp("Tobago.clickOnElement\\([\"']" + idPrefix);
+  for (var name in Tobago.acceleratorKeys) {
+    if (typeof Tobago.acceleratorKeys[name] == 'object'
+        && typeof Tobago.acceleratorKeys[name].func == 'function'
+        && regex.test(Tobago.acceleratorKeys[name].func.valueOf())) {
+      Tobago.acceleratorKeys.remove(Tobago.acceleratorKeys[name]);
     }
+  }
 };
 
 Tobago.TabGroup.prototype.onComplete = function(request) {
-    LOG.debug("tabgroup loaded : ");
-    this.activeTabId = Tobago.element(this.tabGroupId).firstChild.id;
-    LOG.debug("activeTabId : " + this.activeTabId);
-    this.setUp();
+  LOG.debug("tabgroup loaded : ");
+  this.activeTabId = Tobago.element(this.tabGroupId).firstChild.id;
+  LOG.debug("activeTabId : " + this.activeTabId);
+  this.setUp();
 };

Modified: myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
URL: http://svn.apache.org/viewvc/myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js?rev=697172&r1=697171&r2=697172&view=diff
==============================================================================
--- myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
(original)
+++ myfaces/tobago/branches/tobago-1.0.x/theme/standard/src/main/resources/org/apache/myfaces/tobago/renderkit/html/standard/standard/script/tobago.js
Fri Sep 19 11:17:00 2008
@@ -61,6 +61,12 @@
     */
   SUB_COMPONENT_SEP: "::",
 
+  /**
+   * Tobago's subComponent separator constant
+   */
+  SUB_COMPONENT_SEP2: "__",
+
+
   EMPTY_HREF: window.all ? "#" : "javascript:;",
 
   /**
@@ -217,12 +223,12 @@
 
   isSubmit: false,
 
- 
+
   /**
     * The id of a initially loaded popup (not by ajax)
     */
   initialPopupId: null,
-  
+
   /**
     * Count of currently open popups
     */
@@ -945,7 +951,7 @@
         Tobago.removeCssClass(iframe, "tobago-popup-none");
       }
     }
-    
+
     var contains = false;
     for(var i = 0; i < Tobago.openPopups.length; i++) {
       if (Tobago.openPopups[i] == id) {
@@ -965,7 +971,7 @@
     }
 
   },
- 
+
   /**
     * Locks the parent page of a popup when it is opened
     */
@@ -986,7 +992,7 @@
       var element = document.forms[0].elements[i];
       if (element.type != "hidden" && !element.disabled) {
         if (element.id.indexOf(id + ":") != 0) {
-         element.disabled = true;        
+         element.disabled = true;
          hidden.value += element.id + ",";
        } else {
          if (firstPopupElement == null && element.focus) {
@@ -999,7 +1005,7 @@
       var element = document.anchors[i];
       if (!element.disabled) {
         if (element.id.indexOf(id + ":") != 0) {
-         element.disabled = true;        
+         element.disabled = true;
          hidden.value += element.id + ",";
        } else {
          if (firstPopupElement == null && element.focus) {
@@ -1082,7 +1088,7 @@
 
     Tobago.removeEventListener(window, "resize", Tobago.popupResizeStub);
     Tobago.popupResizeStub = null;
-    
+
     //LOG.info("unlockPopupPage " + id);
     Tobago.unlockPopupPage(id);
     Tobago.openPopups.pop();
@@ -1096,7 +1102,7 @@
 
   /**
     * Unlock the parent page of a popup when it is closed
-    */  
+    */
   unlockPopupPage: function(id) {
     // enable all elements and anchors on page stored in a hidden field
     var hidden = Tobago.element(id + Tobago.SUB_COMPONENT_SEP + "disabledElements");



Mime
View raw message