JBoss Rich Faces SVN: r99 - trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd.
by richfaces-svn-commits@lists.jboss.org
Author: A.Skokov
Date: 2007-03-19 13:55:25 -0400 (Mon, 19 Mar 2007)
New Revision: 99
Modified:
trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js
Log:
Modified: trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js
===================================================================
--- trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js 2007-03-19 14:38:01 UTC (rev 98)
+++ trunk/richfaces/common/src/main/resources/org/richfaces/renderkit/html/scripts/dnd/dnd-dropzone.js 2007-03-19 17:55:25 UTC (rev 99)
@@ -74,9 +74,9 @@
var accepts = this.accept(drag);
var markerType = accepts ? "accept" : "reject";
-
+
DnD.setDefaultDnDParams(dndParams);
-
+
if (drag.source.getDraggableItems && drag.source.getDraggableItems() > 1) {
indicator.setContent(markerType, false, dndParams);
} else {
@@ -106,12 +106,12 @@
if (indicator) {
indicator.leave();
}
-
+
},
- dragUp: function(event) {
- this.ondropend(event, drag);
-
+ dragUp: function(event) {
+ this.ondropend(event);
+
if( this.options && this.options.ondropend) {
this.options.ondropend();
}
17 years, 2 months
JBoss Rich Faces SVN: r98 - trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-03-19 10:38:01 -0400 (Mon, 19 Mar 2007)
New Revision: 98
Modified:
trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
Log:
Fix JS error in Konqueror/Safari.
Modified: trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js
===================================================================
--- trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-03-19 13:35:57 UTC (rev 97)
+++ trunk/richfaces/inputnumber-slider/src/main/resources/org/richfaces/renderkit/html/script/SliderScript.js 2007-03-19 14:38:01 UTC (rev 98)
@@ -151,7 +151,7 @@
return this.roundFloat(this.availableValues[pos]);
},
- binsearch: function binsear(v, t) {
+ binsearch: function(v, t) {
var i = 0;
var j = v.length - 1;
var k;
17 years, 2 months
JBoss Rich Faces SVN: r97 - trunk/richfaces/tabPanel/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-03-19 09:35:57 -0400 (Mon, 19 Mar 2007)
New Revision: 97
Modified:
trunk/richfaces/tabPanel/src/main/templates/tab.jspx
Log:
RFA-310 fixed
Modified: trunk/richfaces/tabPanel/src/main/templates/tab.jspx
===================================================================
--- trunk/richfaces/tabPanel/src/main/templates/tab.jspx 2007-03-17 17:22:29 UTC (rev 96)
+++ trunk/richfaces/tabPanel/src/main/templates/tab.jspx 2007-03-19 13:35:57 UTC (rev 97)
@@ -16,7 +16,7 @@
<td id="#{clientId}" style="position: relative; #{this:getTabDisplay(context, component)}"
height="100%">
- <table border="0" cellpadding="10" cellspacing="0" width="100%" class="dr-tbpnl-cntnt-pstn rich-tabpanel-content-position" style="position : relative;">
+ <table border="0" cellpadding="10" cellspacing="0" width="100%" class="dr-tbpnl-cntnt-pstn rich-tabpanel-content-position" style="position : relative; z-index: 1;">
<tr>
<td class="dr-tbpnl-cntnt rich-tabpanel-content #{component.pane.attributes['contentClass']} #{component.attributes['styleClass']}" style="#{component.attributes['contentStyle']}; #{component.attributes['style']}">
<vcp:body />
17 years, 2 months
JBoss Rich Faces SVN: r96 - in trunk/richfaces/modal-panel/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-17 13:22:29 -0400 (Sat, 17 Mar 2007)
New Revision: 96
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/modalPanelBorders.js
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
Vertical resize fixed in IE6
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-03-17 14:15:26 UTC (rev 95)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-03-17 17:22:29 UTC (rev 96)
@@ -57,7 +57,7 @@
ModalPanel.Context = Class.create();
ModalPanel.Context.prototype = {
initialize: function(modalPanel) {
- this.cdiv = modalPanel.cdiv;
+ this.cdiv = modalPanel.contentDiv;
this.isPositionFixed = Richfaces.getComputedStyle(this.cdiv, "position") == "fixed";
},
@@ -106,7 +106,8 @@
this.div = $(id + "Div");
this.cursorDiv = $(id + "CursorDiv");
this.cdiv = $(id + "CDiv");
-
+ this.contentDiv = $(id + "ContentDiv");
+
this.context = new ModalPanel.Context(this);
this.borders = new Array();
@@ -282,7 +283,7 @@
options.width = this.minWidth;
}
- this.cdiv.style.width = options.width + 'px';
+ this.contentDiv.style.width = options.width + 'px';
}
if (options.height) {
@@ -290,7 +291,7 @@
options.height = this.minHeight;
}
- this.cdiv.style.height = options.height + 'px';
+ this.contentDiv.style.height = options.height + 'px';
}
if (options.left) {
@@ -300,9 +301,9 @@
} else {
var cw = getSizeElement().clientWidth;
if (RichFaces.navigatorType() == "OPERA")
- _left = (cw - this.cdiv.style.width.replace("px", "")) / 2;
+ _left = (cw - this.contentDiv.style.width.replace("px", "")) / 2;
else
- _left = (cw - Richfaces.getComputedStyleSize(this.cdiv, "width")) / 2;
+ _left = (cw - Richfaces.getComputedStyleSize(this.contentDiv, "width")) / 2;
}
@@ -315,7 +316,7 @@
_top = parseInt(options.top, 10);
} else {
var cw = getSizeElement().clientHeight;
- _top = (cw - Richfaces.getComputedStyleSize(this.cdiv, "height")) / 2;
+ _top = (cw - Richfaces.getComputedStyleSize(this.contentDiv, "height")) / 2;
}
this.setTop(_top);
@@ -377,6 +378,8 @@
Element.show(this.id);
+ this.doResizeOrMove(ModalPanel.Sizer.Diff.EMPTY);
+
for (var k = 0; k < this.borders.length; k++ ) {
this.borders[k].doPosition();
}
@@ -427,25 +430,24 @@
doResizeOrMove: function(diff) {
var vetoes = {};
var cssHash = {};
+ var cssHashWH = {};
var winSize = Richfaces.getWindowSize();
var vetoeChange = false;
- var newSize = Richfaces.getComputedStyleSize(this.cdiv, "width");
+ var newSize = Richfaces.getComputedStyleSize(this.contentDiv, "width");
var oldSize = newSize;
- var maxX = winSize.width - oldSize - 1;
newSize += diff.deltaWidth || 0;
if (newSize >= this.minWidth) {
if (diff.deltaWidth) {
- cssHash.width = newSize + 'px';
+ cssHashWH.width = newSize + 'px';
maxX = winSize.width - newSize -1;
}
} else {
if (diff.deltaWidth) {
- cssHash.width = this.minWidth + 'px';
- maxX = winSize.width - this.minWidth -1;
+ cssHashWH.width = this.minWidth + 'px';
vetoes.vx = oldSize - this.minWidth;
}
@@ -465,34 +467,26 @@
if (this.cdiv.mpUseExpr) {
newPos = this.cdiv.mpLeft || 0;
newPos += diff.deltaX;
- if (newPos<0) newPos = 0;
- if (newPos>maxX) newPos = maxX;
this.cdiv.mpLeft = newPos;
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "left");
newPos += diff.deltaX;
- if (newPos<0) newPos = 0;
- if (newPos>maxX) newPos = maxX;
-
cssHash.left = newPos + 'px';
}
}
- var newSize = Richfaces.getComputedStyleSize(this.cdiv, "height");
+ var newSize = Richfaces.getComputedStyleSize(this.contentDiv, "height");
var oldSize = newSize;
- var maxY = winSize.height - oldSize - 1;
newSize += diff.deltaHeight || 0;
if (newSize >= this.minHeight) {
if (diff.deltaHeight) {
- cssHash.height = newSize + 'px';
- maxY = winSize.height - newSize -1;
+ cssHashWH.height = newSize + 'px';
}
} else {
if (diff.deltaHeight) {
- cssHash.height = this.minHeight + 'px';
- maxY = winSize.heigth - this.minHeight -1;
+ cssHashWH.height = this.minHeight + 'px';
vetoes.vy = oldSize - this.minHeight;
}
@@ -513,24 +507,20 @@
if (this.cdiv.mpUseExpr) {
newPos = this.cdiv.mpTop || 0;
newPos += diff.deltaY;
- if (newPos<0) newPos = 0;
- if (newPos>maxY) newPos = maxY;
this.cdiv.mpTop = newPos;
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "top");
newPos += diff.deltaY;
- if (newPos<0) newPos = 0;
- if (newPos>maxY) newPos = maxY;
-
cssHash.top = newPos + 'px';
}
}
Element.setStyle(this.cdiv, cssHash);
+ Element.setStyle(this.contentDiv, cssHashWH);
- var w = this.cdiv.offsetWidth;
- var h = this.cdiv.offsetHeight;
+ var w = this.context.width();
+ var h = this.context.height();
this.context.reduced = null;
Modified: trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
===================================================================
--- trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2007-03-17 14:15:26 UTC (rev 95)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2007-03-17 17:22:29 UTC (rev 96)
@@ -116,7 +116,7 @@
this.modalPanel.endDrag(this);
- vetoes = this.modalPanel.doResizeOrMove(ModalPanel.Sizer.Diff.EMPTY);
+ this.modalPanel.doResizeOrMove(ModalPanel.Sizer.Diff.EMPTY);
this.modalPanel.cursorDiv.style.zIndex = -200;
},
Modified: trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-03-17 14:15:26 UTC (rev 95)
+++ trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-03-17 17:22:29 UTC (rev 96)
@@ -41,7 +41,7 @@
<div class="dr-mpnl-mask-div rich-mpnl-mask-div" id="#{clientId}CursorDiv"
style="filter: alpha(opacity=1); opacity: 0.01; z-index: -200"></div>
- <div id="#{clientId}CDiv" class="dr-mpnl-panel rich-mpnl_panel" style="z-index: 2;">
+ <div id="#{clientId}CDiv" class="dr-mpnl-panel rich-mpnl_panel" style="width: 1px; height: 1px; z-index: 2;">
<jsp:scriptlet>
<![CDATA[
@@ -66,8 +66,8 @@
]]>
</jsp:scriptlet>
- <div style="position: absolute; width: 100%; height: 100%; overflow: hidden; z-index: 2;"
- class="dr-mpnl-pnl" >
+ <div style="position: absolute; overflow: hidden; z-index: 2;"
+ class="dr-mpnl-pnl" id="#{clientId}ContentDiv">
<table style="height: 100%; width: 100%;" border="0" cellpadding="0" cellspacing="0">
<jsp:scriptlet>
<![CDATA[if(component.getFacet("header")!=null && component.getFacet("header").isRendered()) {]]>
17 years, 2 months
JBoss Rich Faces SVN: r95 - trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: a.izobov
Date: 2007-03-17 10:15:26 -0400 (Sat, 17 Mar 2007)
New Revision: 95
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/modalPanelBorders.js
Log:
RFA-247 fixed
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-03-17 13:15:06 UTC (rev 94)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-03-17 14:15:26 UTC (rev 95)
@@ -427,20 +427,25 @@
doResizeOrMove: function(diff) {
var vetoes = {};
var cssHash = {};
+
+ var winSize = Richfaces.getWindowSize();
var vetoeChange = false;
var newSize = Richfaces.getComputedStyleSize(this.cdiv, "width");
var oldSize = newSize;
+ var maxX = winSize.width - oldSize - 1;
newSize += diff.deltaWidth || 0;
if (newSize >= this.minWidth) {
if (diff.deltaWidth) {
cssHash.width = newSize + 'px';
+ maxX = winSize.width - newSize -1;
}
} else {
if (diff.deltaWidth) {
cssHash.width = this.minWidth + 'px';
+ maxX = winSize.width - this.minWidth -1;
vetoes.vx = oldSize - this.minWidth;
}
@@ -460,26 +465,34 @@
if (this.cdiv.mpUseExpr) {
newPos = this.cdiv.mpLeft || 0;
newPos += diff.deltaX;
+ if (newPos<0) newPos = 0;
+ if (newPos>maxX) newPos = maxX;
this.cdiv.mpLeft = newPos;
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "left");
newPos += diff.deltaX;
+ if (newPos<0) newPos = 0;
+ if (newPos>maxX) newPos = maxX;
+
cssHash.left = newPos + 'px';
}
}
var newSize = Richfaces.getComputedStyleSize(this.cdiv, "height");
var oldSize = newSize;
+ var maxY = winSize.height - oldSize - 1;
newSize += diff.deltaHeight || 0;
if (newSize >= this.minHeight) {
if (diff.deltaHeight) {
cssHash.height = newSize + 'px';
+ maxY = winSize.height - newSize -1;
}
} else {
if (diff.deltaHeight) {
cssHash.height = this.minHeight + 'px';
+ maxY = winSize.heigth - this.minHeight -1;
vetoes.vy = oldSize - this.minHeight;
}
@@ -500,11 +513,16 @@
if (this.cdiv.mpUseExpr) {
newPos = this.cdiv.mpTop || 0;
newPos += diff.deltaY;
+ if (newPos<0) newPos = 0;
+ if (newPos>maxY) newPos = maxY;
this.cdiv.mpTop = newPos;
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "top");
newPos += diff.deltaY;
+ if (newPos<0) newPos = 0;
+ if (newPos>maxY) newPos = maxY;
+
cssHash.top = newPos + 'px';
}
}
Modified: trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
===================================================================
--- trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2007-03-17 13:15:06 UTC (rev 94)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2007-03-17 14:15:26 UTC (rev 95)
@@ -27,6 +27,10 @@
this.dragX = event.clientX;
this.dragY = event.clientY;
+
+ this.startX = event.clientX-Richfaces.getComputedStyleSize(this.modalPanel.cdiv, "left");
+ this.startY = event.clientY-Richfaces.getComputedStyleSize(this.modalPanel.cdiv, "top");
+ this.winSize = Richfaces.getWindowSize();
Event.observe(document, 'mousemove', this.boundDoDrag);
Event.observe(document, 'mouseup', this.boundEndDrag);
@@ -45,11 +49,41 @@
var evtX = event.clientX;
var evtY = event.clientY;
+ if (evtX<0) evtX=0;
+ if (evtY<0) evtY=0;
+ if (evtX>=this.winSize.width) evtX=this.winSize.width-1;
+ if (evtY>=this.winSize.height) evtY=this.winSize.height-1;
+
var dx = evtX - this.dragX;
var dy = evtY - this.dragY;
if (dx != 0 || dy != 0) {
var diff = this.sizer.doDiff(dx, dy);
+ if (diff.deltaWidth == 0 && diff.deltaHeight==0) {
+ var delX = evtX-Richfaces.getComputedStyleSize(this.modalPanel.cdiv, "left");
+ if (dx>0) {
+ if (delX<this.startX) {
+ dx = Math.max(delX+dx-this.startX,0);
+ }
+ } else {
+ if (delX>this.startX) {
+ dx = Math.min(delX+dx-this.startX,0);
+ }
+ }
+ diff.deltaX = dx;
+ var delY = evtY-Richfaces.getComputedStyleSize(this.modalPanel.cdiv, "top");
+ if (dy>0) {
+ if (delY<this.startY) {
+ dy = Math.max(delY+dy-this.startY,0);
+ }
+ } else {
+ if (delY>this.startY) {
+ dy = Math.min(delY+dy-this.startY,0);
+ }
+ }
+ diff.deltaY = dy;
+ }
+
var vetoes = this.modalPanel.doResizeOrMove(diff);
if (!vetoes.x) {
17 years, 2 months
JBoss Rich Faces SVN: r94 - trunk/richfaces/datascroller/src/main/templates/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: d.bulahov
Date: 2007-03-17 09:15:06 -0400 (Sat, 17 Mar 2007)
New Revision: 94
Modified:
trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
Log:
RF-15 fixed
Modified: trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx
===================================================================
--- trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-03-17 09:40:07 UTC (rev 93)
+++ trunk/richfaces/datascroller/src/main/templates/org/richfaces/htmlDatascroller.jspx 2007-03-17 13:15:06 UTC (rev 94)
@@ -33,7 +33,7 @@
if(component.getFacet(component.FIRST_FACET_NAME)!=null ) {
]]></jsp:scriptlet>
<td align="center" class="dr-dscr-button rich-datascr-button" onclick="#{onclick}">
- <u:insertFacet name='#{component.FIRST_FACET_NAME'/>
+ <u:insertFacet name="first"/>
</td>
<jsp:scriptlet><![CDATA[
}else{
@@ -50,7 +50,7 @@
if(component.getFacet(component.FAST_REWIND_FACET_NAME)!=null ) {
]]></jsp:scriptlet>
<td align="center" class="dr-dscr-button rich-datascr-button" onclick="#{onclick}">
- <u:insertFacet name='#{component.FAST_REWIND_FACET_NAME'/>
+ <u:insertFacet name="fastrewind"/>
</td>
<jsp:scriptlet><![CDATA[
}else{
@@ -67,7 +67,7 @@
if(component.getFacet(component.PREVIOUS_FACET_NAME)!=null ) {
]]></jsp:scriptlet>
<td align="center" class="dr-dscr-button rich-datascr-button" onclick="#{onclick}">
- <u:insertFacet name='#{component.PREVIOUS_FACET_NAME'/>
+ <u:insertFacet name="previous"/>
</td>
<jsp:scriptlet><![CDATA[
}else{
@@ -87,7 +87,7 @@
if(component.getFacet(component.NEXT_FACET_NAME)!=null ) {
]]></jsp:scriptlet>
<td align="center" class="dr-dscr-button rich-datascr-button" onclick="#{onclick}">
- <u:insertFacet name='#{component.NEXT_FACET_NAME'/>
+ <u:insertFacet name="next"/>
</td>
<jsp:scriptlet><![CDATA[
}else{
@@ -104,7 +104,7 @@
if(component.getFacet(component.FAST_FORWARD_FACET_NAME)!=null ) {
]]></jsp:scriptlet>
<td align="center" class="dr-dscr-button rich-datascr-button" onclick="#{onclick}">
- <u:insertFacet name='#{component.FAST_FORWARD_FACET_NAME'/>
+ <u:insertFacet name="fastforward"/>
</td>
<jsp:scriptlet><![CDATA[
}else{
@@ -121,7 +121,7 @@
if(component.getFacet(component.LAST_FACET_NAME)!=null ) {
]]></jsp:scriptlet>
<td align="center" class="dr-dscr-button rich-datascr-button" onclick="#{onclick}">
- <u:insertFacet name='#{component.LAST_FACET_NAME'/>
+ <u:insertFacet name="last"/>
</td>
<jsp:scriptlet><![CDATA[
}else{
17 years, 2 months
JBoss Rich Faces SVN: r93 - trunk/richfaces/datascroller/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: d.bulahov
Date: 2007-03-17 05:40:07 -0400 (Sat, 17 Mar 2007)
New Revision: 93
Modified:
trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
Log:
Modified: trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java
===================================================================
--- trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-03-16 20:42:42 UTC (rev 92)
+++ trunk/richfaces/datascroller/src/main/java/org/richfaces/component/UIDatascroller.java 2007-03-17 09:40:07 UTC (rev 93)
@@ -266,19 +266,27 @@
if (previous >= 0) dataTable.setFirst(previous);
}
else if (NEXT_FACET_NAME.equals(facetName)) {
- int next = dataTable.getFirst() + getRows();
- if (next>getMaxPages()) next=getMaxPages();
+ int rows = getRows();
+ int next = dataTable.getFirst() + rows;
if (next < getRowCount()) dataTable.setFirst(next);
+ if (rows>0){
+ if (((next+rows)/rows)>getMaxPages()){
+ next=getMaxPages()*rows-rows;;
+ }
+ }
}
else if (FAST_FORWARD_FACET_NAME.equals(facetName)) {
- int fastStep = getFastStep();
+ int fastStep = getFastStep();
+ int rows = getRows();
if (fastStep <= 0) fastStep = 1;
- int next = dataTable.getFirst() + getRows() * fastStep;
+ int next = dataTable.getFirst() + rows * fastStep;
int rowcount = getRowCount();
if (next >= rowcount)
- next = (rowcount - 1) - ((rowcount - 1) % getRows());
- if (next>getMaxPages()){
- next=getMaxPages();
+ next = (rowcount - 1) - ((rowcount - 1) % rows);
+ if (rows>0){
+ if (((next+rows)/rows)>getMaxPages()){
+ next=getMaxPages()*rows-rows;;
+ }
}
dataTable.setFirst(next);
}
@@ -296,9 +304,11 @@
int first = delta > 0 && delta < rows ? rowcount - delta : rowcount
- rows;
if (first >= 0) {
- if (first>getMaxPages()){
- first=getMaxPages();
+ if (rows>0){
+ if (((first+rows)/rows)>getMaxPages()){
+ first=getMaxPages()*rows-rows;
}
+ }
dataTable.setFirst(first);
}
else {
17 years, 2 months
JBoss Rich Faces SVN: r92 - trunk/richfaces-samples/modalpanel-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-16 16:42:42 -0400 (Fri, 16 Mar 2007)
New Revision: 92
Modified:
trunk/richfaces-samples/modalpanel-sample/src/main/webapp/pages/index.jsp
Log:
Test case for http://jira.jboss.com/jira/browse/RF-13 added
Modified: trunk/richfaces-samples/modalpanel-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/modalpanel-sample/src/main/webapp/pages/index.jsp 2007-03-16 20:41:55 UTC (rev 91)
+++ trunk/richfaces-samples/modalpanel-sample/src/main/webapp/pages/index.jsp 2007-03-16 20:42:42 UTC (rev 92)
@@ -86,6 +86,8 @@
Modal panel is here!
</f:verbatim>
+ <h:inputText value="name"/>
+
<h:selectOneMenu>
<f:selectItem itemLabel="item1" itemValue="item1" />
<f:selectItem itemLabel="item2" itemValue="item2" />
17 years, 2 months
JBoss Rich Faces SVN: r91 - in trunk/richfaces/modal-panel/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-03-16 16:41:55 -0400 (Fri, 16 Mar 2007)
New Revision: 91
Modified:
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
Log:
IFrame blocking SELECTs now is created dynamically only if needed - providing fix for http://jira.jboss.com/jira/browse/RF-13
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-03-16 20:10:14 UTC (rev 90)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-03-16 20:41:55 UTC (rev 91)
@@ -105,13 +105,10 @@
this.div = $(id + "Div");
this.cursorDiv = $(id + "CursorDiv");
- this.iframe = $(id + "IFrame");
this.cdiv = $(id + "CDiv");
this.context = new ModalPanel.Context(this);
- this.iframe.onload = this.initIframe.bind(this.iframe);
-
this.borders = new Array();
if (this.options.resizeable) {
@@ -148,8 +145,6 @@
this.cursorDiv.style.width = "1px";
this.cursorDiv.style.height = "1px";
-
- //this.iframe.style.position = "absolute";
this.cdiv.style.position = "absolute";
this.cdiv.mpUseExpr = true;
@@ -259,6 +254,19 @@
this.floatedToBody = true;
}
+ if (ModalPanel.disableSelects && !this.iframe) {
+ new Insertion.Top(this.cdiv,
+ "<iframe src=\"javascript:''\" frameborder=\"0\" scrolling=\"no\" id=\"" + this.markerId.id + "IFrame\"" +
+ "style=\"position: absolute; width: 100%; height: 100%; background-color: white; overflow-y: hidden; z-index: 1;\">" +
+ "</iframe>");
+
+ this.iframe = $(this.markerId.id + "IFrame");
+
+ //alert("IFrame:" + this.iframe + "created!");
+
+ this.iframe.onload = this.initIframe.bind(this.iframe);
+ }
+
var options = {};
if (!this.cdiv.mpSet) {
@@ -351,9 +359,6 @@
var leftExpr = "(this.mpLeft || 0) + -Position.cumulativeOffset(this.parentNode)[0] + getSizeElement().scrollLeft + getSizeElement().clientLeft + \"px\"";
var topExpr = "(this.mpTop || 0) + -Position.cumulativeOffset(this.parentNode)[1] + getSizeElement().scrollTop + getSizeElement().clientTop + \"px\"";
- //this.iframe.style.setExpression("left", leftExpr);
- //this.iframe.style.setExpression("top", topExpr);
-
this.cdiv.style.setExpression("left", leftExpr);
this.cdiv.style.setExpression("top", topExpr);
@@ -412,9 +417,6 @@
this.cursorDiv.style.removeExpression("left");
this.cursorDiv.style.removeExpression("top");
- //this.iframe.style.removeExpression("left");
- //this.iframe.style.removeExpression("top");
-
this.cdiv.style.removeExpression("left");
this.cdiv.style.removeExpression("top");
}
@@ -460,7 +462,6 @@
newPos += diff.deltaX;
this.cdiv.mpLeft = newPos;
- //this.iframe.mpLeft = newPos;
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "left");
newPos += diff.deltaX;
@@ -501,7 +502,6 @@
newPos += diff.deltaY;
this.cdiv.mpTop = newPos;
- //this.iframe.mpTop = newPos;
} else {
newPos = Richfaces.getComputedStyleSize(this.cdiv, "top");
newPos += diff.deltaY;
@@ -510,7 +510,6 @@
}
Element.setStyle(this.cdiv, cssHash);
- //Element.setStyle(this.iframe, cssHash);
var w = this.cdiv.offsetWidth;
var h = this.cdiv.offsetHeight;
Modified: trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-03-16 20:10:14 UTC (rev 90)
+++ trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-03-16 20:41:55 UTC (rev 91)
@@ -43,10 +43,6 @@
<div id="#{clientId}CDiv" class="dr-mpnl-panel rich-mpnl_panel" style="z-index: 2;">
- <iframe frameborder="0" scrolling="no" id="#{clientId}IFrame"
- style="position: absolute; width: 100%; height: 100%; background-color: white; overflow-y: hidden; z-index: 1;">
- </iframe>
-
<jsp:scriptlet>
<![CDATA[
if (component.isResizeable()) {
17 years, 2 months
JBoss Rich Faces SVN: r90 - trunk/richfaces-samples/richfaces-demo.
by richfaces-svn-commits@lists.jboss.org
Author: alexsmirnov
Date: 2007-03-16 16:10:14 -0400 (Fri, 16 Mar 2007)
New Revision: 90
Modified:
trunk/richfaces-samples/richfaces-demo/pom.xml
Log:
Include el jars into war.
Modified: trunk/richfaces-samples/richfaces-demo/pom.xml
===================================================================
--- trunk/richfaces-samples/richfaces-demo/pom.xml 2007-03-16 19:26:04 UTC (rev 89)
+++ trunk/richfaces-samples/richfaces-demo/pom.xml 2007-03-16 20:10:14 UTC (rev 90)
@@ -15,7 +15,18 @@
<groupId>org.richfaces</groupId>
<artifactId>richfaces</artifactId>
<version>${project.version}</version>
- </dependency>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>el-impl</groupId>
+ <artifactId>el-impl</artifactId>
+ <version>1.0</version>
+ <scope>runtime</scope>
+ </dependency>
</dependencies>
<build>
<finalName>richfaces-demo</finalName>
17 years, 2 months