JBoss Rich Faces SVN: r5204 - trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-08 15:37:46 -0500 (Tue, 08 Jan 2008)
New Revision: 5204
Modified:
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
http://jira.jboss.com/jira/browse/RF-1654
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-01-08 20:23:59 UTC (rev 5203)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-01-08 20:37:46 UTC (rev 5204)
@@ -705,13 +705,7 @@
var eContentDiv = $(this.contentDiv);
- // Avoid currentStyle bug in opera
- if (RichFaces.navigatorType() != RichFaces.OPERA)
- {
- newSize = Richfaces.getComputedStyleSize(eContentDiv, "width");
- }
- else
- newSize = parseInt(eContentDiv.style.width.replace("px", ""), 10);
+ newSize = Richfaces.getComputedStyleSize(eContentDiv, "width");
var oldSize = newSize;
newSize += diff.deltaWidth || 0;
@@ -754,13 +748,7 @@
}
}
- // Avoid currentStyle bug in opera
- if (RichFaces.navigatorType() != RichFaces.OPERA)
- {
- newSize = Richfaces.getComputedStyleSize(eContentDiv, "height");
- }
- else
- newSize = parseInt(eContentDiv.style.height.replace("px", ""), 10);
+ newSize = Richfaces.getComputedStyleSize(eContentDiv, "height");
var oldSize = newSize;
newSize += diff.deltaHeight || 0;
17 years
JBoss Rich Faces SVN: r5203 - in trunk: ui/modal-panel/src/main/java/org/richfaces/renderkit and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-08 15:23:59 -0500 (Tue, 08 Jan 2008)
New Revision: 5203
Modified:
trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
http://jira.jboss.com/jira/browse/RF-1654
Modified: trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js
===================================================================
--- trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-01-08 19:10:56 UTC (rev 5202)
+++ trunk/framework/impl/src/main/resources/org/richfaces/renderkit/html/scripts/utils.js 2008-01-08 20:23:59 UTC (rev 5203)
@@ -4,6 +4,15 @@
Richfaces.getComputedStyle = function(eltId, propertyName) {
var elt = $(eltId);
+
+ // Fix situation when width or height are set in percentage.
+ if ('width' == propertyName) {
+ return (elt.clientWidth || elt.offsetWidth) + "px";
+ }
+ if ('height' == propertyName) {
+ return (elt.clientHeight || elt.offsetHeight) + "px";
+ }
+
if (elt.currentStyle) {
return elt.currentStyle[propertyName];
}
Modified: trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java
===================================================================
--- trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2008-01-08 19:10:56 UTC (rev 5202)
+++ trunk/ui/modal-panel/src/main/java/org/richfaces/renderkit/ModalPanelRendererBase.java 2008-01-08 20:23:59 UTC (rev 5203)
@@ -175,10 +175,10 @@
int minHeight = panel.getMinHeight();
int minWidth = panel.getMinWidth();
if (minWidth > -1) {
- result.append("min-width: " + minWidth + "; ");
+ result.append("min-width: " + minWidth + "px; ");
}
if (minHeight > -1) {
- result.append("min-height: " + minHeight + "; ");
+ result.append("min-height: " + minHeight + "px; ");
}
return result.toString();
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-01-08 19:10:56 UTC (rev 5202)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2008-01-08 20:23:59 UTC (rev 5203)
@@ -869,6 +869,7 @@
correctShadowSizeEx: function(eContentDiv) {
var eShadowDiv = $(this.shadowDiv);
+ var eContentTable = $(this.contentTable);
var eIframe = $(this.iframe);
var dx = 0;
@@ -882,6 +883,10 @@
var h = eContentDiv.parentNode.offsetHeight;
eShadowDiv.style.width = (w-dx)+"px";
eShadowDiv.style.height = (h-dy)+"px";
+
+ eContentTable.style.width = w + "px";
+ eContentTable.style.height = h + "px";
+
if (eIframe) {
eIframe.style.width = w+"px";
eIframe.style.height = h+"px";
17 years
JBoss Rich Faces SVN: r5202 - trunk/framework/test/src/main/java/org/ajax4jsf/tests.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2008-01-08 14:10:56 -0500 (Tue, 08 Jan 2008)
New Revision: 5202
Added:
trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockExternalContext.java
Modified:
trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
Log:
Fixed tests for listShuttle component.
Modified: trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java
===================================================================
--- trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java 2008-01-08 18:55:45 UTC (rev 5201)
+++ trunk/framework/test/src/main/java/org/ajax4jsf/tests/AbstractAjax4JsfTestCase.java 2008-01-08 19:10:56 UTC (rev 5202)
@@ -179,6 +179,9 @@
while (resources.hasMoreElements()) {
parser.parse((URL) resources.nextElement());
}
+
+ externalContext = new MockExternalContext(externalContext);
+ facesContext.setExternalContext(externalContext);
}
protected WebClient createWebClient() {
Added: trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockExternalContext.java
===================================================================
--- trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockExternalContext.java (rev 0)
+++ trunk/framework/test/src/main/java/org/ajax4jsf/tests/MockExternalContext.java 2008-01-08 19:10:56 UTC (rev 5202)
@@ -0,0 +1,156 @@
+/**
+ * License Agreement.
+ *
+ * Rich Faces - Natural Ajax for Java Server Faces (JSF)
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.ajax4jsf.tests;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.TreeMap;
+
+import javax.faces.FacesException;
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.apache.commons.collections.EnumerationUtils;
+import org.apache.shale.test.mock.MockExternalContext12;
+
+/**
+ * @author Siarhej Chalipau
+ *
+ */
+public class MockExternalContext extends MockExternalContext12 {
+ /*
+ * Realizes methods unimplemented by org.apache.shale.test.mock.MockExternalContext operations.
+ *
+ */
+
+ private Map requestParameterValuesMap = null;
+ private Map requestHeaderMap = null;
+ private Map requestHeaderValuesMap = null;
+ private Iterator requestParameterNamesIterator = null;
+ private Set resourcePathsSet = null;
+
+ public MockExternalContext(org.apache.shale.test.mock.MockExternalContext baseContext) {
+ super((ServletContext)baseContext.getContext(),
+ (HttpServletRequest)baseContext.getRequest(), (HttpServletResponse)baseContext.getResponse());
+ }
+
+ public Map getRequestParameterValuesMap() {
+ if (null == requestParameterValuesMap) {
+ requestParameterValuesMap = new HashMap();
+ HttpServletRequest request = (HttpServletRequest)getRequest();
+ for ( Enumeration e = request.getParameterNames(); e.hasMoreElements(); ) {
+ String name = (String) e.nextElement();
+ requestParameterValuesMap.put(name, request.getParameterValues(name));
+ }
+ }
+ return Collections.unmodifiableMap(requestParameterValuesMap);
+ }
+
+ public void dispatch(String requestURI)
+ throws IOException, FacesException {
+ //TODO hans, should be implemented
+ super.dispatch(requestURI);
+ }
+
+ public Map getRequestHeaderMap() {
+ if (null == requestHeaderMap) {
+ requestHeaderMap = new TreeMap(CASE_INSENSITIVE_COMPARATOR);
+
+ HttpServletRequest request = (HttpServletRequest)getRequest();
+ for ( Enumeration e = request.getHeaderNames(); e.hasMoreElements(); ) {
+ String name = (String) e.nextElement();
+ requestHeaderMap.put(name, request.getHeader(name));
+ }
+ }
+ return Collections.unmodifiableMap(requestHeaderMap);
+ }
+
+ public Map getRequestHeaderValuesMap() {
+ if (null == requestHeaderValuesMap) {
+ requestHeaderValuesMap = new TreeMap(CASE_INSENSITIVE_COMPARATOR);
+
+ HttpServletRequest request = (HttpServletRequest)getRequest();
+ for ( Enumeration e = request.getHeaderNames(); e.hasMoreElements(); ) {
+ String name = (String) e.nextElement();
+ requestHeaderValuesMap.put(name, EnumerationUtils.toList(request.getHeaders(name)).toArray());
+ }
+ }
+ return Collections.unmodifiableMap(requestHeaderValuesMap);
+ }
+
+ public Iterator getRequestParameterNames() {
+ if (null == requestParameterNamesIterator) {
+ requestParameterNamesIterator = getRequestParameterValuesMap().keySet().iterator();
+ }
+ return requestParameterNamesIterator;
+ }
+
+ /**
+ * <p>Add the specified request parameter for this request.</p>
+ *
+ * @param key Parameter name
+ * @param value Parameter value
+ */
+ public void addRequestParameterMap(String key, String value) {
+ super.addRequestParameterMap(key, value);
+
+ String [] currentValue = (String[]) getRequestParameterValuesMap().get(key);
+ if (null == currentValue) {
+ requestParameterValuesMap.put(key, new String[] { value });
+ } else {
+ String [] newArray = new String [currentValue.length + 1];
+ System.arraycopy(currentValue, 0, newArray, 0, currentValue.length);
+ newArray[currentValue.length] = value;
+ requestParameterValuesMap.put(key, newArray);
+ }
+ }
+
+ public Set getResourcePaths(String path) {
+ // TODO hans, should be implemented
+ if (null == resourcePathsSet) {
+ resourcePathsSet = new HashSet();
+ }
+ return resourcePathsSet;
+ }
+
+ public void redirect(String requestURI) throws IOException {
+ // TODO hans, should be implemented
+ super.redirect(requestURI);
+ }
+
+ protected final static Comparator CASE_INSENSITIVE_COMPARATOR = new Comparator() {
+ public int compare(Object arg0, Object arg1) {
+ String s0 = ( String ) arg0;
+ String s1 = ( String ) arg1;
+ return s0.toUpperCase().compareTo(s1.toUpperCase());
+ }
+ };
+
+}
17 years
JBoss Rich Faces SVN: r5201 - trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-08 13:55:45 -0500 (Tue, 08 Jan 2008)
New Revision: 5201
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
Log:
rename disabled classes
Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-08 18:55:27 UTC (rev 5200)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/scripts/combobox.js 2008-01-08 18:55:45 UTC (rev 5201)
@@ -168,12 +168,12 @@
doActive : function() {
//this.button.className = ""; //FIXME
- this.field.className = "rich_cb_width rich_cb_font rich_cb_field"; //FIXME
+ this.field.className = "rich-cb-width rich-cb-font rich-cb-field"; //FIXME
},
doDisable : function() {
//this.button.className = ""; //FIXME
- this.field.className = "rich_cb_width rich_cb_font rich-combobox-field-disabled"; //FIXME
+ this.field.className = "rich-cb-width rich-cb-font rich-cb-field-disabled"; //FIXME
}
};
17 years
JBoss Rich Faces SVN: r5200 - trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-08 13:55:27 -0500 (Tue, 08 Jan 2008)
New Revision: 5200
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
Log:
remove font-size: 0px from list-cord class
Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-08 18:51:31 UTC (rev 5199)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-08 18:55:27 UTC (rev 5200)
@@ -44,7 +44,7 @@
}
.rich-cb-list-cord {
- position : relative; font-size : 0px;
+ position : relative;
}
.rich-cb-item {
17 years
JBoss Rich Faces SVN: r5199 - in branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI: layouts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-01-08 13:51:31 -0500 (Tue, 08 Jan 2008)
New Revision: 5199
Modified:
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js
branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js
Log:
RF-726
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2008-01-08 18:43:35 UTC (rev 5198)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/Grid.js 2008-01-08 18:51:31 UTC (rev 5199)
@@ -77,13 +77,13 @@
},
updateLayout: function($super) {
- if(!this.controlCreated || this.getHeight()==0) {
+ if(!this.controlCreated || this.element.offsetHeight==0) {
return;
}
$super();
var header = this.getHeader();
- if(header.getHeight() == 0) {
+ if(header.element.offsetHeight == 0) {
header.updateSize();
this.getBody().updateSize();
if(this.getFooter()) {this.getFooter().updateSize();}
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-01-08 18:43:35 UTC (rev 5198)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridBody.js 2008-01-08 18:51:31 UTC (rev 5199)
@@ -51,8 +51,8 @@
window.loadingInvalidateTime = (new Date()).getTime();
},
_onContentVScroll: function(event) {
- this.helpObject1.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
- this.helpObject2.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
+ this.helpObject1.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight + 5);
+ this.helpObject2.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight + 5);
this.setScrollPos(event.memo.pos);
this.adjustDataPosition(event.memo.pos);
},
@@ -206,7 +206,7 @@
this.scrollBox.setHeight(height);
var scrollLeft = this.grid.getScrollOffset();
- var fixH = this.grid.getFooter() ? this.grid.getFooter().getHeight() : 0;
+ var fixH = this.grid.getFooter() ? this.grid.getFooter().element.offsetHeight : 0;
if(fixH > height) fixH = 0;
var frozenContentWidth = this.grid.getColumnsFrozenWidth();
@@ -229,10 +229,10 @@
this.defaultRowHeight = this._calcDefaultRowHeight();
this.scrollBox.hide();
this.sizeBox.setHeight(this.defaultRowHeight * this.grid.dataModel.getCount() + fixH);
- this.helpObject1.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
- this.helpObject2.moveToY(this.sizeBox.getHeight()+ this.defaultRowHeight + 5);
+ this.helpObject1.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight + 5);
+ this.helpObject2.moveToY(this.sizeBox.element.offsetHeight+ this.defaultRowHeight + 5);
- this.dataVisible = parseInt(this.contentBox.getHeight() / this.defaultRowHeight, 10) + 1;
+ this.dataVisible = parseInt(this.contentBox.element.offsetHeight / this.defaultRowHeight, 10) + 1;
this.dataVisible = Math.min(this.dataVisible, this.rowsCount);
if(height > 0) {
this.adjustDataPosition(this.currentPos);
@@ -709,7 +709,7 @@
ensureVisible: function (index) {
if(index>=0 && index<this.grid.dataModel.getCount()) {
- var visibleRows = parseInt(this.contentBox.getHeight() / this.defaultRowHeight, 10) + 1;
+ var visibleRows = parseInt(this.contentBox.element.offsetHeight / this.defaultRowHeight, 10) + 1;
if(this.grid.dataModel.getCount() > visibleRows) {
var y = index*this.defaultRowHeight;
this.scrollBox.getElement().scrollTop = y;
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2008-01-08 18:43:35 UTC (rev 5198)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridFooter.js 2008-01-08 18:51:31 UTC (rev 5199)
@@ -129,7 +129,7 @@
}
$super();
- var height = this.getHeight();
+ var height = this.element.offsetHeight;
var totalWidth = this.grid.getColumnsTotalWidth();
var frozenContentWidth = this.grid.getColumnsFrozenWidth();
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-01-08 18:43:35 UTC (rev 5198)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/controls/grid/GridHeader.js 2008-01-08 18:51:31 UTC (rev 5199)
@@ -222,7 +222,7 @@
this.frozenSubstrate = new ClientUI.common.box.Box(this.gridId + ":hs", this.getElement());
this.frozenSubstrate.getElement().name = this.getElement().id + "HRFrm";
- this.frozenSubstrate.setHeight(this.headerRow.getHeight());
+ this.frozenSubstrate.setHeight(this.headerRow.element.offsetHeight);
return true;
},
@@ -293,7 +293,7 @@
return;
}
$super();
- var height = this.getHeight();
+ var height = this.element.offsetHeight;
var totalWidth = this.grid.getColumnsTotalWidth();
var frozenContentWidth = this.grid.getColumnsFrozenWidth();
@@ -372,7 +372,7 @@
}
this.dragColumnInfo.originalX = pos;
this.columnSplitter.show();
- this.columnSplitter.setHeight(this.defaultHeight + this.grid.getBody().contentBox.getHeight());
+ this.columnSplitter.setHeight(this.defaultHeight + this.grid.getBody().contentBox.element.offsetHeight);
this.columnSplitter.moveTo(pos, 0);
},
_hideSplitter: function() {
@@ -437,7 +437,7 @@
if (icon) {
var newPosX = div.clientWidth - icon.getWidth();
- var newPosY = (div.clientHeight - icon.getHeight())/2;
+ var newPosY = (div.clientHeight - icon.offsetHeight)/2;
newPosX = Math.floor(newPosX);
newPosY = Math.floor(newPosY);
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2008-01-08 18:43:35 UTC (rev 5198)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/GridLayoutManager.js 2008-01-08 18:51:31 UTC (rev 5199)
@@ -30,7 +30,7 @@
var parentBox = this.getContainer();
if(parentBox==null) parentBox = this;
- var height = parentBox.getHeight();
+ var height = parentBox.element.offsetHeight;
var width = parentBox.getViewportWidth();
// NOTE: not implemented in this class
@@ -41,7 +41,7 @@
// first get size of header
if(this.panels[GridLayout_Enum.HEADER]) {
- headerHeight = this.panels[GridLayout_Enum.HEADER].getHeight();
+ headerHeight = this.panels[GridLayout_Enum.HEADER].element.offsetHeight;
this.panels[GridLayout_Enum.HEADER].moveTo(0, 0);
this.panels[GridLayout_Enum.HEADER].setWidth(width);
this.panels[GridLayout_Enum.HEADER].updateLayout();
@@ -58,7 +58,7 @@
}
if(this.panels[GridLayout_Enum.FOOTER]) {
- footerHeight = this.panels[GridLayout_Enum.FOOTER].getHeight();
+ footerHeight = this.panels[GridLayout_Enum.FOOTER].element.offsetHeight;
this.panels[GridLayout_Enum.FOOTER].moveTo(0, bodyBottom - footerHeight);
this.panels[GridLayout_Enum.FOOTER].setWidth(width);
this.panels[GridLayout_Enum.FOOTER].updateLayout();
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js 2008-01-08 18:43:35 UTC (rev 5198)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/LayoutManager.js 2008-01-08 18:51:31 UTC (rev 5199)
@@ -37,7 +37,7 @@
updateLayout: function($super) {
if(this.container) {
var w = this.container.getWidth();
- var h = this.container.getHeight();
+ var h = this.container.element.offsetHeight;
if(ClientUILib.isGecko) {
w -= this.container.getBorderWidth("lr") + this.container.getPadding("lr");
h -= this.container.getBorderWidth("tb") + this.container.getPadding("tb");
Modified: branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js
===================================================================
--- branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2008-01-08 18:43:35 UTC (rev 5198)
+++ branches/3.1.x/ui/scrollableDataTable/src/main/javascript/ClientUI/layouts/VLayoutManager.js 2008-01-08 18:51:31 UTC (rev 5199)
@@ -50,7 +50,7 @@
var parentBox = this.getContainer();
if(!parentBox) parentBox = this;
- var height = parentBox.getHeight();
+ var height = parentBox.element.offsetHeight;
var width = parentBox.getViewportWidth();
if(ClientUILib.isGecko) {
width -= parentBox.getBorderWidth("lr") + parentBox.getPadding("lr");
@@ -64,13 +64,13 @@
// first get size of header
if(this.panels[GridLayout_Enum.HEADER]) {
- headerHeight = this.panels[GridLayout_Enum.HEADER].getHeight();
+ headerHeight = this.panels[GridLayout_Enum.HEADER].element.offsetHeight;
this.panels[GridLayout_Enum.HEADER].moveTo(0, 0);
this.panels[GridLayout_Enum.HEADER].setWidth(width);
this.panels[GridLayout_Enum.HEADER].updateLayout();
}
if(this.panels[GridLayout_Enum.FOOTER]) {
- footerHeight = this.panels[GridLayout_Enum.FOOTER].getHeight();
+ footerHeight = this.panels[GridLayout_Enum.FOOTER].element.offsetHeight;
this.panels[GridLayout_Enum.FOOTER].moveTo(0, height - footerHeight);
this.panels[GridLayout_Enum.FOOTER].setWidth(width);
this.panels[GridLayout_Enum.FOOTER].updateLayout();
17 years
JBoss Rich Faces SVN: r5198 - trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-08 13:43:35 -0500 (Tue, 08 Jan 2008)
New Revision: 5198
Added:
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxButtonPressGradient.java
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxDisableButtonGradient.java
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxDisableInputGradient.java
Log:
Added: trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxButtonPressGradient.java
===================================================================
--- trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxButtonPressGradient.java (rev 0)
+++ trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxButtonPressGradient.java 2008-01-08 18:43:35 UTC (rev 5198)
@@ -0,0 +1,18 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class ComboBoxButtonPressGradient extends BaseGradient{
+
+ public ComboBoxButtonPressGradient() {
+ super(30,50 , 20, "tabBackgroundColor","generalBackgroundColor");
+ }
+
+}
Added: trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxDisableButtonGradient.java
===================================================================
--- trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxDisableButtonGradient.java (rev 0)
+++ trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxDisableButtonGradient.java 2008-01-08 18:43:35 UTC (rev 5198)
@@ -0,0 +1,17 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class ComboBoxDisableButtonGradient extends BaseGradient{
+
+ public ComboBoxDisableButtonGradient() {
+ super(30, 50, 12, "tableBorderColor", "controlBackgroundColor");
+ }
+}
Added: trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxDisableInputGradient.java
===================================================================
--- trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxDisableInputGradient.java (rev 0)
+++ trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxDisableInputGradient.java 2008-01-08 18:43:35 UTC (rev 5198)
@@ -0,0 +1,15 @@
+/**
+ *
+ */
+package org.richfaces.renderkit.images;
+
+import org.richfaces.renderkit.html.BaseGradient;
+
+
+/**
+ * @author Anton Belevich
+ *
+ */
+public class ComboBoxDisableInputGradient extends BaseGradient {
+
+}
17 years
JBoss Rich Faces SVN: r5197 - trunk/sandbox/ui/combobox/src/main/config/resources.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-08 13:43:03 -0500 (Tue, 08 Jan 2008)
New Revision: 5197
Modified:
trunk/sandbox/ui/combobox/src/main/config/resources/resource-config.xml
Log:
add gradient images
Modified: trunk/sandbox/ui/combobox/src/main/config/resources/resource-config.xml
===================================================================
--- trunk/sandbox/ui/combobox/src/main/config/resources/resource-config.xml 2008-01-08 18:42:36 UTC (rev 5196)
+++ trunk/sandbox/ui/combobox/src/main/config/resources/resource-config.xml 2008-01-08 18:43:03 UTC (rev 5197)
@@ -9,4 +9,12 @@
<resource class="org.richfaces.renderkit.images.ComboBoxArrowImage">
<name>org.richfaces.renderkit.images.ComboBoxArrowImage</name>
</resource>
+ <resource class="org.richfaces.renderkit.images.ComboBoxButtonPressGradient">
+ <name>org.richfaces.renderkit.images.ComboBoxButtonPressGradient</name>
+ </resource>
+ <resource class="org.richfaces.renderkit.images.ComboBoxDisableButtonGradient">
+ <name>org.richfaces.renderkit.images.ComboBoxDisableButtonGradient</name>
+ </resource>
+
+
</resource-config>
17 years
JBoss Rich Faces SVN: r5196 - trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-08 13:42:36 -0500 (Tue, 08 Jan 2008)
New Revision: 5196
Modified:
trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxArrowImage.java
Log:
use generalTextColor
Modified: trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxArrowImage.java
===================================================================
--- trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxArrowImage.java 2008-01-08 18:42:07 UTC (rev 5195)
+++ trunk/sandbox/ui/combobox/src/main/java/org/richfaces/renderkit/images/ComboBoxArrowImage.java 2008-01-08 18:42:36 UTC (rev 5196)
@@ -47,7 +47,7 @@
protected Object getDataToStore(FacesContext context, Object data) {
Skin skin = SkinFactory.getInstance().getSkin(context);
- String skinParameter = "headerTextColor";
+ String skinParameter = "generalTextColor";
String headerTextColor = (String) skin.getParameter(context, skinParameter);
if (null == headerTextColor || "".equals(headerTextColor)) {
Skin defaultSkin = SkinFactory.getInstance().getDefaultSkin(context);
17 years
JBoss Rich Faces SVN: r5195 - trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-01-08 13:42:07 -0500 (Tue, 08 Jan 2008)
New Revision: 5195
Modified:
trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
Log:
rename classes, add gradients background
Modified: trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss
===================================================================
--- trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-08 18:41:13 UTC (rev 5194)
+++ trunk/sandbox/ui/combobox/src/main/resources/org/richfaces/renderkit/html/css/combobox.xcss 2008-01-08 18:42:07 UTC (rev 5195)
@@ -6,11 +6,15 @@
<f:verbatim>
<![CDATA[
-.rich-combobox-button-disabled {
+
+.rich-cb-item-normal {
}
-.rich-combobox-field-disabled {
+.rich-cb-font {
+}
+
+.rich-cb-field-disabled {
position : absolute;
top : 0px; left : 0;
padding-right :20px;
@@ -21,107 +25,158 @@
background-repeat:repeat-x;
}
-.rich-combobox-list {
+.rich-cb-list {
z-index: 1000;
overflow: auto;
white-space:nowrap;
}
-.cb_list_position{ position : absolute;}
-.cb_list_decoration{ border : 1px solid #c0c0c0 /*panelBorderColor*/; padding : 0px; background : #FFFFFF; /*tableBackgroundColor*/}
-.cb_list_scroll{ overflow : auto;}
-.cb_list_cord{ position : relative; font-size : 0px; /*display:none;*/ top: 2px;}/*DDL is hidden!!!!!*/
+.rich-cb-list-position {
+ position : absolute;
+}
-.rich-combobox-item {
- padding : 2px; white-space : nowrap;
- font-size : 11px/*generalSizeFont*/; font-family : arial/*generalFamilyFont*/; color : #000000/*generalTextColor*/
+.rich-cb-list-decoration {
+ border : 1px solid; padding : 0px;
}
-.rich-combobox-item-normal {
+.rich-cb-list-scroll {
+ overflow : auto;
}
-.rich-combobox-item-selected {
+.rich-cb-list-cord {
+ position : relative; font-size : 0px;
+}
+
+.rich-cb-item {
+ padding : 2px; white-space : nowrap;
+}
+
+
+.rich-cb-item-selected {
padding : 1px;
- background : #C7D7EC;
- border : 1px dotted #000000;/*generalTextColor*/
+ background-color : #DFE8F6;
+ border : 1px dotted;
cursor:pointer;
+
}
-
-.rich_cb_width {
+.rich-cb-width {
width : 150px;
}
-.rich_cb_font {
- font-size : 11px/*generalSizeFont*/; font-family : arial/*generalFamilyFont*/; color : #000000/*generalTextColor*/
-}
-
-.rich_cb_strut {
+.rich-cb-strut {
position : relative;
visibility : hidden;
margin : 0px; padding : 2px;
}
-.rich_cb_shell {
+.rich-cb-shell {
position : relative;
}
-.rich_cb_field {
+.rich-cb-field {
position : absolute;
- top : 0px; left : 0;
+ top : 0px; left : 0px;
padding-right :20px;
padding-left :3px;
margin : 0px;
border : 1px solid #c0c0c0;
background-position:left top;
background-repeat:repeat-x;
- border-color: #BED6F8 rgb(255, 255, 255) #BED6F8 rgb(190, 214, 248);
-} /*panelBorderColor*/
+}
-.rich_cb_button {
+.rich-cb-button {
position : absolute;
top : 0px;
- right : 0;
+ right : 0px;
width : 17px;
margin : 0px;
- border : 1px solid #c0c0c0;
- border-color: #BED6F8 rgb(190, 214, 248) #BED6F8 rgb(190, 214, 248);
-} /*panelBorderColor*/
+ border : 1px solid #C0C0C0;
+}
-.rich_cb_button_bg {
- background : top repeat-x #C7D7EC;
+.rich-cb-button-bg-disabled {
+ background : top repeat-x;
}
-.rich_cb_button_bg_press {
- background : url(images/bg_press.png) repeat-x bottom #C7D7EC
-} /*gradient - from tabBackgroundColor to generalBackgroundColor, background-color - tabBackgroundColor*/
+.rich-cb-button-bg {
+ background : top repeat-x;
+}
-.rich_cb_button_arrow {
+.rich-cb-button-bg-press {
+ background : top repeat-x;
+}
+
+.rich-cb-button-arrow {
background : center no-repeat; cursor : pointer;
}
-
]]>
</f:verbatim>
- /*gradient - from generalBackgroundColor to tabBackgroundColor, background-color - tabBackgroundColor*/
- <u:selector name=".rich_cb_button_bg">
+
+ <u:selector name=".rich-cb-button-bg">
<u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.images.ComboBoxButtonGradient" />
</u:style>
+ <u:style name="background-color" skin="tabBackgroundColor"/>
</u:selector>
- <u:selector name=".rich_cb_field">
+ <u:selector name=".rich-cb-button-bg-disabled">
<u:style name="background-image">
- <f:resource f:key="org.richfaces.renderkit.images.ComboBoxInputGradient" />
+ <f:resource f:key="org.richfaces.renderkit.images.ComboBoxDisableButtonGradient" />
</u:style>
+ <u:style name="background-color" skin="tabBackgroundColor"/>
</u:selector>
- <u:selector name=".rich_cb_button_arrow">
+ <u:selector name=".rich-cb-button-bg-press">
<u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.images.ComboBoxButtonPressGradient" />
+ </u:style>
+ <u:style name="background-color" skin="tabBackgroundColor"/>
+ </u:selector>
+
+ <u:selector name=".rich-cb-button-arrow">
+ <u:style name="background-image">
<f:resource f:key="org.richfaces.renderkit.images.ComboBoxArrowImage" />
</u:style>
</u:selector>
-
-</f:template>
\ No newline at end of file
+ <u:selector name=".rich-cb-button">
+ <u:style name="border-color" skin="panelBorderColor"/>
+ </u:selector>
+
+ <u:selector name=".rich-cb-font">
+ <u:style name="font-size" skin="generalSizeFont"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
+ <u:style name="color" skin="generalTextColor"/>
+ </u:selector>
+
+ <u:selector name=".rich-cb-field">
+ <u:style name="background-image">
+ <f:resource f:key="org.richfaces.renderkit.images.ComboBoxInputGradient" />
+ </u:style>
+ <u:style name="border-color" skin="panelBorderColor"/>
+ </u:selector>
+
+ <u:selector name=".rich-cb-item">
+ <u:style name="font-size" skin="generalSizeFont"/>
+ <u:style name="font-family" skin="generalFamilyFont"/>
+ <u:style name="color" skin="generalTextColor"/>
+ </u:selector>
+
+ <u:selector name=".rich-cb-item-selected">
+ <u:style name="border-color" skin="generalTextColor"/>
+ </u:selector>
+
+ <u:selector name=".rich-cb-list-decoration">
+ <u:style name="border-color" skin="panelBorderColor"/>
+ <u:style name="background" skin="tableBackgroundColor"/>
+ </u:selector>
+
+ <u:selector name=".rich-cb-item-selected">
+ <u:style name="border-color" skin="generalTextColor"/>
+ </u:selector>
+
+
+
+</f:template>
17 years