Author: ito
Date: Mon Jan 25 16:35:35 2010
New Revision: 902864

URL: http://svn.apache.org/viewvc?rev=902864&view=rev
Log:
CLEREZZA-77: closed

Added:
    
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/images/panel/tab-button-default.png
      - copied unchanged from r902859, 
incubator/clerezza/issues/CLEREZZA-77/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/images/panel/tab-button-default.png
Modified:
    
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/
   (props changed)
    
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/README.txt
    
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/headed-page-template.ssp
    
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/panel.css
    
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/scripts/panel.js

Propchange: 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Jan 25 16:35:35 2010
@@ -1,2 +1,2 @@
 
/incubator/clerezza/issues/CLEREZZA-52/org.apache.clerezza.web.resources.style:894321-894392
-/incubator/clerezza/issues/CLEREZZA-77/org.apache.clerezza.web.resources.style:900408-901934
+/incubator/clerezza/issues/CLEREZZA-77/org.apache.clerezza.web.resources.style:900408-902859

Modified: 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/README.txt
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/README.txt?rev=902864&r1=902863&r2=902864&view=diff
==============================================================================
--- 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/README.txt
 (original)
+++ 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/README.txt
 Mon Jan 25 16:35:35 2010
@@ -1,18 +1,17 @@
 How to create a tab in the Panel:
 
 
-1. Add your panel to a page from type HeadedPage with the ResultDocModifier. 
The
-first node of your panel must have an id, which identifies the tab.
+1. Add your panel tab to a page from type HeadedPage by using the 
ResultDocModifier. The
+first node of your panel tab must have an id, which identifies the tab. A 
title of
+the panel tab could be set by adding a <h3>title</h3> to the first node.
 
 e.g.
-resultDocModifier.addNodes2Elem("tx-panel-detail", <div id="my-tab">My 
Tab</div>);
+resultDocModifier.addNodes2Elem("tx-panel-tabs", <div id="my-tab"><h3>My Tab 
Title</h3>My Tab</div>);
 
-2. The id of the first node of your panel can be used as style information for 
the tab button.
-The following snippet adds an icon to the tab button (the size of an icon has 
to be
-22x22):
+2. The id of the first node of your panel can be used as style information for
+the tab button and specifies the title of the tab button. The following snippet
+adds an icon to the tab button (the size of an icon has to be 22x22):
 
-li.my-tab a {
+.tx-panel .tx-tab-buttons li.my-tab a {
        background-image:url(/path/images/panel/standard-tab.png);
 }
-
-

Modified: 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/headed-page-template.ssp
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/headed-page-template.ssp?rev=902864&r1=902863&r2=902864&view=diff
==============================================================================
--- 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/headed-page-template.ssp
 (original)
+++ 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/headed-page-template.ssp
 Mon Jan 25 16:35:35 2010
@@ -38,13 +38,13 @@
                </div>
                <div class="tx-panel" id="tx-panel">
                        <a href="#" class="tx-panel-open-close 
tx-icon-left-inverse" id="tx-panel-open-close">open/close</a>
-                       <div id="tx-panel-title"></div>
+                       <div id="tx-panel-title"><h3></h3></div>
                        <div class="tx-panel-window">
-                               <div class="tx-tab" id="tx-panel-tab">
-                                       <ol id="tx-tab-panel-ol">
+                               <div class="tx-panel-tab-buttons" 
id="tx-panel-tab-buttons">
+                                       <ol id="tx-panel-tab-buttons-ol">
                                        </ol>
                                </div>
-                               <div class="tx-panel-detail" 
id="tx-panel-detail"></div>
+                               <div class="tx-panel-tabs" 
id="tx-panel-tabs"></div>
                        </div>
                </div>
                {render(res,"naked")}

Modified: 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/panel.css
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/panel.css?rev=902864&r1=902863&r2=902864&view=diff
==============================================================================
--- 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/panel.css
 (original)
+++ 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/panel.css
 Mon Jan 25 16:35:35 2010
@@ -13,7 +13,7 @@
        overflow: hidden;
 }
 
-.tx-panel.tx-close .tx-tab ol  {
+.tx-panel.tx-close .tx-panel-tab-buttons ol  {
        display: none;
 }
 
@@ -36,19 +36,19 @@
        line-height: 2.2em;
        margin: 0 0 0.5em 26px;
        width: 21em;
-       /* for the border of the tx-panel2-detail box */
+       /* for the border of the tx-panel-tabs box */
        padding-right: 2px;
        padding-left: 1em;
 }
 
