JBoss Rich Faces SVN: r887 - trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-25 11:59:38 -0400 (Fri, 25 May 2007)
New Revision: 887
Modified:
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
Log:
Modified: trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js
===================================================================
--- trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-05-25 15:08:52 UTC (rev 886)
+++ trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/scripts/panelMenu.js 2007-05-25 15:59:38 UTC (rev 887)
@@ -1,338 +1,350 @@
-if (!window.DW) {
- window.DW = {};
-}
-
-if (!window.Richfaces) {
- window.Richfaces = {};
-}
-
-var PanelMenuStorage = new Object();
-PanelMenu = Class.create();
-PanelMenu.prototype = {
- initialize: function(myId,so){
- this.childObj = new Array();
- this.expandSingle = so;
- this.lastExpanded = null;
- this.is = 'panelMenu';
- PanelMenuStorage[myId] = this;}};
-PanelMenuItem = Class.create();
-PanelMenuItem.prototype = {
- initialize: function(ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
- if (!ids.parentId){return};
- this.type = options.type;
- this.onopen = options.onopen;
- this.onclose = options.onclose;
- this.event = options.event;
-
- this.mode = options.mode;
- if (!this.mode)
- this.mode = ("node" == this.type) ? "none" : "server";
-
- this.ajaxSubmit = ajaxFunction;
- this.target = options.target;
-
- this.hoveredStyles = hoveredStyles;
- this.hoveredClasses = hoveredClasses;
- this.tdhider = $("tdhide"+ids.myId);
- this.tablehider = $("tablehide"+ids.myId);
- this.haveDynamicIcon = haveDynamicIcon;
- if (this.haveDynamicIcon==true)
- this.iconswitcher = $("icon"+ids.myId);
- this.childObj = new Array();
- this.parentObj = PanelMenuStorage[ids.parentId];
- this.parentObj.childObj.push(this);
- var parent = this.parentObj;
- while (parent) {
- if (parent.is && "panelMenu" == parent.is) {
- this.expandSingle = parent.expandSingle;
- break;
- }
- parent = parent.parentObj;
- }
- this.obj = $(ids.myId);
- this.content = this._getDirectChildrenByTag(this.obj,"TD")[level+1];
- this.iconAlign = iconAlign;
- if (level == 0){
- this.tdhider.style.display = "";
- this.tablehider.style.display = "";
- } else if (this._getDirectChildrenByTag(this.content,"INPUT")[0].value!="closed"){
- this.tdhider.style.display = "";
- this.tablehider.style.display = "";
- }
- this.iconCollapsed = iconCollapsed;
- this.iconExpanded = iconExpanded;
- this.iconSpacer = iconSpacer;
- if(action){
- this.action = action;
- }
- PanelMenuStorage[ids.myId] = this;
- this._attachBehaviors();
- this.inputs = this._getDirectChildrenByTag(this.content,"INPUT");
- for (var i=0;i<this.inputs.length;i++){
- if (this.inputs[i].name.indexOf("panelMenuState")!=-1){
- this.inputState = this.inputs[i];
- } else if (this.inputs[i].name.indexOf("panelMenuAction")!=-1){
- this.inputAction = this.inputs[i];
- }
- }
- if (opened){
- this.parentObj.lastExpanded = this;
- this.expand();
- } else {
- this.expanded = false;
- }
- if (this.parentObj.type=="node"&&this.parentObj.expanded){
- if (this.type=="node")
- this.tdhider.style.display="";
- }
- },
-
- collapse: function(){
- if (this.expanded){
- if (this._getDirectChildrenByTag(this.content,"INPUT")[0]!=null){
- this._getDirectChildrenByTag(this.content,"INPUT")[0].value="closed";}
- for (var i = 0; i < this.childObj.length; i++){
- if (this.childObj[i]._getDirectChildrenByTag(this.childObj[i].content,"INPUT")[0]!=null){
- this.childObj[i]._getDirectChildrenByTag(this.childObj[i].content,"INPUT")[0].value="";}
- if (this.haveDynamicIcon){
- var img = null
- if (this.iconAlign=="right"){
- img = this._getDirectChildrenByTag(this.iconswitcher.nextSibling,"IMG")[0];
- } else {
- img = this._getDirectChildrenByTag(this.iconswitcher.previousSibling,"IMG")[0];
- }
- if (img!=null){
- if (this.iconCollapsed!="none"){
- if (this.iconCollapsed!=null) {
- img.src = this.iconCollapsed;
- } else {
- img.src = this.iconSpacer;
- }
- }
- }
- }
- this.childObj[i].collapse();
- this.childObj[i].hide();
- this.childObj[i].tdhider.style.display="none";
- this.childObj[i].tablehider.style.display="none";
- }
- }
- this.expanded = false;
- },
- hide: function(){
- this.obj.style.display = 'none';
- this.inputState.value="closed";
- },
- expand: function(){
- if (!this.expanded){
- if (this._getDirectChildrenByTag(this.content,"INPUT")[0]!=null){
- this.inputState.value="opened";
- }
- if (this.haveDynamicIcon){
- var img = null
- if (this.iconAlign=="right"){
- img = this._getDirectChildrenByTag(this.iconswitcher.nextSibling,"IMG")[0];
- } else {
- img = this._getDirectChildrenByTag(this.iconswitcher.previousSibling,"IMG")[0];
- }
- if (img!=null){
- if (this.iconExpanded!="none"){
- if (this.iconExpanded!=null) {
- img.src = this.iconExpanded;
- } else {
- img.src = this.iconSpacer;}}}}
- for (var i = 0; i < this.childObj.length; i++){
- this.childObj[i].show();
- }
- }
- this.expanded = true;
- },
-
- show: function(){
- if (this.type!="node")
- this.inputState.value="opened";
- this.tdhider.style.display="";
- this.tablehider.style.display="";
- this.obj.style.display = "";
- },
-
- preTrigger:function(e){
- this.inputAction.setAttribute('value', this.obj.id);
- },
-
- trigger:function(e){
- if ("none" == this.mode)
- return;
- if (this.action !="panelMenuItemAction"){
- this.preTrigger(e);
- var form = Event.findElement(e, "form");
- if(!form || typeof(form) == 'undefined' || !form.tagName || form.tagName.toLowerCase() != 'form'){
- form = document.createElement('form');
- form.setAttribute('method', 'post');
- form.setAttribute('enctype', 'application/x-www-form-urlencoded');
- form.action = action;
- document.body.appendChild(form);
- }
- if ("server" == this.mode) {
- if (this.target)
- form.target = this.target;
- form.submit();
- }
- else if ("ajax" == this.mode) {
- var event = e;
- eval(this.ajaxSubmit);
- }
- }
- },
-
- itemClicked: function(e){
- if(this.action){
- if (this.action=='panelMenuNodeAction'){
- if (this.expanded){
- if ("node" == this.type){
- if (new Function(this.onclose+";return true;")()){
- this.collapse();
- }
- }
- if (this.action){
- this.trigger(e);
- }
- } else {
- if (this.parentObj.expandSingle){
- if (this.parentObj.lastExpanded!=null){
- this.parentObj.lastExpanded.collapse();
- }
- if ("node" == this.type){
- if (new Function(this.onopen+";return true;")()){
- this.expand();
- }
- }
- if (this.action){
- this.trigger(e);
- }
- this.parentObj.lastExpanded = this;
- } else {
- if ("node" == this.type){
- if (new Function(this.onopen+";return true;")()){
- this.expand();
- }
- }
- if (this.action){
- this.trigger(e);
- }
- }
- }
- }
- } else {
- if (this.expanded){
- if ("node" == this.type){
- if (new Function(this.onclose + ";return true;")()){
- this.collapse();
- }
- }
- if (this.action){
- this.trigger(e);
- }
- } else {
- if (this.parentObj.expandSingle){
- if (this.parentObj.lastExpanded!=null){
- this.parentObj.lastExpanded.collapse();
- }
- if ("node" == this.type){
- if (new Function(this.onopen+";return true;")()){
- this.expand();
- }
- }
- if (this.action){
- this.trigger(e);
- }
- this.parentObj.lastExpanded = this;
- } else {
- if ("node" == this.type){
- if (new Function(this.onopen+";return true;")()){
- this.expand();
- }
- }
- if (this.action){
- this.trigger(e);
- }
- }
- }
- }
- },
-
- addHoverStyles: function(e) {
- if (this.hoveredStyles) {
- Element.setStyle(this.obj, this.hoveredStyles);
- }
- if (this.hoveredClasses)
- for (i = 0; i < this.hoveredClasses.length; i++)
- this.obj.addClassName(this.hoveredClasses[i]);
- },
-
- removeHoverStyles: function(e) {
- if (this.hoveredClasses)
- for (var i = 0; i < this.hoveredClasses.length; i++)
- this.obj.removeClassName(this.hoveredClasses[i]);
- },
-
- _getDirectChildrenByTag: function(e, tagName) {
- var allKids = e.childNodes;
- var kids = new Array();
- var ddk;
- tagName = tagName.toLowerCase();
- for( var i = 0 ; i < allKids.length ; i++ )
- if ( allKids[i] && allKids[i].tagName && allKids[i].tagName.toLowerCase() == tagName )
- kids.push(allKids[i]);
- return kids;
- },
-
- _fireEditEvent: function(e){
- if( document.createEvent ) {
- var evObj = document.createEvent('HTMLEvents');
- evObj.initEvent( e, true, false );
- this.edit.dispatchEvent(evObj);
- } else if( document.createEventObject ) {
- this.edit.fireEvent('on' + e);
- }
- },
-
- _attachBehaviors: function() {
- if (this.event)
- Event.observe(this.obj, this.event, this.itemClicked.bindAsEventListener(this), false);
- else
- Event.observe(this.obj, "click", this.itemClicked.bindAsEventListener(this), false);
- Event.observe(this.obj, "mouseover", this.addHoverStyles.bindAsEventListener(this), false);
- Event.observe(this.obj, "mouseout", this.removeHoverStyles.bindAsEventListener(this), false);
- }
-};
-
-PanelMenu.doExpand = function (id) {
- var group = PanelMenuStorage[id];
- if (group && group.type && "node" == group.type) {
- var parent = group.parentObj;
- if (parent.expandSingle){
- if (group.parentObj.lastExpanded!=null){
- group.parentObj.lastExpanded.collapse();
- }
- }
- while (parent) {
- if (parent.type && "node" == parent.type) {
- parent.expand();
- }
- parent = parent.parentObj;
- }
- if (!group.expanded && new Function(group.onopen+";return true;")()){
- group.expand();
- }
- }
-}
-
-PanelMenu.doCollapse = function (id) {
- var group = PanelMenuStorage[id];
- if (group && group.type && "node" == group.type) {
- if (group.expanded && new Function(group.onclose+";return true;")()){
- group.collapse();
- }
- }
-}
\ No newline at end of file
+if (!window.DW) {
+ window.DW = {};
+}
+
+if (!window.Richfaces) {
+ window.Richfaces = {};
+}
+
+var PanelMenuStorage = new Object();
+PanelMenu = Class.create();
+PanelMenu.prototype = {
+ initialize: function(myId,so){
+ this.childObj = new Array();
+ this.expandSingle = so;
+ this.lastExpanded = null;
+ this.is = 'panelMenu';
+ PanelMenuStorage[myId] = this;}};
+PanelMenuItem = Class.create();
+PanelMenuItem.prototype = {
+ initialize: function(ids, options, hoveredStyles, hoveredClasses, level, haveDynamicIcon, action, opened, ajaxFunction, iconAlign, iconExpanded, iconCollapsed, iconSpacer){
+ if (!ids.parentId){return};
+ this.type = options.type;
+ this.onopen = options.onopen;
+ this.onclose = options.onclose;
+ this.event = options.event;
+
+ this.mode = options.mode;
+ if (!this.mode)
+ this.mode = ("node" == this.type) ? "none" : "server";
+
+ this.ajaxSubmit = ajaxFunction;
+ this.target = options.target;
+
+ this.hoveredStyles = hoveredStyles;
+ this.hoveredClasses = hoveredClasses;
+ this.tdhider = $("tdhide"+ids.myId);
+ this.tablehider = $("tablehide"+ids.myId);
+ this.haveDynamicIcon = haveDynamicIcon;
+ if (this.haveDynamicIcon==true)
+ this.iconswitcher = $("icon"+ids.myId);
+ this.childObj = new Array();
+ this.parentObj = PanelMenuStorage[ids.parentId];
+ this.parentObj.childObj.push(this);
+ var parent = this.parentObj;
+ while (parent) {
+ if (parent.is && "panelMenu" == parent.is) {
+ this.expandSingle = parent.expandSingle;
+ break;
+ }
+ parent = parent.parentObj;
+ }
+ this.obj = $(ids.myId);
+ this.content = this._getDirectChildrenByTag(this.obj,"TD")[level+1];
+ this.iconAlign = iconAlign;
+ if (level == 0){
+ this.tdhider.style.display = "";
+ this.tablehider.style.display = "";
+ } else if (this._getDirectChildrenByTag(this.content,"INPUT")[0].value!="closed"){
+ this.tdhider.style.display = "";
+ this.tablehider.style.display = "";
+ }
+ this.iconCollapsed = iconCollapsed;
+ this.iconExpanded = iconExpanded;
+ this.iconSpacer = iconSpacer;
+ if(action){
+ this.action = action;
+ }
+ PanelMenuStorage[ids.myId] = this;
+
+ this.initialStyles=null;
+ this.hasInitialSylesChecked=false;
+
+ this._attachBehaviors();
+ this.inputs = this._getDirectChildrenByTag(this.content,"INPUT");
+ for (var i=0;i<this.inputs.length;i++){
+ if (this.inputs[i].name.indexOf("panelMenuState")!=-1){
+ this.inputState = this.inputs[i];
+ } else if (this.inputs[i].name.indexOf("panelMenuAction")!=-1){
+ this.inputAction = this.inputs[i];
+ }
+ }
+ if (opened){
+ this.parentObj.lastExpanded = this;
+ this.expand();
+ } else {
+ this.expanded = false;
+ }
+ if (this.parentObj.type=="node"&&this.parentObj.expanded){
+ if (this.type=="node")
+ this.tdhider.style.display="";
+ }
+ },
+
+ collapse: function(){
+ if (this.expanded){
+ if (this._getDirectChildrenByTag(this.content,"INPUT")[0]!=null){
+ this._getDirectChildrenByTag(this.content,"INPUT")[0].value="closed";}
+ for (var i = 0; i < this.childObj.length; i++){
+ if (this.childObj[i]._getDirectChildrenByTag(this.childObj[i].content,"INPUT")[0]!=null){
+ this.childObj[i]._getDirectChildrenByTag(this.childObj[i].content,"INPUT")[0].value="";}
+ if (this.haveDynamicIcon){
+ var img = null
+ if (this.iconAlign=="right"){
+ img = this._getDirectChildrenByTag(this.iconswitcher.nextSibling,"IMG")[0];
+ } else {
+ img = this._getDirectChildrenByTag(this.iconswitcher.previousSibling,"IMG")[0];
+ }
+ if (img!=null){
+ if (this.iconCollapsed!="none"){
+ if (this.iconCollapsed!=null) {
+ img.src = this.iconCollapsed;
+ } else {
+ img.src = this.iconSpacer;
+ }
+ }
+ }
+ }
+ this.childObj[i].collapse();
+ this.childObj[i].hide();
+ this.childObj[i].tdhider.style.display="none";
+ this.childObj[i].tablehider.style.display="none";
+ }
+ }
+ this.expanded = false;
+ },
+ hide: function(){
+ this.obj.style.display = 'none';
+ this.inputState.value="closed";
+ },
+ expand: function(){
+ if (!this.expanded){
+ if (this._getDirectChildrenByTag(this.content,"INPUT")[0]!=null){
+ this.inputState.value="opened";
+ }
+ if (this.haveDynamicIcon){
+ var img = null
+ if (this.iconAlign=="right"){
+ img = this._getDirectChildrenByTag(this.iconswitcher.nextSibling,"IMG")[0];
+ } else {
+ img = this._getDirectChildrenByTag(this.iconswitcher.previousSibling,"IMG")[0];
+ }
+ if (img!=null){
+ if (this.iconExpanded!="none"){
+ if (this.iconExpanded!=null) {
+ img.src = this.iconExpanded;
+ } else {
+ img.src = this.iconSpacer;}}}}
+ for (var i = 0; i < this.childObj.length; i++){
+ this.childObj[i].show();
+ }
+ }
+ this.expanded = true;
+ },
+
+ show: function(){
+ if (this.type!="node")
+ this.inputState.value="opened";
+ this.tdhider.style.display="";
+ this.tablehider.style.display="";
+ this.obj.style.display = "";
+ },
+
+ preTrigger:function(e){
+ this.inputAction.setAttribute('value', this.obj.id);
+ },
+
+ trigger:function(e){
+ if ("none" == this.mode)
+ return;
+ if (this.action !="panelMenuItemAction"){
+ this.preTrigger(e);
+ var form = Event.findElement(e, "form");
+ if(!form || typeof(form) == 'undefined' || !form.tagName || form.tagName.toLowerCase() != 'form'){
+ form = document.createElement('form');
+ form.setAttribute('method', 'post');
+ form.setAttribute('enctype', 'application/x-www-form-urlencoded');
+ form.action = action;
+ document.body.appendChild(form);
+ }
+ if ("server" == this.mode) {
+ if (this.target)
+ form.target = this.target;
+ form.submit();
+ }
+ else if ("ajax" == this.mode) {
+ var event = e;
+ eval(this.ajaxSubmit);
+ }
+ }
+ },
+
+ itemClicked: function(e){
+ if(this.action){
+ if (this.action=='panelMenuNodeAction'){
+ if (this.expanded){
+ if ("node" == this.type){
+ if (new Function(this.onclose+";return true;")()){
+ this.collapse();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ } else {
+ if (this.parentObj.expandSingle){
+ if (this.parentObj.lastExpanded!=null){
+ this.parentObj.lastExpanded.collapse();
+ }
+ if ("node" == this.type){
+ if (new Function(this.onopen+";return true;")()){
+ this.expand();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ this.parentObj.lastExpanded = this;
+ } else {
+ if ("node" == this.type){
+ if (new Function(this.onopen+";return true;")()){
+ this.expand();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ }
+ }
+ }
+ } else {
+ if (this.expanded){
+ if ("node" == this.type){
+ if (new Function(this.onclose + ";return true;")()){
+ this.collapse();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ } else {
+ if (this.parentObj.expandSingle){
+ if (this.parentObj.lastExpanded!=null){
+ this.parentObj.lastExpanded.collapse();
+ }
+ if ("node" == this.type){
+ if (new Function(this.onopen+";return true;")()){
+ this.expand();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ this.parentObj.lastExpanded = this;
+ } else {
+ if ("node" == this.type){
+ if (new Function(this.onopen+";return true;")()){
+ this.expand();
+ }
+ }
+ if (this.action){
+ this.trigger(e);
+ }
+ }
+ }
+ }
+ },
+
+ addHoverStyles: function(e) {
+ if(!this.hasInitialSylesChecked){
+ this.initialStyles = this.obj.style.cssText;
+ this.hasInitialSylesChecked = true;
+ }
+ if (this.hoveredStyles) {
+ Element.setStyle(this.obj, this.hoveredStyles);
+ }
+ if (this.hoveredClasses)
+ for (i = 0; i < this.hoveredClasses.length; i++)
+ this.obj.addClassName(this.hoveredClasses[i]);
+ },
+
+ removeHoverStyles: function(e) {
+ if (this.hoveredStyles && this.hasInitialSylesChecked) {
+ this.obj.style.cssText = this.initialStyles;
+ }
+
+ if (this.hoveredClasses)
+ for (var i = 0; i < this.hoveredClasses.length; i++)
+ this.obj.removeClassName(this.hoveredClasses[i]);
+ },
+
+ _getDirectChildrenByTag: function(e, tagName) {
+ var allKids = e.childNodes;
+ var kids = new Array();
+ var ddk;
+ tagName = tagName.toLowerCase();
+ for( var i = 0 ; i < allKids.length ; i++ )
+ if ( allKids[i] && allKids[i].tagName && allKids[i].tagName.toLowerCase() == tagName )
+ kids.push(allKids[i]);
+ return kids;
+ },
+
+ _fireEditEvent: function(e){
+ if( document.createEvent ) {
+ var evObj = document.createEvent('HTMLEvents');
+ evObj.initEvent( e, true, false );
+ this.edit.dispatchEvent(evObj);
+ } else if( document.createEventObject ) {
+ this.edit.fireEvent('on' + e);
+ }
+ },
+
+ _attachBehaviors: function() {
+ if (this.event)
+ Event.observe(this.obj, this.event, this.itemClicked.bindAsEventListener(this), false);
+ else
+ Event.observe(this.obj, "click", this.itemClicked.bindAsEventListener(this), false);
+ Event.observe(this.obj, "mouseover", this.addHoverStyles.bindAsEventListener(this), false);
+ Event.observe(this.obj, "mouseout", this.removeHoverStyles.bindAsEventListener(this), false);
+ }
+};
+
+PanelMenu.doExpand = function (id) {
+ var group = PanelMenuStorage[id];
+ if (group && group.type && "node" == group.type) {
+ var parent = group.parentObj;
+ if (parent.expandSingle){
+ if (group.parentObj.lastExpanded!=null){
+ group.parentObj.lastExpanded.collapse();
+ }
+ }
+ while (parent) {
+ if (parent.type && "node" == parent.type) {
+ parent.expand();
+ }
+ parent = parent.parentObj;
+ }
+ if (!group.expanded && new Function(group.onopen+";return true;")()){
+ group.expand();
+ }
+ }
+}
+
+PanelMenu.doCollapse = function (id) {
+ var group = PanelMenuStorage[id];
+ if (group && group.type && "node" == group.type) {
+ if (group.expanded && new Function(group.onclose+";return true;")()){
+ group.collapse();
+ }
+ }
+}
17 years, 7 months
JBoss Rich Faces SVN: r886 - in trunk/richfaces/tabPanel/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-25 11:08:52 -0400 (Fri, 25 May 2007)
New Revision: 886
Modified:
trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
trunk/richfaces/tabPanel/src/main/templates/tabHeader.jspx
trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx
Log:
http://jira.jboss.com/jira/browse/RF-232
Modified: trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
===================================================================
--- trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-05-25 15:06:48 UTC (rev 885)
+++ trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-05-25 15:08:52 UTC (rev 886)
@@ -101,7 +101,7 @@
String width = tab.getLabelWidth();
if (width != null) {
- style += ";width: " + getUtils().encodePctOrPx(width) + ";";
+ style += ";height : 100%; position : relative; z-index : 2; width: " + getUtils().encodePctOrPx(width) + ";";
}
if (style != null) {
Modified: trunk/richfaces/tabPanel/src/main/templates/tabHeader.jspx
===================================================================
--- trunk/richfaces/tabPanel/src/main/templates/tabHeader.jspx 2007-05-25 15:06:48 UTC (rev 885)
+++ trunk/richfaces/tabPanel/src/main/templates/tabHeader.jspx 2007-05-25 15:08:52 UTC (rev 886)
@@ -16,7 +16,7 @@
<td style="height: 100%; vertical-align: bottom;" id="#{clientId}_cell">
<f:call name="encodeCellClasses" />
- <table border="0" cellpadding="0" cellspacing="0" style="height : 100%; position : relative; z-index : 2">
+ <table border="0" cellpadding="0" cellspacing="0" >
<f:call name="encodeTabLabel" />
<tr>
Modified: trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx
===================================================================
--- trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx 2007-05-25 15:06:48 UTC (rev 885)
+++ trunk/richfaces/tabPanel/src/main/templates/tabPanel.jspx 2007-05-25 15:08:52 UTC (rev 886)
@@ -28,7 +28,7 @@
class="rich-tabpanel #{component.attributes['styleClass']}"
style="#{this:encodeStyles(context, component)}">
<f:call name="utils.encodePassThruWithExclusions">
- <f:parameter value="width,height" />
+ <f:parameter value="width,height,styleClass,class,style,id" />
</f:call>
<tbody>
17 years, 7 months
JBoss Rich Faces SVN: r885 - trunk/richfaces/spacer/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-25 11:06:48 -0400 (Fri, 25 May 2007)
New Revision: 885
Modified:
trunk/richfaces/spacer/src/main/templates/spacer.jspx
Log:
http://jira.jboss.com/jira/browse/RF-231
Modified: trunk/richfaces/spacer/src/main/templates/spacer.jspx
===================================================================
--- trunk/richfaces/spacer/src/main/templates/spacer.jspx 2007-05-25 14:15:52 UTC (rev 884)
+++ trunk/richfaces/spacer/src/main/templates/spacer.jspx 2007-05-25 15:06:48 UTC (rev 885)
@@ -19,7 +19,7 @@
alt="#{component.attributes['title']}"
src="#{spacer}"
class="dr_spr rich-spacer #{component.attributes['styleClass']}"
- x:passThruWithExclusions="id,width,height,title"
+ x:passThruWithExclusions="id,width,height,title,styleClass,class"
>
</img>
</f:root>
\ No newline at end of file
17 years, 7 months
JBoss Rich Faces SVN: r884 - trunk/docs/userguide/en/included.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-05-25 10:15:52 -0400 (Fri, 25 May 2007)
New Revision: 884
Modified:
trunk/docs/userguide/en/included/tree.xml
trunk/docs/userguide/en/included/treeNode.xml
Log:
Modified: trunk/docs/userguide/en/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/included/tree.xml 2007-05-25 13:17:15 UTC (rev 883)
+++ trunk/docs/userguide/en/included/tree.xml 2007-05-25 14:15:52 UTC (rev 884)
@@ -106,6 +106,31 @@
<emphasis role="italic"><property>"treeDataLocator"</property></emphasis> attribute
defines a class providing an access to cashed data according to the ids saved in state/request
on recovery or cashing data saving the Id on caching.</para>
+
+ <para>
+ The <emphasis role="italic"><property>"icon"</property></emphasis>,
+ <emphasis role="italic"><property>"iconCollapsed"</property></emphasis>,
+ <emphasis role="italic"><property>"iconExpanded"</property></emphasis>,
+ <emphasis role="italic"><property>"iconLeaf"</property></emphasis>
+ attributes define icons for the component. Also you can define icons using facets with the same names. If the facets are defined,
+ the corresponding attributes are ignored and facets contents are used as icons. The width of a rendered facet area is 16px.
+<programlisting role="JAVA"><![CDATA[
+<rich:tree ....>
+ ...
+ <f:facet name="icon">
+ <hutputText value="A"/>
+ </f:facet>
+ <f:facet name="iconCollapsed">
+ <hutputText value="B"/>
+ </f:facet>
+ <f:facet name="iconExpanded">
+ <hutputText value="C"/>
+ </f:facet>
+ <f:facet name="iconLeaf">
+ <hutputText value="D"/>
+ </f:facet>
+ ...
+</rich:tree>]]></programlisting></para>
</section>
<section>
<title>Built-In Drag and Drop</title>
Modified: trunk/docs/userguide/en/included/treeNode.xml
===================================================================
--- trunk/docs/userguide/en/included/treeNode.xml 2007-05-25 13:17:15 UTC (rev 883)
+++ trunk/docs/userguide/en/included/treeNode.xml 2007-05-25 14:15:52 UTC (rev 884)
@@ -64,6 +64,33 @@
</section>
<section>
<title>Details of Usage</title>
+ <para>
+ The <emphasis role="italic"><property>"icon"</property></emphasis>,
+ <emphasis role="italic"><property>"iconCollapsed"</property></emphasis>,
+ <emphasis role="italic"><property>"iconExpanded"</property></emphasis>,
+ <emphasis role="italic"><property>"iconLeaf"</property></emphasis>
+ attributes define icons for the component. Also you can define icons using facets with the same names. If the facets are defined,
+ the corresponding attributes are ignored and facets contents are used as icons. The width of a rendered facet area is 16px.
+<programlisting role="JAVA"><![CDATA[
+<rich:tree ....>
+ ...
+ <rich:treeNode ...>
+ <f:facet name="icon">
+ <hutputText value="A"/>
+ </f:facet>
+ <f:facet name="iconCollapsed">
+ <hutputText value="B"/>
+ </f:facet>
+ <f:facet name="iconExpanded">
+ <hutputText value="C"/>
+ </f:facet>
+ <f:facet name="iconLeaf">
+ <hutputText value="D"/>
+ </f:facet>
+ </rich:treeNode>
+ ...
+</rich:tree>]]></programlisting></para>
+
</section>
<section>
<title>Look-and-Feel Customization</title>
17 years, 7 months
JBoss Rich Faces SVN: r883 - in trunk/richfaces/tree/src/main: templates and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-25 09:17:15 -0400 (Fri, 25 May 2007)
New Revision: 883
Modified:
trunk/richfaces/tree/src/main/java/org/richfaces/component/UITreeNode.java
trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx
Log:
"leaf" facet renamed to "iconLeaf"
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/UITreeNode.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-05-25 13:17:01 UTC (rev 882)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/UITreeNode.java 2007-05-25 13:17:15 UTC (rev 883)
@@ -47,7 +47,7 @@
*/
protected final static String DEFAULT_NODE_FACE_ATTRIBUTE_NAME = "#defaultNodeFace";
- private final static String LEAF_FACET_NAME = "leaf";
+ private final static String ICON_LEAF_FACET_NAME = "iconLeaf";
private final static String ICON_FACET_NAME = "icon";
private final static String ICON_EXPANDED_FACET_NAME = "iconExpanded";
private final static String ICON_COLLAPSED_FACET_NAME = "iconCollapsed";
@@ -289,8 +289,8 @@
return getTreeFacet(ICON_FACET_NAME);
}
- public UIComponent getLeafFacet() {
- return getTreeFacet(LEAF_FACET_NAME);
+ public UIComponent getIconLeafFacet() {
+ return getTreeFacet(ICON_LEAF_FACET_NAME);
}
public UIComponent getIconExpandedFacet() {
Modified: trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx
===================================================================
--- trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx 2007-05-25 13:17:01 UTC (rev 882)
+++ trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx 2007-05-25 13:17:15 UTC (rev 883)
@@ -131,7 +131,7 @@
<jsp:scriptlet>
<![CDATA[
if (component.getUITree().isLeaf()) {
- UIComponent leafFacet = component.getLeafFacet();
+ UIComponent leafFacet = component.getIconLeafFacet();
if (leafFacet != null && leafFacet.isRendered()) {
]]>
17 years, 7 months
JBoss Rich Faces SVN: r882 - trunk/richfaces-samples/tree-demo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-25 09:17:01 -0400 (Fri, 25 May 2007)
New Revision: 882
Modified:
trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp
Log:
"leaf" facet renamed to "iconLeaf"
Modified: trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp 2007-05-25 12:10:33 UTC (rev 881)
+++ trunk/richfaces-samples/tree-demo/src/main/webapp/pages/index.jsp 2007-05-25 13:17:01 UTC (rev 882)
@@ -91,7 +91,7 @@
<h:outputText value="icon" rendered="#{bean.renderFacets}"/>
</f:facet>
- <f:facet name="leaf">
+ <f:facet name="iconLeaf">
<h:outputText value="leaf" rendered="#{bean.renderFacets}"/>
</f:facet>
17 years, 7 months
JBoss Rich Faces SVN: r881 - in trunk/richfaces/panelmenu/src/main: java/org/richfaces/renderkit and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-25 08:10:33 -0400 (Fri, 25 May 2007)
New Revision: 881
Modified:
trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
Log:
Panel menu: fix default icons for items.
Modified: trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml
===================================================================
--- trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml 2007-05-25 11:45:25 UTC (rev 880)
+++ trunk/richfaces/panelmenu/src/main/config/component/panelMenu.xml 2007-05-25 12:10:33 UTC (rev 881)
@@ -69,19 +69,19 @@
<name>iconDisabledItem</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the disabled item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
</property>
<property>
<name>iconTopItem</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the enabled top item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
</property>
<property>
<name>iconTopDisabledItem</name>
<classname>java.lang.String</classname>
<description>Path to the icon to be displayed for the disabled top item state</description>
- <defaultvalue><![CDATA[""]]></defaultvalue>
+ <defaultvalue><![CDATA["grid"]]></defaultvalue>
</property>
<property>
<name>iconExpandedGroup</name>
Modified: trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java
===================================================================
--- trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java 2007-05-25 11:45:25 UTC (rev 880)
+++ trunk/richfaces/panelmenu/src/main/java/org/richfaces/renderkit/PanelMenuItemRenderer.java 2007-05-25 12:10:33 UTC (rev 881)
@@ -103,7 +103,7 @@
String iconType = "";
Object customIcon = ((UIPanelMenuItem)component).getIcon();
- if (customIcon.equals("")){
+ if ("".equals(customIcon)){
if (isTopLevel){
source = getIconByType(align.equals("spacer") ? "custom" : iconItemTopLevel, isTopLevel, context, component);
} else {
17 years, 7 months
JBoss Rich Faces SVN: r880 - trunk/docs/userguide/en/modules.
by richfaces-svn-commits@lists.jboss.org
Author: vkorluzhenko
Date: 2007-05-25 07:45:25 -0400 (Fri, 25 May 2007)
New Revision: 880
Modified:
trunk/docs/userguide/en/modules/RFClibrary.xml
Log:
fixed problem with <chapter>
Modified: trunk/docs/userguide/en/modules/RFClibrary.xml
===================================================================
--- trunk/docs/userguide/en/modules/RFClibrary.xml 2007-05-25 11:18:26 UTC (rev 879)
+++ trunk/docs/userguide/en/modules/RFClibrary.xml 2007-05-25 11:45:25 UTC (rev 880)
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='UTF-8'?>
-<chapter id="RichFacesComponentsLibrary" xreflabel="RichFacesComponentsLibrary">
+<section id="RichFacesComponentsLibrary" xreflabel="RichFacesComponentsLibrary">
<?dbhtml filename="RichFacesComponentsLibrary.html"?>
-</chapter>
+</section>
17 years, 7 months
JBoss Rich Faces SVN: r879 - in trunk/richfaces/panelmenu/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-05-25 07:18:26 -0400 (Fri, 25 May 2007)
New Revision: 879
Modified:
trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
Log:
disable state correction
Modified: trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss
===================================================================
--- trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-24 18:36:21 UTC (rev 878)
+++ trunk/richfaces/panelmenu/src/main/resources/org/richfaces/renderkit/html/css/panelMenu.xcss 2007-05-25 11:18:26 UTC (rev 879)
@@ -37,26 +37,6 @@
<f:resource f:key="org.richfaces.renderkit.gradientImages.PanelMenuGroupGradient" />
</u:style>
</u:selector>
- <u:selector name=".dr-pmenu-disabled-group">
- <u:style name="width" value="100%"/>
- <u:style name="padding" value="0px"/>
- <u:style name="vertical-align" value="middle"/>
- <u:style name="cursor" value="default"/>
- <u:style name="text-align" value="left"/>
- <u:style name="font-weight" skin="headerWeightFont"/>
- <u:style name="font-family" skin="headerFamilyFont"/>
- <u:style name="font-size" skin="headerSizeFont"/>
- <u:style name="color" skin="headerBackgroundColor"/>
- <u:style name="border-style" value="none"/>
- <u:style name="border-top-style" value="solid"/>
- <u:style name="border-color" skin="panelBorderColor"/>
- <u:style name="background-color" skin="headerBackgroundColor"/>
- <u:style name="background-image" >
- <f:resource f:key="org.richfaces.renderkit.gradientImages.PanelMenuGroupGradient" />
- </u:style>
- </u:selector>
-
-
<u:selector name=".dr-pmenu-item">
<u:style name="width" value="100%"/>
@@ -76,25 +56,6 @@
</u:style>
</u:selector>
- <u:selector name=".dr-pmenu-disabled-item">
- <u:style name="width" value="100%"/>
- <u:style name="padding" value="0px"/>
- <u:style name="vertical-align" value="middle"/>
- <u:style name="cursor" value="default"/>
- <u:style name="text-align" value="left"/>
- <u:style name="font-family" skin="generalFamilyFont"/>
- <u:style name="font-weight" skin="generalWeightFont"/>
- <u:style name="font-size" skin="generalSizeFont"/>
- <u:style name="color" skin="headerBackgroundColor"/>
- <u:style name="border-style" value="none"/>
- <u:style name="border-top-style" value="solid"/>
- <u:style name="border-color" skin="subBorderColor"/>
- <u:style name="background-image" >
- <f:resource f:key="org.richfaces.renderkit.gradientImages.PanelMenuItemGradient" />
- </u:style>
- </u:selector>
-
-
<u:selector name=".dr-pmenu-group-tr">
<u:style name="background-image" >
<f:resource f:key="org.richfaces.renderkit.gradientImages.PanelMenuGroupGradient" />
@@ -106,4 +67,12 @@
<f:resource f:key="org.richfaces.renderkit.gradientImages.PanelMenuItemGradient" />
</u:style>
</u:selector>
+
+ <f:verbatim>
+ .rich-pmenu-disabled-element {
+ cursor: default;
+ color: #c0c0c0;
+ }
+ </f:verbatim>
+
</f:template>
\ No newline at end of file
Modified: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-05-24 18:36:21 UTC (rev 878)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuGroup.jspx 2007-05-25 11:18:26 UTC (rev 879)
@@ -16,22 +16,16 @@
<td>
<jsp:scriptlet>
<![CDATA[
- String itemClass;
- String onClick;
+ String itemClass = "";
if (component.isDisabled()) {
- itemClass="rich-pmenu-item dr-pmenu-disabled-group ";
- //onClick="";
- } else {
- itemClass="rich-pmenu-group dr-pmenu-group ";
- //onClick = component.getAttributes().get("onclick") + ";" + getOnClick(context, component);
+ itemClass = " rich-pmenu-disabled-element";
}
variables.setVariable("itemClass", itemClass);
- //variables.setVariable("onClick", onClick);
]]>
</jsp:scriptlet>
<table cellpadding="0" cellspacing="0" border="0" width="100%"
id="tablehide#{clientId}"
- class="#{itemClass} #{this:getFullStyleClass( context, component )}"
+ class="rich-pmenu-group dr-pmenu-group #{this:getFullStyleClass( context, component )} #{itemClass}"
style="#{this:getFullStyle( context, component )}" >
<f:call name="utils.encodeAttributes">
Modified: trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx
===================================================================
--- trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-05-24 18:36:21 UTC (rev 878)
+++ trunk/richfaces/panelmenu/src/main/templates/org/richfaces/htmlPanelMenuItem.jspx 2007-05-25 11:18:26 UTC (rev 879)
@@ -16,21 +16,19 @@
<td>
<jsp:scriptlet>
<![CDATA[
- String itemClass;
+ String itemClass = " rich-pmenu-disabled-element";
String onClick;
if (component.isDisabled()) {
- itemClass="rich-pmenu-item dr-pmenu-disabled-item ";
- onClick="";
+ variables.setVariable("itemClass", itemClass);
} else {
- itemClass="rich-pmenu-item dr-pmenu-item ";
onClick = component.getAttributes().get("onclick") + ";" + getOnClick(context, component);
+ variables.setVariable("onClick", onClick);
}
- variables.setVariable("itemClass", itemClass);
- variables.setVariable("onClick", onClick);
+
]]>
</jsp:scriptlet>
<table cellpadding="0" cellspacing="0" border="0" width="100%"
- class="#{itemClass} #{this:getFullStyleClass( context, component )}"
+ class="rich-pmenu-item dr-pmenu-item #{this:getFullStyleClass( context, component )} #{itemClass}"
style="#{this:getFullStyle( context, component )}"
id="tablehide#{clientId}" >
<f:call name="utils.encodeAttributes">
17 years, 7 months
JBoss Rich Faces SVN: r878 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-24 14:36:21 -0400 (Thu, 24 May 2007)
New Revision: 878
Added:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/Sortable.java
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java
Log:
Added: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/Sortable.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/Sortable.java (rev 0)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/Sortable.java 2007-05-24 18:36:21 UTC (rev 878)
@@ -0,0 +1,23 @@
+/*
+ * Copyright
+ * Copyright (c) Exadel,Inc. 2006
+ * All rights reserved.
+ *
+ * History
+ * $Source: /cvs-master/intralinks-jsf-comps/components/data-view-grid/src/component/com/exadel/jsf/component/Sortable.java,v $
+ * $Revision: 1.1 $
+ */
+
+package org.richfaces.component;
+
+import org.richfaces.model.SortOrder;
+
+
+/**
+ * @author Maksim Kaszynski
+ * Base interface for sort capable components
+ */
+public interface Sortable {
+ public SortOrder getSortOrder();
+ public void setSortOrder(SortOrder sortOrder);
+}
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-24 18:36:06 UTC (rev 877)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-24 18:36:21 UTC (rev 878)
@@ -19,14 +19,17 @@
import org.ajax4jsf.framework.ajax.AjaxContext;
import org.ajax4jsf.framework.ajax.AjaxEvent;
import org.apache.commons.collections.iterators.IteratorChain;
+import org.richfaces.event.sort.SortEvent;
+import org.richfaces.model.SortOrder;
+
/**
* @author Anton Belevich
*
*/
-public abstract class UIScrollableGrid extends UIRepeat implements AjaxComponent{
+public abstract class UIScrollableGrid extends UIRepeat implements AjaxComponent, Sortable{
private Integer _row_count = new Integer(0) ;
@@ -128,16 +131,24 @@
public void queueEvent(FacesEvent event) {
if(event instanceof AjaxEvent){
event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
+ }else if(event instanceof SortEvent){
+ event.setPhaseId(PhaseId.APPLY_REQUEST_VALUES);
}
super.queueEvent(event);
}
public void walk(FacesContext faces, DataVisitor visitor, Object argument) throws IOException {
-
super.walk(faces, visitor, argument);
}
public DataModel getStoredDataModel() {
return super.getDataModel();
}
+ public SortOrder getSortOrder() {
+ return null;
+ }
+
+ public void setSortOrder(SortOrder sortOrder) {
+ }
+
}
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java 2007-05-24 18:36:06 UTC (rev 877)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGridColumn.java 2007-05-24 18:36:21 UTC (rev 878)
@@ -27,7 +27,6 @@
*/
public void setBreakBefore(boolean arg0) {
// TODO Auto-generated method stub
-
}
public Iterator getChildIterator(){
17 years, 7 months