JBoss Rich Faces SVN: r976 - trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-01 11:00:11 -0400 (Fri, 01 Jun 2007)
New Revision: 976
Modified:
trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss 2007-06-01 15:00:01 UTC (rev 975)
+++ trunk/sandbox/scrollable-grid/src/main/resources/org/richfaces/renderkit/html/css/grid.xcss 2007-06-01 15:00:11 UTC (rev 976)
@@ -145,6 +145,7 @@
position: relative;
display: block;
overflow: hidden;
+ width: 100%;
}
.ClientUI_Grid_HCBody {
cursor: default;
@@ -239,6 +240,7 @@
position: relative;
display: block;
overflow: hidden;
+ width: 100%;
}
/**
@@ -312,6 +314,7 @@
position: relative;
display: block;
overflow: hidden;
+ width: 100%;
}
/**
17 years, 3 months
JBoss Rich Faces SVN: r975 - trunk/sandbox/scrollable-grid.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-01 11:00:01 -0400 (Fri, 01 Jun 2007)
New Revision: 975
Modified:
trunk/sandbox/scrollable-grid/generatescript.xml
Log:
Modified: trunk/sandbox/scrollable-grid/generatescript.xml
===================================================================
--- trunk/sandbox/scrollable-grid/generatescript.xml 2007-06-01 14:59:53 UTC (rev 974)
+++ trunk/sandbox/scrollable-grid/generatescript.xml 2007-06-01 15:00:01 UTC (rev 975)
@@ -35,12 +35,12 @@
<file name="/ClientUI/common/box/Substrate.js"/>
<file name="/ClientUI/layouts/VLayoutManager.js"/>
<file name="/ClientUI/layouts/GridLayoutManager.js"/>
- <file name="/ClientUI/controls/grid/GridHeader2.js"/>
+ <file name="/ClientUI/controls/grid/GridHeader.js"/>
<file name="/ClientUI/common/box/SplashBox.js"/>
<file name="/ClientUI/controls/grid/DataCash.js"/>
- <file name="/ClientUI/controls/grid/GridBody2.js"/>
- <file name="/ClientUI/controls/grid/GridFooter2.js"/>
- <file name="/ClientUI/controls/grid/Grid2.js"/>
+ <file name="/ClientUI/controls/grid/GridBody.js"/>
+ <file name="/ClientUI/controls/grid/GridFooter.js"/>
+ <file name="/ClientUI/controls/grid/Grid.js"/>
</filelist>
</concat>
</target>
17 years, 3 months
JBoss Rich Faces SVN: r974 - trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-06-01 10:59:53 -0400 (Fri, 01 Jun 2007)
New Revision: 974
Modified:
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-06-01 14:46:24 UTC (rev 973)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-cell.jspx 2007-06-01 14:59:53 UTC (rev 974)
@@ -12,7 +12,7 @@
>
<td class="ClientUI_Grid_BC" id="#{client_id}:c_#{cell_id}">
- <span style="width: #{component.attributes['width']}" id="#{client_id}:bc_#{cell_index}" class="ClientUI_Grid_BCBody1">
+ <span id="#{client_id}:bc_#{cell_index}" class="ClientUI_Grid_BCBody1">
<span class="ClientUI_Grid_FCBody" id="#{client_id}:bc_#{cell_id}">
<vcp:body/>
</span>
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx 2007-06-01 14:46:24 UTC (rev 973)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-footer-cell.jspx 2007-06-01 14:59:53 UTC (rev 974)
@@ -12,7 +12,7 @@
>
<td class="ClientUI_Grid_FC">
- <span style="width: #{component.attributes['width']}" id="#{client_id}:fc_#{cell_index}" class="ClientUI_Grid_FCBody1">
+ <span id="#{client_id}:fc_#{cell_index}" class="ClientUI_Grid_FCBody1">
<span class="ClientUI_Grid_FCBody">
<vcp:body/>
</span>
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-06-01 14:46:24 UTC (rev 973)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid-header-cell.jspx 2007-06-01 14:59:53 UTC (rev 974)
@@ -13,7 +13,7 @@
>
<td class="ClientUI_Grid_HC" id="#{client_id}:hc_#{cell_index}" columnIndex="#{cell_index}" sortable="#{component.attributes['sortable']}">
- <span style="width: #{component.attributes['width']}" id="#{client_id}:hcc_#{cell_index}" class="ClientUI_Grid_HCBody1">
+ <span id="#{client_id}:hcc_#{cell_index}" class="ClientUI_Grid_HCBody1">
<span id="#{clientId}:hcb_#{cell_index}" class="ClientUI_Grid_HCBody">
<table width="100%" cellspacing="0" cellpadding="0" border="0" align="center">
<tbody>
Modified: trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-01 14:46:24 UTC (rev 973)
+++ trunk/sandbox/scrollable-grid/src/main/templates/org/richfaces/scrollable-grid.jspx 2007-06-01 14:59:53 UTC (rev 974)
@@ -32,7 +32,14 @@
<div id="#{clientId}_GridHeaderTemplate" class="ClientUI_InlineBox" style="width: #{component.attributes['width']};">
<div style="display: block; left: 0px; top: 0px; width: #{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox" id="#{clientId}:header:FrozenBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<tr class="ClientUI_Grid_HR">
<jsp:scriptlet>
@@ -46,7 +53,14 @@
</span>
<span class="ClientUI_TmplBox ClientUI_NormalBox" id="#{clientId}:header:NormalBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+ <col width="100px" />
<tbody>
<tr class="ClientUI_Grid_HR">
<jsp:scriptlet>
@@ -54,7 +68,7 @@
renderHeaders(context, component, false);
]]>
</jsp:scriptlet>
- <td style="width: 1000px"></td>
+ <td style="width: 100px"></td>
</tr>
</tbody>
</table>
@@ -65,7 +79,14 @@
<div id="#{clientId}_GridBodyTemplate" class="ClientUI_InlineBox" style="overflow: auto; width: #{component.attributes['width']}; height: #{component.attributes['height']};">
<div style="display: block; width: #{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox" id="#{clientId}:body:FrozenBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<jsp:scriptlet>
<![CDATA[
@@ -76,7 +97,14 @@
</table>
</span>
<span class="ClientUI_TmplBox ClientUI_NormalBox" id="#{clientId}:body:NormalBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<jsp:scriptlet>
<![CDATA[
@@ -92,7 +120,14 @@
<div id="#{clientId}_GridFooterTemplate" class="ClientUI_InlineBox" style="width: #{component.attributes['width']};">
<div style="display: block; width: width: #{sumWidth}px;">
<span class="ClientUI_TmplBox ClientUI_FrozenBox" id="#{clientId}:footer:FrozenBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, true);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<tr class="ClientUI_Grid_FR">
<jsp:scriptlet>
@@ -106,7 +141,14 @@
</span>
<span class="ClientUI_TmplBox ClientUI_NormalBox" id="#{clientId}:footer:NormalBox">
- <table cellpadding="0" cellspacing="0" style="border-collapse:collapse">
+ <table cellpadding="0" cellspacing="0" style="border-collapse:collapse; table-layout:fixed">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderCols(context, component, false);
+ ]]>
+ </jsp:scriptlet>
+
<tbody>
<tr class="ClientUI_Grid_FR">
<jsp:scriptlet>
@@ -260,36 +302,66 @@
// ClientUILib.log(ClientUILogger.WARNING, "Grid control created over " + ((new Date()).getTime() - currTime) + " miliseconds.");
},
-
- onCompleteGridInvalidation : function(request, event, data){
-
+ /*updatePagePart: function (id) {
+ var newnode = this.getElementById(id);
+ if (!newnode) {
+ LOG.error("New node for ID " + id + " is not present in response");
+ return;
+ }
+ var oldnode = window.document.getElementById(id);
+ if (oldnode) {
+ var anchor = oldnode.parentNode;
+ Sarissa.clearChildNodes(oldnode);
+ if (oldnode.outerHTML) {
+ LOG.debug("Replace content of node by outerHTML()");
+ oldnode.outerHTML = (new XMLSerializer).serializeToString(newnode);
+ } else {
+ var importednode;
+ importednode = window.document.importNode(newnode, true);
+ LOG.debug("Replace content of node by replaceChild()");
+ anchor.replaceChild(importednode, oldnode);
+ }
+ if (!A4J.AJAX._scriptEvaluated) {
+ this.evalScripts(newnode);
+ }
+ LOG.debug("Update part of page for Id: " + id + " successful");
+ } else {
+ LOG.warn("Node for replace by response with id " + id + " not found in document");
+ }
+ },*/
+ onCompleteGridInvalidation : function(request, event, data){
var theDoc = document;
var getEl = theDoc.getElementById;
var options = dataModel.getCurrentOptions();
var rowCount = grid.getBody().templFrozen.getElement().rows.length;
var startRow = options.startRow;
var count = options.count;
- var row, id, rowindex, i;
+ var row, id, rowindex, i, el;
for(i=0; i<count; i++) {
rowindex = startRow + i;
if(rowindex >= rowCount) rowindex -= rowCount;
id = "f:row_" + rowindex;
row = request.getElementById(id);
+
if(ClientUILib.isIE) {
- getEl(id).innerText = row.innerHTML;
+ el = getEl(id);
+ el.outerHTML = row.xml;
}
else {
- theDoc.getElementById(id).innerHTML = row.innerHTML;
- }
+ el = theDoc.getElementById(id);
+ el.innerHTML = row.innerHTML;
+ }
id = "n:row_" + rowindex;
row = request.getElementById(id);
if(ClientUILib.isIE) {
- getEl(id).innerText = row.innerHTML;
+ el = getEl(id);
+ el.outerHTML = row.xml;
}
else {
- theDoc.getElementById(id).innerHTML = row.innerHTML;
- }
+ el = theDoc.getElementById(id);
+ el.innerHTML = row.innerHTML;
+ }
}
dataModel.eventDataReady.fire(options);
@@ -297,7 +369,7 @@
}
}();
#{this:getScriptContributions(context, component)};
- Event.observe(window, 'load', #{this:getJavaScriptVarName(context, component)}.init);
+ Event.observe(window, 'load', #{this:getJavaScriptVarName(context, component)}.init);
// ]]>
17 years, 3 months
JBoss Rich Faces SVN: r973 - trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-06-01 10:46:24 -0400 (Fri, 01 Jun 2007)
New Revision: 973
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
RF-236 fixed
Modified: trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-06-01 12:05:57 UTC (rev 972)
+++ trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-06-01 14:46:24 UTC (rev 973)
@@ -251,7 +251,6 @@
this.changed = true;
this.hasFocus = true;
- this.oldValue = this.element.value;
if (this.observerHandle) {
LOG.debug("clear existing observer");
@@ -498,14 +497,18 @@
onObserverEvent: function(event) {
LOG.debug("Observer event occurs");
this.changed = false;
+ var oldValue = this.element.value;
if (this.getToken().length >= this.options.minChars) {
LOG.debug("Call data for update choices");
- this.startIndicator();
- this.getUpdatedChoices(event);
+ if (this.oldValue != oldValue && oldValue.length > 0) {
+ this.startIndicator();
+ this.getUpdatedChoices(event);
+ }
} else {
this.active = false;
this.hide();
}
+ this.oldValue = oldValue;
this.observerHandle = null;
},
@@ -559,11 +562,9 @@
if (this.onsubmitFunction && ! this.onsubmitFunction()) {
return;
- }
- if (this.oldValue != this.element.value && this.element.value.length > 0) {
- A4J.AJAX.Submit(this.containerId, this.actionUrl, event, this.options);
- }
- return;
+ }
+
+ A4J.AJAX.Submit(this.containerId, this.actionUrl, event, this.options);
},
onComplete: function(request, event) {
17 years, 3 months
JBoss Rich Faces SVN: r972 - trunk/sandbox-samples/panelmenu-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: dbiatenia
Date: 2007-06-01 08:05:57 -0400 (Fri, 01 Jun 2007)
New Revision: 972
Modified:
trunk/sandbox-samples/panelmenu-sample/src/main/webapp/pages/index.jsp
Log:
Modified: trunk/sandbox-samples/panelmenu-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox-samples/panelmenu-sample/src/main/webapp/pages/index.jsp 2007-06-01 11:44:36 UTC (rev 971)
+++ trunk/sandbox-samples/panelmenu-sample/src/main/webapp/pages/index.jsp 2007-06-01 12:05:57 UTC (rev 972)
@@ -1,11 +1,32 @@
<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.ajax4jsf.org/panelmenu" prefix="pm" %>
<html>
<head>
<title></title>
</head>
<body>
<f:view>
+ <pm:panelMenu iconItemTopPosition="left" iconItemPosition="left">
+ <pm:panelMenuGroup label="Group 1" iconExpanded="disc" iconCollapsed="disc">
+ <pm:panelMenuItem value="Item 1" icon="chevronUp">
+ </pm:panelMenuItem>
+ <pm:panelMenuItem value="Item 2" />
+ <pm:panelMenuGroup label="Group 2" iconCollapsed="chevron" >
+ <pm:panelMenuItem icon="triangleDown">
+ <h:outputText value="Item 3" />
+ </pm:panelMenuItem>
+ </pm:panelMenuGroup>
+ </pm:panelMenuGroup>
+ <pm:panelMenuGroup label="Group 3" iconExpanded="" iconCollapsed="">
+ <pm:panelMenuItem value="Item 4">
+ </pm:panelMenuItem>
+ </pm:panelMenuGroup>
+ <pm:panelMenuGroup label="Group 4" iconExpanded="triangleDown" iconCollapsed="triangle" expanded="true">
+ <pm:panelMenuItem value="Item 5" disabled="true"/>
+ <pm:panelMenuItem value="Item 6"/>
+ </pm:panelMenuGroup>
+ </pm:panelMenu>
</f:view>
</body>
17 years, 3 months
JBoss Rich Faces SVN: r971 - trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-01 07:44:36 -0400 (Fri, 01 Jun 2007)
New Revision: 971
Modified:
trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
Log:
http://jira.jboss.com/jira/browse/RF-224
Modified: trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
===================================================================
--- trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-06-01 10:44:50 UTC (rev 970)
+++ trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-06-01 11:44:36 UTC (rev 971)
@@ -8,8 +8,8 @@
this.tree = $(tree);
this.elements = {};
($(id)).object = this;
+ this.toggleOnClick = toggleOnClick;
this.getElements();
- this.toggleOnClick = toggleOnClick;
this.eventSelectionClick = this.toggleSelection.bindAsEventListener(this);
this.eventMouseOut = this.processMouseOut.bindAsEventListener(this);
@@ -73,7 +73,7 @@
for (var i = 0; i < childsTd.childNodes.length; i++) {
var child = childsTd.childNodes[i];
if (child.nodeType == 1 && child.tagName.toLowerCase() == "table") {
- this.addChild(new Tree.Item(child.id, this.tree, this, this.childs.length, this.switchType));
+ this.addChild(new Tree.Item(child.id, this.tree, this, this.childs.length, this.switchType, this.toggleOnClick));
}
}
}
17 years, 3 months
JBoss Rich Faces SVN: r970 - in trunk/richfaces/tree/src/main: java/org/richfaces/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-01 06:44:50 -0400 (Fri, 01 Jun 2007)
New Revision: 970
Modified:
trunk/richfaces/tree/src/main/config/component/tree.xml
trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
trunk/richfaces/tree/src/main/templates/htmlTree.jspx
trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx
Log:
http://jira.jboss.com/jira/browse/RF-224
Modified: trunk/richfaces/tree/src/main/config/component/tree.xml
===================================================================
--- trunk/richfaces/tree/src/main/config/component/tree.xml 2007-06-01 10:21:39 UTC (rev 969)
+++ trunk/richfaces/tree/src/main/config/component/tree.xml 2007-06-01 10:44:50 UTC (rev 970)
@@ -193,7 +193,19 @@
<property hidden="true">
<name>dropValue</name>
- </property>
+ </property>
+
+ <property>
+ <name>toggleOnClick</name>
+ <classname>boolean</classname>
+ <description>
+ If false do not toggle node state on click.
+ If true, than node will be toggles on click on ether node content,
+ or node icon.
+ Default value is false.
+ </description>
+ <defaultvalue>false</defaultvalue>
+ </property>
</component>
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java 2007-06-01 10:21:39 UTC (rev 969)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/component/UITree.java 2007-06-01 10:44:50 UTC (rev 970)
@@ -603,9 +603,12 @@
public abstract String getSelectedClass();
public abstract void setNodeFace(String nodeFace);
- public abstract String getNodeFace();
+ public abstract String getNodeFace();
+ public abstract void setToggleOnClick(boolean toggleOnClick);
+ public abstract boolean isToggleOnClick();
+
public void addChangeExpandListener(NodeExpandedListener listener) {
addFacesListener(listener);
}
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-06-01 10:21:39 UTC (rev 969)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/NodeRendererBase.java 2007-06-01 10:44:50 UTC (rev 970)
@@ -68,7 +68,11 @@
addParameterEncoder(DnDParametersEncoder.getInstance());
}
- protected String getToggleScript(FacesContext context, UITreeNode treeNode) {
+ protected String getToggleScript(FacesContext context, UITreeNode treeNode, String to) {
+ if ("handle".equals(to) && treeNode.getUITree().isToggleOnClick() ||
+ "mainRow".equals(to) && !treeNode.getUITree().isToggleOnClick())
+ return "";
+
UITree tree = treeNode.getUITree();
String id = treeNode.getClientId(context);
String toggleId = id + NamingContainer.SEPARATOR_CHAR
Modified: trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js
===================================================================
--- trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-06-01 10:21:39 UTC (rev 969)
+++ trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-item.js 2007-06-01 10:44:50 UTC (rev 970)
@@ -1,6 +1,6 @@
Tree.Item = Class.create();
Tree.Item.prototype = {
- initialize: function(id, tree, parent, index, switchType) {
+ initialize: function(id, tree, parent, index, switchType, toggleOnClick) {
this.index = index;
this.parent = parent;
this.id = id;
@@ -9,6 +9,7 @@
this.elements = {};
($(id)).object = this;
this.getElements();
+ this.toggleOnClick = toggleOnClick;
this.eventSelectionClick = this.toggleSelection.bindAsEventListener(this);
this.eventMouseOut = this.processMouseOut.bindAsEventListener(this);
@@ -33,9 +34,13 @@
Event.observe(this.elements.text, "mouseover", this.eventMouseOver);
if (this.switchType=="client" && this.childs.length > 0) {
- if (this.elements.handle) {
- this.eventCollapsionClick = this.toggleCollapsion.bindAsEventListener(this);
- Event.observe(this.elements.handle, "click", this.eventCollapsionClick);
+ this.eventCollapsionClick = this.toggleCollapsion.bindAsEventListener(this);
+ if (this.toggleOnClick) {
+ if (this.elements.mainRow)
+ Event.observe(this.elements.mainRow, "click", this.eventCollapsionClick);
+ } else {
+ if (this.elements.handle)
+ Event.observe(this.elements.handle, "click", this.eventCollapsionClick);
}
}
@@ -135,7 +140,13 @@
collapse: function() {
if (!this.isCollapsed() && this.switchType!="client") {
- this.elements.handle.onclick();
+ if (this.toggleOnClick) {
+ if (this.elements.mainRow)
+ this.elements.mainRow.onclick();
+ } else {
+ if (this.elements.handle)
+ this.elements.handle.onclick();
+ }
}
if (this.hasChilds() && !this.isCollapsed()) {
Element.hide(this.elements.row);
@@ -152,7 +163,13 @@
expand: function() {
if (this.isCollapsed() && this.switchType!="client") {
- this.elements.handle.onclick();
+ if (this.toggleOnClick) {
+ if (this.elements.mainRow)
+ this.elements.mainRow.onclick();
+ } else {
+ if (this.elements.handle)
+ this.elements.handle.onclick();
+ }
}
if (this.hasChilds() && this.isCollapsed()) {
Element.show(this.elements.row);
Modified: trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
===================================================================
--- trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2007-06-01 10:21:39 UTC (rev 969)
+++ trunk/richfaces/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2007-06-01 10:44:50 UTC (rev 970)
@@ -19,7 +19,7 @@
Tree.CLASS_AJAX_SELECTED_LISTENER_FLAG = "ajax_selected_listener_flag";
Tree.prototype = {
- initialize: function(id, input, switchType, events, onAjaxSelect, dragIndicatorId) {
+ initialize: function(id, input, switchType, events, onAjaxSelect, dragIndicatorId, toggleOnClick) {
this.items = [];
this.childs = [];
this.elements = {};
@@ -34,6 +34,7 @@
this.element = $(id);
this.inputId = input;
this.input = $(this.inputId);
+ this.toggleOnClick = toggleOnClick;
var options = Object.extend({
columnCount: 0
@@ -111,7 +112,7 @@
for (var i = 0; i < this.elements.contentTd.childNodes.length; i++) {
var child = this.elements.contentTd.childNodes[i];
if (child.nodeType == 1 && child.tagName.toLowerCase() == "table") {
- this.addChild(new Tree.Item(child.id, this, this, this.childs.length, this.switchType));
+ this.addChild(new Tree.Item(child.id, this, this, this.childs.length, this.switchType, this.toggleOnClick));
}
}
}
Modified: trunk/richfaces/tree/src/main/templates/htmlTree.jspx
===================================================================
--- trunk/richfaces/tree/src/main/templates/htmlTree.jspx 2007-06-01 10:21:39 UTC (rev 969)
+++ trunk/richfaces/tree/src/main/templates/htmlTree.jspx 2007-06-01 10:44:50 UTC (rev 970)
@@ -58,7 +58,8 @@
function(event) {
#{this:getAjaxScript(context, component)}
},
- "#{this:getDragIndicatorId(context, component)}"
+ "#{this:getDragIndicatorId(context, component)}",
+ #{component.toggleOnClick}
);
#{this:getScriptContributions(context, component)}
</script>
Modified: trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx
===================================================================
--- trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx 2007-06-01 10:21:39 UTC (rev 969)
+++ trunk/richfaces/tree/src/main/templates/htmlTreeNode.jspx 2007-06-01 10:44:50 UTC (rev 970)
@@ -31,7 +31,7 @@
<f:call name="initializeLines" />
<f:call name="initializeResources" />
- <tr id="#{clientId}:mainRow" >
+ <tr id="#{clientId}:mainRow" onclick="#{this:getToggleScript(context, component, 'mainRow')} return false;" >
<f:call name="encodeAttributeParameters" />
<td class="dr-tree-h-ic #{line}">
<div>
@@ -47,7 +47,7 @@
]]>
</jsp:scriptlet>
<a href="#" id="#{clientId}:handle"
- onclick="#{this:getToggleScript(context, component)} return false;">
+ onclick="#{this:getToggleScript(context, component, 'handle')} return false;">
<jsp:scriptlet>
<![CDATA[
17 years, 3 months
JBoss Rich Faces SVN: r969 - trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-01 06:21:39 -0400 (Fri, 01 Jun 2007)
New Revision: 969
Modified:
trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-249
Modified: trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java
===================================================================
--- trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-06-01 10:17:08 UTC (rev 968)
+++ trunk/richfaces/tabPanel/src/main/java/org/richfaces/renderkit/TabHeaderRendererBase.java 2007-06-01 10:21:39 UTC (rev 969)
@@ -99,9 +99,10 @@
String width = tab.getLabelWidth();
-
+
+ style += ";height : 100%; position : relative; z-index : 2;";
if (width != null) {
- style += ";height : 100%; position : relative; z-index : 2; width: " + getUtils().encodePctOrPx(width) + ";";
+ style += " width: " + getUtils().encodePctOrPx(width) + ";";
}
if (style != null) {
17 years, 3 months
JBoss Rich Faces SVN: r968 - trunk/richfaces/inputnumber-spinner/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-06-01 06:17:08 -0400 (Fri, 01 Jun 2007)
New Revision: 968
Modified:
trunk/richfaces/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx
Log:
http://jira.jboss.com/jira/browse/RF-218
Modified: trunk/richfaces/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx
===================================================================
--- trunk/richfaces/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx 2007-05-31 17:40:35 UTC (rev 967)
+++ trunk/richfaces/inputnumber-spinner/src/main/templates/inputNumberSpinner.jspx 2007-06-01 10:17:08 UTC (rev 968)
@@ -35,7 +35,8 @@
name="#{clientId}"
value="#{this:getInputValue(context, component)}"
style="#{component.inputStyle}"
- accesskey="#{component.attributes['accesskey']}"
+ accesskey="#{component.attributes['accesskey']}"
+ tabindex="#{component.attributes['tabindex']}"
/>
</td>
<td id="#{clientId}For" class="dr-spnr-b" width="1%">
@@ -47,12 +48,26 @@
boolean disabled = ((Boolean) component.getAttributes().get("disabled")).booleanValue();
if (! disabled) {
]]></jsp:scriptlet>
- <input type="image" src="#{up_arrow}" class="dr-spnr-bn rich-spinner-button" border="0" onclick="return false"
- onmousedown="this.className='dr-spnr-bp rich-spinner-button'" onmouseup="this.className='dr-spnr-bn rich-spinner-button'" onmouseout="this.className='dr-spnr-bn rich-spinner-button'" />
+ <input
+ type="image"
+ src="#{up_arrow}"
+ class="dr-spnr-bn rich-spinner-button"
+ border="0"
+ onclick="return false"
+ onmousedown="this.className='dr-spnr-bp rich-spinner-button'"
+ onmouseup="this.className='dr-spnr-bn rich-spinner-button'"
+ onmouseout="this.className='dr-spnr-bn rich-spinner-button'"
+ tabindex="#{component.attributes['tabindex']}" />
<jsp:scriptlet><![CDATA[
} else {
]]></jsp:scriptlet>
- <input type="image" src="#{up_arrow}" class="dr-spnr-bn rich-spinner-button" border="0" onclick="return false" />
+ <input
+ type="image"
+ src="#{up_arrow}"
+ class="dr-spnr-bn rich-spinner-button"
+ border="0"
+ onclick="return false"
+ tabindex="#{component.attributes['tabindex']}" />
<jsp:scriptlet><![CDATA[
}
]]></jsp:scriptlet>
17 years, 3 months