-.tx-panel-detail {
+.tx-panel-tabs {
        border: solid 1px #bdbdbd;
        margin-left: 26px;
        width: 22em;
        min-height: 98%;
 }
 
-.tx-panel-detail > div {
+.tx-panel-tabs > div {
        padding: 1em;
        background-image: url(./images/bg/fade-filter.png);
        background-repeat: repeat-x;
@@ -217,7 +217,7 @@
 
 /* tabs */
 
-.tx-panel .tx-tab {
+.tx-panel .tx-panel-tab-buttons {
        background-color: #dadada;
        background-image: url(./images/panel/bg-tab.png);
        background-repeat: repeat-y;
@@ -227,19 +227,20 @@
        padding-bottom: 2px;
 }
 
-.tx-panel .tx-tab ol {
+.tx-panel .tx-panel-tab-buttons ol {
        width: 26px;
        margin: 0;
        padding: 0;
        list-style: none;
 }
 
-.tx-panel .tx-tab li {
+.tx-panel .tx-panel-tab-buttons li {
        margin: 0;
        padding: 0;
 }
 
-.tx-panel .tx-tab li a {
+.tx-panel .tx-panel-tab-buttons li a {
+       background-image: url(./images/panel/tab-button-default.png);
        height: 30px;
        width: 26px;
        display: block;
@@ -248,7 +249,7 @@
        text-indent: -9999px;
 }
 
-.tx-panel .tx-tab li.tx-active a {
+.tx-panel .tx-panel-tab-buttons li.tx-active a {
        background-color: #ffffff;
        border: solid 1px #bdbdbd;
        border-right: none;

Modified: 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/scripts/panel.js
URL: 
http://svn.apache.org/viewvc/incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/scripts/panel.js?rev=902864&r1=902863&r2=902864&view=diff
==============================================================================
--- 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/scripts/panel.js
 (original)
+++ 
incubator/clerezza/trunk/org.apache.clerezza.parent/org.apache.clerezza.web.resources.style/src/main/resources/org/apache/clerezza/web/resources/style/staticweb/scripts/panel.js
 Mon Jan 25 16:35:35 2010
@@ -1,16 +1,23 @@
 $(document).ready(function () {
-       if($("#tx-panel-detail").children().length == 0){
+       if($("#tx-panel-tabs").children().length == 0){
                $("#tx-panel").hide();
        } else {
-               $("#tx-panel-detail").children().each(function() {
-                       var li = $("<li/>").addClass($(this).attr("id"))
+               $("#tx-panel-tabs").children().each(function() {
+                       var titleElem =  $("#" + $(this).attr("id") + " > 
h3:first");
+                       var title = $(this).attr("id");
+                       if(titleElem.length > 0) {
+                               titleElem.hide();
+                               title = titleElem.text();
+                       }
+                       var li = 
$("<li/>").addClass($(this).attr("id")).attr("title", title);
                        var aHref = $("<a/>").attr("href", "#").text("tab");
                        aHref.bind("click", function () {
                                if(!$(this).parent().hasClass("tx-active")) {
-                                       
$("#tx-panel-detail").children().each(function() {
+                                       $("#tx-panel-title > 
h3").text($(this).parent().attr("title"));
+                                       
$("#tx-panel-tabs").children().each(function() {
                                                $(this).hide();
                                        });
-                                       
$("#tx-tab-panel-ol").children().each(function() {
+                                       
$("#tx-panel-tab-buttons-ol").children().each(function() {
                                                
$(this).removeClass("tx-active");
                                        });
                                        $("#" + 
$(this).parent().attr("class")).show();
@@ -18,12 +25,13 @@
                                }
                        })
                        li.append(aHref);
-                       $("#tx-tab-panel-ol").append(li);
+                       $("#tx-panel-tab-buttons-ol").append(li);
                });
-               $("#tx-panel-detail").children(":not(:first)").each(function() {
+               $("#tx-panel-tabs").children(":not(:first)").each(function() {
                        $(this).hide();
                });
-               $("#tx-tab-panel-ol").children(":first").each(function() {
+               
$("#tx-panel-tab-buttons-ol").children(":first").each(function() {
+                       $("#tx-panel-title > h3").text($(this).attr("title"));
                        $(this).addClass("tx-active");
                });     
        }


Reply via email to