JBoss Rich Faces SVN: r715 - trunk/richfaces/tree/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-09 18:06:23 -0400 (Wed, 09 May 2007)
New Revision: 715
Modified:
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
Log:
Slight code optimization :)
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-05-09 21:44:24 UTC (rev 714)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-05-09 22:06:23 UTC (rev 715)
@@ -340,7 +340,7 @@
if (this.getRowKey() != null) {
writer.startElement("td", input);
if (!isStackedLastElement()) {
- if (getTree().isShowConnectingLines() && this.getRowKey() != null)
+ if (getTree().isShowConnectingLines())
getUtils().writeAttribute(writer, "class",
"dr-tree-h-ic-line");
}
17 years, 7 months
JBoss Rich Faces SVN: r714 - trunk/richfaces/tree/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-09 17:44:24 -0400 (Wed, 09 May 2007)
New Revision: 714
Modified:
trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-110 fixed
Modified: trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java
===================================================================
--- trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-05-09 16:52:23 UTC (rev 713)
+++ trunk/richfaces/tree/src/main/java/org/richfaces/renderkit/TreeRendererBase.java 2007-05-09 21:44:24 UTC (rev 714)
@@ -337,13 +337,16 @@
.writeAttribute(writer, "style", "display: none;");
}
- writer.startElement("td", input);
- if (!isStackedLastElement()) {
- if (getTree().isShowConnectingLines() && this.getRowKey() != null)
- getUtils().writeAttribute(writer, "class",
- "dr-tree-h-ic-line");
+ if (this.getRowKey() != null) {
+ writer.startElement("td", input);
+ if (!isStackedLastElement()) {
+ if (getTree().isShowConnectingLines() && this.getRowKey() != null)
+ getUtils().writeAttribute(writer, "class",
+ "dr-tree-h-ic-line");
+ }
+ writer.endElement("td");
}
- writer.endElement("td");
+
writer.startElement("td", input);
getUtils().writeAttribute(writer, "colspan", "2");
getUtils().writeAttribute(writer, "id", id + "childs:td");
17 years, 7 months
JBoss Rich Faces SVN: r713 - trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2007-05-09 12:52:23 -0400 (Wed, 09 May 2007)
New Revision: 713
Modified:
trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java
trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarRendererBase.java
Log:
alt attr is added
Modified: trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java
===================================================================
--- trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java 2007-05-08 18:44:34 UTC (rev 712)
+++ trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarGroupRenderer.java 2007-05-09 16:52:23 UTC (rev 713)
@@ -92,6 +92,7 @@
writer.writeAttribute("align", "center", null);
writer.startElement("img", toolBarGroup);
getUtils().writeAttribute(writer, "src", uri);
+ getUtils().writeAttribute(writer, "alt", "");
writer.endElement("img");
writer.endElement("td");
}
Modified: trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarRendererBase.java
===================================================================
--- trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarRendererBase.java 2007-05-08 18:44:34 UTC (rev 712)
+++ trunk/richfaces/toolBar/src/main/java/org/richfaces/renderkit/html/ToolBarRendererBase.java 2007-05-09 16:52:23 UTC (rev 713)
@@ -123,6 +123,7 @@
getUtils().writeAttribute(writer, "class", toolBar.getAttributes().get("separatorClass"));
writer.startElement("img", toolBar);
getUtils().writeAttribute(writer, "src", uri);
+ getUtils().writeAttribute(writer, "alt", "");
writer.endElement("img");
writer.endElement("td");
}
17 years, 7 months
JBoss Rich Faces SVN: r712 - trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-08 14:44:34 -0400 (Tue, 08 May 2007)
New Revision: 712
Modified:
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
Disabling keyboard navigation on main page. Seems to work under IE and FF, Doesn't work in Opera yet. In progress..
Modified: trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-05-08 18:30:56 UTC (rev 711)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-05-08 18:44:34 UTC (rev 712)
@@ -251,6 +251,8 @@
},
show: function(opts) {
+ this.disableDocumentFocusElements();
+
this.onSelectStartHandler = document.onselectstart;
document.onselectstart = function () { return false; };
@@ -413,6 +415,8 @@
},
hide: function() {
+ this.enableDocumentFocusElements();
+
document.onselectstart = this.onSelectStartHandler;
this.traverseSelects(true);
@@ -561,7 +565,113 @@
}
return vetoes;
+ },
+
+ isInMP: function(elem) {
+ while (elem && elem.parentNode && elem.parentNode.tagName.toLowerCase() != "body")
+ if (elem.parentNode.id == this.cdiv.id)
+ return true;
+ else
+ elem = elem.parentNode;
+ return false;
+ },
+
+ disableDocumentFocusElements: function() {
+ var links = document.getElementsByTagName("a");
+ var forms = document.forms;
+ var inputs = document.getElementsByTagName("input");
+ if (inputs) {
+ for (var i=0; i<inputs.length; i++)
+ // inputs with type "image" are not included to form.elements array.
+ // We have to process them separately :(
+ if (!this.isInMP(inputs[i]) && inputs[i].type && inputs[i].type.indexOf("image") == 0) {
+ if (inputs[i].tabIndex)
+ inputs[i].prevTabIndex = inputs[i].tabIndex;
+ inputs[i].tabIndex = -1;
+ if ("FF" == RichFaces.navigatorType() || "OPERA" == RichFaces.navigatorType()) {
+ inputs[i].forceBlur = this.blurFocusElement.bindAsEventListener(inputs[i]);
+ Event.observe(inputs[i], 'focus', inputs[i].forceBlur, false);
+ }
+ }
+ }
+ if (links)
+ for (var i=0; i<links.length; i++)
+ if (!this.isInMP(links[i])) {
+ if (links[i].tabIndex)
+ links[i].prevTabIndex = links[i].tabIndex;
+ links[i].tabIndex = -1;
+ if ("FF" == RichFaces.navigatorType() || "OPERA" == RichFaces.navigatorType()) {
+ links[i].forceBlur = this.blurFocusElement.bindAsEventListener(links[i]);
+ Event.observe(links[i], 'focus', links[i].forceBlur, false);
+ }
+ }
+ if (forms)
+ for (var i=0; i<forms.length; i++)
+ for (var j=0; j<forms[i].length; j++)
+ if (!this.isInMP(forms[i][j])) {
+ if (forms[i][j].tabIndex)
+ forms[i][j].prevTabIndex = forms[i][j].tabIndex;
+ forms[i][j].tabIndex = -1;
+ if (forms[i][j].type && forms[i][j].type.indexOf("radio") == 0) {
+ forms[i][j].prevDisabled = forms[i][j].disabled;
+ forms[i][j].disabled = true;
+ }
+ if ("FF" == RichFaces.navigatorType() || "OPERA" == RichFaces.navigatorType()) {
+ forms[i][j].forceBlur = this.blurFocusElement.bindAsEventListener(forms[i][j]);
+ Event.observe(forms[i][j], 'focus', forms[i][j].forceBlur, false);
+ }
+ }
+ },
+
+ enableDocumentFocusElements: function() {
+ var links = document.getElementsByTagName("a");
+ var forms = document.forms;
+ var inputs = document.getElementsByTagName("input");
+ if (inputs)
+ for (var i=0; i<inputs.length; i++)
+ // inputs with type "image" are not included to form.elements array.
+ // We have to process them separately :(
+ if (!this.isInMP(inputs[i]) && inputs[i].type && inputs[i].type.indexOf("image") == 0) {
+ if (inputs[i].prevTabIndex)
+ inputs[i].tabIndex = inputs[i].prevTabIndex;
+ else
+ inputs[i].tabIndex = 0;
+ if ("FF" == RichFaces.navigatorType() || "OPERA" == RichFaces.navigatorType())
+ Event.stopObserving(inputs[i], "focus", inputs[i].forceBlur);
+ }
+ if (links)
+ for (var i=0; i<links.length; i++)
+ if (!this.isInMP(links[i])) {
+ if (links[i].prevTabIndex)
+ links[i].tabIndex = links[i].prevTabIndex;
+ else
+ links[i].tabIndex = 0;
+ if ("FF" == RichFaces.navigatorType() || "OPERA" == RichFaces.navigatorType())
+ Event.stopObserving(links[i], "focus", links[i].forceBlur);
+ }
+ if (forms)
+ for (var i=0; i<forms.length; i++)
+ for (var j=0; j<forms[i].length; j++)
+ if (!this.isInMP(forms[i][j])) {
+ if (forms[i][j].prevTabIndex)
+ forms[i][j].tabIndex = forms[i][j].prevTabIndex;
+ else
+ forms[i][j].tabIndex = 0;
+ if (forms[i][j].type && forms[i][j].type.indexOf("radio") == 0) {
+ if (forms[i][j].prevDisabled)
+ forms[i][j].disabled = forms[i][j].prevDisabled;
+ else
+ forms[i][j].disabled = false;
+ }
+ if ("FF" == RichFaces.navigatorType() || "OPERA" == RichFaces.navigatorType())
+ Event.stopObserving(forms[i][j], "focus", forms[i][j].forceBlur);
+ }
+ },
+
+ blurFocusElement: function() {
+ this.blur();
}
+
}
Richfaces.findModalPanel = function (id) {
17 years, 7 months
JBoss Rich Faces SVN: r711 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 14:30:56 -0400 (Tue, 08 May 2007)
New Revision: 711
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java
Log:
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-08 18:30:49 UTC (rev 710)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/component/UIScrollableGrid.java 2007-05-08 18:30:56 UTC (rev 711)
@@ -6,7 +6,6 @@
import java.util.Iterator;
import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
import org.ajax4jsf.ajax.repeat.UIRepeat;
import org.apache.commons.collections.iterators.IteratorChain;
17 years, 7 months
JBoss Rich Faces SVN: r710 - trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 14:30:49 -0400 (Tue, 08 May 2007)
New Revision: 710
Modified:
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnVisitor.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java
trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnVisitor.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnVisitor.java 2007-05-08 18:30:35 UTC (rev 709)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnVisitor.java 2007-05-08 18:30:49 UTC (rev 710)
@@ -5,12 +5,9 @@
import java.io.IOException;
-import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.framework.renderer.RendererBase;
-import org.richfaces.component.UIScrollableGrid;
import org.richfaces.component.UIScrollableGridColumn;
/**
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java 2007-05-08 18:30:35 UTC (rev 709)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/ColumnWalker.java 2007-05-08 18:30:49 UTC (rev 710)
@@ -10,7 +10,6 @@
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
-import org.ajax4jsf.framework.renderer.RendererBase;
import org.ajax4jsf.framework.renderer.RendererUtils.HTML;
import org.richfaces.component.UIScrollableGrid;
import org.richfaces.component.UIScrollableGridColumn;
Modified: trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-05-08 18:30:35 UTC (rev 709)
+++ trunk/sandbox/scrollable-grid/src/main/java/org/richfaces/renderkit/html/GridRendererState.java 2007-05-08 18:30:49 UTC (rev 710)
@@ -5,13 +5,11 @@
import java.io.Serializable;
import java.util.Map;
-import java.util.Set;
import javax.faces.FacesException;
import javax.faces.component.NamingContainer;
import javax.faces.context.FacesContext;
-import org.ajax4jsf.framework.ajax.AjaxContainer;
import org.ajax4jsf.framework.renderer.AjaxRendererUtils;
import org.richfaces.component.UIScrollableGrid;
17 years, 7 months
JBoss Rich Faces SVN: r709 - trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 14:30:35 -0400 (Tue, 08 May 2007)
New Revision: 709
Modified:
trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody2.js
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody2.js
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody2.js 2007-05-08 17:58:06 UTC (rev 708)
+++ trunk/sandbox/scrollable-grid/src/main/javascript/ClientUI/controls/grid/GridBody2.js 2007-05-08 18:30:35 UTC (rev 709)
@@ -181,6 +181,10 @@
this.defaultRowHeight = Element.getHeight(templNormal.rows[0].cells[0]);
if(ClientUILib.isGecko) {
this.defaultRowHeight -= this.getBorderWidth("tb") + this.getPadding("tb");
+ }
+ for(var i=0; i<this.rowsCount; i++) {
+ templFrozen.rows[i].index = i;
+ templNormal.rows[i].index = i;
}
return true;
},
@@ -557,12 +561,62 @@
this.templNormal.moveToY(pos);
}
else {
- var rowsNeededCount = 0;
+ var count = 0, i, row, rownew;
+
+ var frozenTbl = this.templFrozen.getElement().tBodies[0];
+ var normalTbl = this.templNormal.getElement().tBodies[0];
+
if(range.start > this.currRange.start
&& range.start < this.currRange.end) {
// TODO: get rows from this.currRange.start to range.start
// and move them to end of table
// then move table to correct position
+ count = range.start - this.currRange.start;
+
+ // store visible row pos to restore after rows reerrange
+ var visibleRowPos = this.templFrozen.getY() + count * this.defaultRowHeight;
+
+ for(i=0; i<count; i++) {
+ row = frozenTbl.rows[0];
+ frozenTbl.deleteRow(row);
+ rownew = frozenTbl.insertRow(this.rowsCount-1);
+ rownew.parentNode.replaceChild(row,rownew);
+
+ row = normalTbl.rows[0];
+ normalTbl.deleteRow(row);
+ rownew = normalTbl.insertRow(this.rowsCount-1);
+ rownew.parentNode.replaceChild(row,rownew);
+ }
+
+ this.templFrozen.moveToY(visibleRowPos);
+ this.templNormal.moveToY(visibleRowPos);
+/*
+ // prepare array of column elements for sorting
+ var count = this.body.rows.length;
+ var elements = new Array(count);
+ for(var i=0; i<count; i++) {
+ var callbackProc = this.getSortFunction(nColumn);
+ elements[i] = { row: this.body.rows[i], element: this.body.rows[i].cells[nColumn], callback: callbackProc };
+ }
+
+ // sort
+ elements.sort(MyTableObject.defaultCompareCallback);
+ if (sortOrder == "descending")elements.reverse();
+
+ var nextSibling = this.body.nextSibling;
+ if (removeChilds) { // remove all rows
+ var p = this.body.parentNode;
+ p.removeChild(this.body);
+ }
+
+ // insert in the new order
+ var l = elements.length;
+ for (var i = 0; i < l; i++)
+ this.body.appendChild(elements[i].row);
+
+ if(removeChilds)
+ p.insertBefore(this.body, nextSibling);
+*/
}
else {
// TODO: get rows from range.end to this.currRange.end
@@ -620,7 +674,7 @@
}.bind(this), this.grid.dataModel.getRequestDelay());
this.pendingTask = task;
- },
+ },
invalidate: function(options) {
this.dataView.each(function(row) {
row.show();
17 years, 7 months
JBoss Rich Faces SVN: r708 - trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:58:06 -0400 (Tue, 08 May 2007)
New Revision: 708
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java 2007-05-08 17:57:58 UTC (rev 707)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/bean/SelectionBean.java 2007-05-08 17:58:06 UTC (rev 708)
@@ -15,6 +15,7 @@
public SelectionBean(){
+ System.out.println("create SelectionBean");
}
public List getDataModel() {
17 years, 7 months
JBoss Rich Faces SVN: r707 - trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:57:58 -0400 (Tue, 08 May 2007)
New Revision: 707
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/ImageStore.java
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/ImageStore.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/ImageStore.java 2007-05-08 17:57:51 UTC (rev 706)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/ImageStore.java 2007-05-08 17:57:58 UTC (rev 707)
@@ -20,6 +20,7 @@
public class ImageStore{
public ImageStore() {
super();
+ System.out.println("--> ImageStore.ImageStore()");
}
private Map <Object, String> images = new HashMap<Object, String>();
17 years, 7 months
JBoss Rich Faces SVN: r706 - trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-08 13:57:51 -0400 (Tue, 08 May 2007)
New Revision: 706
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/JiraService.java
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/JiraService.java
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/JiraService.java 2007-05-08 17:57:42 UTC (rev 705)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/java/org/richfaces/demo/datagrid/service/JiraService.java 2007-05-08 17:57:51 UTC (rev 706)
@@ -43,6 +43,7 @@
*/
public JiraService() {
super();
+ System.out.println("---> JiraService.JiraService()");
init();
}
@@ -85,6 +86,7 @@
private void init() {
+ System.out.println("JiraService.init()");
channel = new Channel();
Digester digester = new Digester();
digester.setValidating(false);
17 years, 7 months