Author: d.bulahov
Date: 2007-03-12 09:58:58 -0400 (Mon, 12 Mar 2007)
New Revision: 46
Modified:
trunk/richfaces/panelbar/src/main/config/component/panelbar.xml
trunk/richfaces/panelbar/src/main/resources/org/richfaces/renderkit/html/css/panelbar.xcss
trunk/richfaces/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
trunk/richfaces/panelbar/src/main/templates/panelBarItem.jspx
Log:
http://jira.exadel.com/browse/RFA-306 fixed
Modified: trunk/richfaces/panelbar/src/main/config/component/panelbar.xml
===================================================================
--- trunk/richfaces/panelbar/src/main/config/component/panelbar.xml 2007-03-09 20:34:41
UTC (rev 45)
+++ trunk/richfaces/panelbar/src/main/config/component/panelbar.xml 2007-03-12 13:58:58
UTC (rev 46)
@@ -52,6 +52,19 @@
<classname>java.lang.String</classname>
<description>The component style class</description>
</property>
+ <property>
+ <name>headerStyleActive</name>
+ <classname>java.lang.String</classname>
+ <description>The component header style active</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>headerClassActive</name>
+ <classname>java.lang.String</classname>
+ <description>The component header style class
active</description>
+ </property>
+
+
&ui_component_attributes;
&header_component_attributes;
&content_component_attributes;
@@ -85,6 +98,18 @@
<description>Label text appears on a panel item header</description>
<defaultvalue><![CDATA["auto generated
label"]]></defaultvalue>
</property>
+ <property>
+ <name>headerStyleActive</name>
+ <classname>java.lang.String</classname>
+ <description>The component header style active</description>
+ <defaultvalue><![CDATA[""]]></defaultvalue>
+ </property>
+ <property>
+ <name>headerClassActive</name>
+ <classname>java.lang.String</classname>
+ <description>The component header style class
active</description>
+ </property>
+
&ui_component_attributes;
&header_component_attributes;
&content_component_attributes;
Modified:
trunk/richfaces/panelbar/src/main/resources/org/richfaces/renderkit/html/css/panelbar.xcss
===================================================================
---
trunk/richfaces/panelbar/src/main/resources/org/richfaces/renderkit/html/css/panelbar.xcss 2007-03-09
20:34:41 UTC (rev 45)
+++
trunk/richfaces/panelbar/src/main/resources/org/richfaces/renderkit/html/css/panelbar.xcss 2007-03-12
13:58:58 UTC (rev 46)
@@ -16,11 +16,20 @@
padding : 0px 1px 1px 5px;
cursor : pointer;
}
+
+.dr-pnlbar-h-act{
+ border : 0px solid red;
+ padding : 0px 1px 1px 5px;
+ cursor : pointer;
+}
+
+
.dr-pnlbar-c{
padding : 10px;
text-align : left;
vertical-align : top;
}
+
.dr-pnlbar-b{
border-top-width: 0px !important;
border-left-width: 0px !important;
@@ -48,11 +57,27 @@
<u:style name="font-family" skin="headerFamilyFont" />
</u:selector>
+<u:selector name=".dr-pnlbar-h-act">
+ <u:style name="background-image" >
+ <f:resource f:key="org.richfaces.renderkit.html.GradientA"/>
+ </u:style>
+ <u:style name="background-position" value="top left"/>
+ <u:style name="background-repeat" value="repeat-x"/>
+ <u:style name="vertical-align" value="middle"/>
+ <u:style name="color" skin="headerTextColor" />
+ <u:style name="background-color" skin="headerBackgroundColor"
/>
+ <u:style name="font-size" skin="headerSizeFont" />
+ <u:style name="font-weight" skin="headerWeightFont" />
+ <u:style name="font-family" skin="headerFamilyFont" />
+</u:selector>
+
+
<u:selector name=".dr-pnlbar-c">
<u:style name="color" skin="generalTextColor" />
<u:style name="font-size" skin="preferableDataSizeFont" />
<u:style name="font-family" skin="preferableDataFamilyFont"
/>
</u:selector>
+
<u:selector name=".dr-pnlbar-ext">
<u:style name="background-color" skin="generalBackgroundColor"
/>
Modified:
trunk/richfaces/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js
===================================================================
---
trunk/richfaces/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2007-03-09
20:34:41 UTC (rev 45)
+++
trunk/richfaces/panelbar/src/main/resources/org/richfaces/renderkit/html/scripts/panelbar.js 2007-03-12
13:58:58 UTC (rev 46)
@@ -89,7 +89,7 @@
var rows=this._getDirectChildrenByTag(this.panel,'DIV');
for(var i=0; i<rows.length; i++) {
var subrows=this._getDirectChildrenByTag(rows[i],'DIV');
- this.slides.push(new Exadel.PanelBar.Slide(this,rows[i],subrows[0],subrows[1],i));
//ndex
+ this.slides.push(new
Exadel.PanelBar.Slide(this,rows[i],subrows[0],subrows[1],subrows[2],i)); //ndex
}
},
@@ -113,12 +113,13 @@
Exadel.PanelBar.Slide = Class.create();
Exadel.PanelBar.Slide.prototype = {
- initialize: function(slidePanel,item,header,content,index){
+ initialize: function(slidePanel,item,header,header_act,content,index){
this.index=index;
this.slidePanel=slidePanel;
this.item=item;
this.header=header;
+ this.header_act=header_act;
this.content=content;
this.item.style.overflow="hidden";
// this.header.style.overflowX="hidden";
@@ -126,6 +127,8 @@
// this.header.style.cursor="pointer";
this.header.onclick=this.headerOnClick.bindAsEventListener(this);
this.header.onselectstart=this.headerOnSelectStart.bindAsEventListener(this);
+ this.header_act.onclick=this.headerOnClick.bindAsEventListener(this);
+ this.header_act.onselectstart=this.headerOnSelectStart.bindAsEventListener(this);
this.content.style.display="none";
this.content.style.overflow="auto";
this.content.style.height="0px";
@@ -146,15 +149,22 @@
showContent: function() {
this.content.style.display="block";
this.content.firstChild.style.height="";
+ this.header.style.display="none";
+ this.header_act.style.display="";
+
},
hideContent: function() {
this.content.style.display="none";
this.content.firstChild.style.height="100%";
+ this.header_act.style.display="none";
+ this.header.style.display="";
},
headerOnClick: function() {
- if (this.content.style.display=="block") return;
+ if (this.content.style.display=="block") return;
+ //this.header.style.display="none";
+ //this.header_act.style.display="";
this.slidePanel.showSlide(this);
this.slidePanel.panel.style.maxHeight="";
this.slidePanel.panel.style.minHeight="";
Modified: trunk/richfaces/panelbar/src/main/templates/panelBarItem.jspx
===================================================================
--- trunk/richfaces/panelbar/src/main/templates/panelBarItem.jspx 2007-03-09 20:34:41 UTC
(rev 45)
+++ trunk/richfaces/panelbar/src/main/templates/panelBarItem.jspx 2007-03-12 13:58:58 UTC
(rev 46)
@@ -15,6 +15,10 @@
style="#{component.panel.attributes['headerStyle']};#{component.attributes['headerStyle']}">
#{component.attributes['label']}
</div>
+ <div class="dr-pnlbar-h-act rich-panelbar-header-act
#{component.panel.attributes['headerClassActive']}
#{component.attributes['headerClassActive']}"
+ style="#{component.panel.attributes['headerStyle']};#{component.attributes['headerStyle']};#{component.panel.attributes['headerStyleActive']};#{component.attributes['headerStyleActive']};display:
none;">
+ #{component.attributes['label']}
+ </div>
<div style=" width: 100%;">
<table cellpadding="0" width="100%" style="height:
100%;"><tbody><tr><td class="dr-pnlbar-c rich-panelbar-content
#{component.panel.attributes['contentClass']}
#{component.attributes['contentClass']}"