JBoss Rich Faces SVN: r735 - trunk/sandbox/scrollable-grid/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-11 11:32:03 -0400 (Fri, 11 May 2007)
New Revision: 735
Modified:
trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
Log:
Modified: trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml
===================================================================
--- trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-05-11 14:28:49 UTC (rev 734)
+++ trunk/sandbox/scrollable-grid/src/main/config/component/scrollable-grid.xml 2007-05-11 15:32:03 UTC (rev 735)
@@ -23,6 +23,13 @@
org.ajax4jsf.framework.taglib.HtmlComponentTagBase
</superclass>
</tag>
+ <property>
+ <name>frozenColCount</name>
+ <classname>int</classname>
+ <description></description>
+ <defaultvalue>0</defaultvalue>
+ </property>
+
&ui_component_attributes;
</component>
<component>
@@ -42,15 +49,7 @@
<![CDATA[ Scrollable Grid custom column impl]]>
</description>
</tag>
- <property>
- <name>frozen</name>
- <classname>boolean</classname>
- <description></description>
- <defaultvalue>false</defaultvalue>
- </property>
-
-
&ui_component_attributes;
&html_style_attributes;
</component>
18 years, 7 months
JBoss Rich Faces SVN: r734 - trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-11 10:28:49 -0400 (Fri, 11 May 2007)
New Revision: 734
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
Fix disappearance of suggestion box in Safari when an user clicks on scroll bar.
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-05-11 12:01:44 UTC (rev 733)
+++ trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-05-11 14:28:49 UTC (rev 734)
@@ -81,6 +81,8 @@
Event.observe(this.element, "keyup", this.onKeyUpListener);
this.upDown = 0;
}
+
+ this.onScrollListener = this.onScroll.bindAsEventListener(this);
},
onBoxKeyPress: function(event) {
@@ -130,12 +132,25 @@
},
show: function() {
+ if ("SAFARI" == RichFaces.navigatorType()) {
+ this.wasScroll = false;
+ if (!this.overflow)
+ this.overflow = document.getElementsByClassName("dr-sb-overflow", this.update)[0];
+ Event.observe(this.overflow, "scroll", this.onScrollListener);
+ }
if (Element.getStyle(this.update, 'display')
== 'none') this.options.onShow(this.element, this.update, this.options);
this.disableSubmit();
},
hide: function() {
+ if ("SAFARI" == RichFaces.navigatorType()) {
+ if (this.wasScroll) {
+ this.wasScroll = false;
+ return;
+ }
+ Event.stopObserving(this.overflow, "scroll", this.onScrollListener)
+ }
this.stopIndicator();
if (Element.getStyle(this.update, 'display')
!= 'none') this.options.onHide(this.element, this.update, this.options);
@@ -178,6 +193,7 @@
this.initialized = true;
}
if (this.active) {
+ this.wasScroll = false;
switch (event.keyCode) {
case Event.KEY_TAB:
case Event.KEY_RETURN:
@@ -271,6 +287,7 @@
},
onClick: function(event) {
+ this.wasScroll = false;
var element = Event.findElement(event, 'TR');
this.index = element.autocompleteIndex;
this.selectEntry(event);
@@ -299,6 +316,15 @@
this.active = false;
},
+ onScroll: function(event) {
+ if ("SAFARI" == RichFaces.navigatorType()) {
+ if(this.element) {
+ this.element.focus();
+ this.wasScroll = true;
+ }
+ }
+ },
+
render: function() {
if (this.entryCount > 0) {
LOG.debug('render for index ' + this.index + " and old index "
18 years, 7 months
JBoss Rich Faces SVN: r733 - trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: A.Skokov
Date: 2007-05-11 08:01:44 -0400 (Fri, 11 May 2007)
New Revision: 733
Modified:
trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
http://jira.jboss.com/jira/browse/RF-154 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-05-11 12:01:21 UTC (rev 732)
+++ trunk/richfaces/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2007-05-11 12:01:44 UTC (rev 733)
@@ -14,6 +14,7 @@
this.prevIndex = -1;
this.entryCount = 0;
this.keyEvent = false;
+ this.oldValue = this.element.value;
var needIframe = (RichFaces.navigatorType() == "MSIE");
@@ -225,6 +226,7 @@
this.changed = true;
this.hasFocus = true;
+ this.oldValue = this.element.value;
if (this.observerHandle) {
LOG.debug("clear existing observer");
@@ -509,10 +511,8 @@
this.containerId = containerId;
this.actionUrl = actionUrl;
- this.input = $(element);
- this.oldValue = $(element).value;
if (onsubmit && onsubmit != 'null'){
- this.onsubmitFunction = new Function(onsubmit).bind(this.input);
+ this.onsubmitFunction = new Function(onsubmit).bind(this.element);
}
return this;
@@ -524,10 +524,9 @@
if (this.onsubmitFunction && ! this.onsubmitFunction()) {
return;
}
- if (this.oldValue != this.input.value && this.input.value.length > 0) {
+ if (this.oldValue != this.element.value && this.element.value.length > 0) {
A4J.AJAX.Submit(this.containerId, this.actionUrl, event, this.options);
}
- this.oldValue = this.input.value;
return;
},
18 years, 7 months
JBoss Rich Faces SVN: r732 - in trunk/richfaces-samples/suggestionbox-sample/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: A.Skokov
Date: 2007-05-11 08:01:21 -0400 (Fri, 11 May 2007)
New Revision: 732
Modified:
trunk/richfaces-samples/suggestionbox-sample/src/main/java/org/richfaces/SuggestionBox.java
trunk/richfaces-samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
Log:
http://jira.jboss.com/jira/browse/RF-154 fixed
Modified: trunk/richfaces-samples/suggestionbox-sample/src/main/java/org/richfaces/SuggestionBox.java
===================================================================
--- trunk/richfaces-samples/suggestionbox-sample/src/main/java/org/richfaces/SuggestionBox.java 2007-05-11 11:02:49 UTC (rev 731)
+++ trunk/richfaces-samples/suggestionbox-sample/src/main/java/org/richfaces/SuggestionBox.java 2007-05-11 12:01:21 UTC (rev 732)
@@ -58,7 +58,7 @@
this.first = "0";
this.cellspacing = "2";
this.cellpadding = "2";
- this.minchars = "1";
+ this.minchars = "2";
this.frequency = "0";
this.rules = "none";
@@ -251,7 +251,7 @@
}
public String getOnsubmitFunction() {
- if ("none".equalsIgnoreCase(onsubmit)) return null;
+ if ("false".equalsIgnoreCase(onsubmit)) return null;
return "alert(this.value); return " + onsubmit + ";";
}
Modified: trunk/richfaces-samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2007-05-11 11:02:49 UTC (rev 731)
+++ trunk/richfaces-samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2007-05-11 12:01:21 UTC (rev 732)
@@ -47,8 +47,7 @@
width="#{suggestionBox.width}"
height="#{suggestionBox.height}"
shadowDepth="#{suggestionBox.shadowDepth}"
- cellpadding="#{suggestionBox.cellpadding}"
- onsubmit="#{suggestionBox.onsubmitFunction}">
+ cellpadding="#{suggestionBox.cellpadding}">
<a4j:ajaxListener type="org.richfaces.AjaxListener"/>
<h:column>
18 years, 7 months
JBoss Rich Faces SVN: r731 - in trunk/richfaces: toolBar/src/main/config/component and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vkukharchuk
Date: 2007-05-11 07:02:49 -0400 (Fri, 11 May 2007)
New Revision: 731
Modified:
trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
trunk/richfaces/toolBar/src/main/config/component/toolBar.xml
Log:
Modified: trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml
===================================================================
--- trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml 2007-05-11 09:42:50 UTC (rev 730)
+++ trunk/richfaces/suggestionbox/src/main/config/component/suggestionbox.xml 2007-05-11 11:02:49 UTC (rev 731)
@@ -71,7 +71,7 @@
java.lang.Object.class
</methodargs>
<description>
- <![CDATA[Method calls an expression to get a collection of suggestion data on request. It must have one parameter with a type of Object vith content of input component and must return any type allowed for <h:datatable> ]]>
+ <![CDATA[Method calls an expression to get a collection of suggestion data on request. It must have one parameter with a type of Object with content of input component and must return any type allowed for <h:datatable> ]]>
</description>
</property>
<property>
@@ -95,7 +95,7 @@
directly from stored components tree, bypasses page
processing. Can be used for increase performance. Also,
must be set to 'true' inside iteration components, such
- as dataTable
+ as dataTable.
</description>
</property>
<property>
@@ -135,14 +135,14 @@
<classname>java.lang.String</classname>
<description>
Name of the CSS class for a selected suggestion entry
- element (table row)
+ element (table row).
</description>
</property>
<property>
<name>selectValueClass</name>
<classname>java.lang.String</classname>
<description>
- Name of the CSS class for a hidden suggestion entry
+ Name of the CSS class for a selected suggestion entry
element (table cell)
</description>
<defaultvalue>"richfaces_suggestionSelectValue"</defaultvalue>
@@ -283,8 +283,7 @@
<name>shadowOpacity</name>
<classname>java.lang.String</classname>
<description>
- HTML CSS class attribute of element for pop-up
- suggestion content
+ Attribute defines shadow opacity for suggestion content.
</description>
</property>
<property>
Modified: trunk/richfaces/toolBar/src/main/config/component/toolBar.xml
===================================================================
--- trunk/richfaces/toolBar/src/main/config/component/toolBar.xml 2007-05-11 09:42:50 UTC (rev 730)
+++ trunk/richfaces/toolBar/src/main/config/component/toolBar.xml 2007-05-11 11:02:49 UTC (rev 731)
@@ -69,8 +69,7 @@
<name>separatorClass</name>
<classname>java.lang.String</classname>
<description>
- <![CDATA[A CSS class to be applied to menu bar group separators.
- Use this property, for example, to setup parameters of a font.]]>
+ <![CDATA[A CSS class to be applied to tool bar separators.]]>
</description>
</property>
<property>
@@ -137,14 +136,14 @@
<name>separatorClass</name>
<classname>java.lang.String</classname>
<description>
- <![CDATA["A CSS class to be applied to menu bar group separators."]]>
+ <![CDATA["A CSS class to be applied to tool bar group separators."]]>
</description>
</property>
<property>
<name>location</name>
<classname>java.lang.String</classname>
<description>
- <![CDATA["A location of a group on a menu bar. Possible values are "left" and "right"."]]>
+ <![CDATA["A location of a group on a tool bar. Possible values are "left" and "right"."]]>
</description>
<defaultvalue>
<![CDATA["left"]]>
18 years, 7 months
JBoss Rich Faces SVN: r730 - trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-11 05:42:50 -0400 (Fri, 11 May 2007)
New Revision: 730
Modified:
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
Temporary roll back changes with disabling focus on main page.
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-11 09:09:03 UTC (rev 729)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-05-11 09:42:50 UTC (rev 730)
@@ -252,7 +252,7 @@
},
show: function(opts) {
- this.disableDocumentFocusElements();
+ //this.disableDocumentFocusElements();
this.onSelectStartHandler = document.onselectstart;
@@ -418,7 +418,7 @@
},
hide: function() {
- this.enableDocumentFocusElements();
+ //this.enableDocumentFocusElements();
document.onselectstart = this.onSelectStartHandler;
@@ -566,111 +566,6 @@
}
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();
}
}
18 years, 7 months
JBoss Rich Faces SVN: r729 - trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-11 05:09:03 -0400 (Fri, 11 May 2007)
New Revision: 729
Modified:
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js
Log:
Add shadow decoration to modal panel. Fix resizing of shadow.
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-11 00:45:00 UTC (rev 728)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-05-11 09:09:03 UTC (rev 729)
@@ -538,6 +538,7 @@
Element.setStyle(this.cdiv, cssHash);
Element.setStyle(this.contentDiv, cssHashWH);
+ Element.setStyle(this.shadowDiv, cssHashWH);
if (this.iframe) {
Element.setStyle(this.iframe, cssHashWH);
}
18 years, 7 months
JBoss Rich Faces SVN: r728 - trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2007-05-10 20:45:00 -0400 (Thu, 10 May 2007)
New Revision: 728
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:
http://jira.jboss.com/jira/browse/RF-153 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-05-10 18:25:35 UTC (rev 727)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-05-11 00:45:00 UTC (rev 728)
@@ -449,8 +449,6 @@
var cssHash = {};
var cssHashWH = {};
- var winSize = Richfaces.getWindowSize();
-
var vetoeChange = false;
var newSize;
// Avoid currentStyle bug in opera
@@ -465,7 +463,6 @@
if (newSize >= this.minWidth) {
if (diff.deltaWidth) {
cssHashWH.width = newSize + 'px';
- maxX = winSize.width - newSize -1;
}
} else {
if (diff.deltaWidth) {
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-05-10 18:25:35 UTC (rev 727)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2007-05-11 00:45:00 UTC (rev 728)
@@ -28,10 +28,6 @@
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);
@@ -49,41 +45,27 @@
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 winSize = Richfaces.getWindowSize();
+ //window.status = "" + evtX + " " + evtY;
+
+ if (evtX < 0) {
+ evtX = 0;
+ } else if (evtX >= winSize.width) {
+ evtX = winSize.width - 1;
+ }
+
+ if (evtY < 0) {
+ evtY = 0;
+ } else if (evtY >= winSize.height) {
+ evtY = 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) {
18 years, 7 months
JBoss Rich Faces SVN: r727 - in trunk/richfaces/modal-panel/src/main: java/org/richfaces/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: sergeyhalipov
Date: 2007-05-10 14:25:35 -0400 (Thu, 10 May 2007)
New Revision: 727
Modified:
trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
trunk/richfaces/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss
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:
Add shadow decoration to modal panel.
Modified: trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml
===================================================================
--- trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-05-10 18:23:11 UTC (rev 726)
+++ trunk/richfaces/modal-panel/src/main/config/component/modalPanel.xml 2007-05-10 18:25:35 UTC (rev 727)
@@ -132,6 +132,23 @@
</description>
<defaultvalue>100</defaultvalue>
</property>
-
+
+ <property>
+ <name>shadowOpacity</name>
+ <classname>java.lang.String</classname>
+ <description>
+ HTML CSS class attribute of element for pop-up
+ suggestion content
+ </description>
+ </property>
+
+ <property>
+ <name>shadowDepth</name>
+ <classname>java.lang.String</classname>
+ <description>
+ Pop-up shadow depth for suggestion content
+ </description>
+ </property>
+
</component>
</components>
Modified: trunk/richfaces/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java
===================================================================
--- trunk/richfaces/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2007-05-10 18:23:11 UTC (rev 726)
+++ trunk/richfaces/modal-panel/src/main/java/org/richfaces/component/UIModalPanel.java 2007-05-10 18:25:35 UTC (rev 727)
@@ -22,7 +22,11 @@
package org.richfaces.component;
import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+import org.ajax4jsf.framework.skin.Skin;
+import org.ajax4jsf.framework.skin.SkinFactory;
+
/**
* JSF component class
*
@@ -32,6 +36,11 @@
public static final String COMPONENT_TYPE = "org.richfaces.ModalPanel";
private static final String COMPONENT_FAMILY = "org.richfaces.ModalPanel";
+
+ /**
+ * Shadow depth.
+ */
+ private static final int SHADOW_DEPTH = 4;
public abstract int getWidth();
public abstract int getHeight();
@@ -63,4 +72,37 @@
public boolean getRendersChildren() {
return true;
}
+
+ public String getShadowStyle() {
+ String shadow = (String) getAttributes().get("shadowDepth");
+ if (shadow == null) {
+ shadow = Integer.toString(SHADOW_DEPTH);
+ }
+
+ String shadowStyle = "top: " + shadow + "; left: " + shadow + ";";
+
+ FacesContext context = FacesContext.getCurrentInstance();
+ if (null == context)
+ return shadowStyle;
+
+ String opacity = (String) getAttributes().get("shadowOpacity");
+ String filterOpacity;
+
+ if (null == opacity) {
+ Skin skin = SkinFactory.getInstance().getSkin(context);
+ opacity = (String) skin.getParameter(context, "shadowOpacity");
+ }
+ try {
+ Double op = Double.valueOf(opacity);
+ filterOpacity = Integer.toString(op.intValue() * 10);
+ opacity = Double.toString(op.doubleValue() / 10);
+ } catch (Exception e) {
+ // illegal opacity
+ return ";";
+ }
+ shadowStyle += " opacity:" + opacity
+ + "; filter:alpha(opacity=" + filterOpacity + ");";
+
+ return shadowStyle;
+ }
}
Modified: trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss
===================================================================
--- trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss 2007-05-10 18:23:11 UTC (rev 726)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/css/modalPanel.xcss 2007-05-10 18:25:35 UTC (rev 727)
@@ -70,6 +70,15 @@
.dr-mpnl-pnl-b{
padding : 10px;
}
+
+.dr-mpnl-shadow {
+ position: absolute;
+ height: 100%;
+ width: 100%;
+ border : 1px solid;
+ z-index: 1;
+}
+
]]>
</f:verbatim>
<u:selector name=".dr-mpnl-pnl">
@@ -99,5 +108,11 @@
<u:style name="font-family" skin="generalFamilyFont" />
</u:selector>
+<u:selector name=".dr-mpnl-shadow">
+ <u:style name="background-color" skin="shadowBackgroundColor" />
+ <u:style name="border-color" skin="shadowBackgroundColor" />
+ <u:style name="opacity" skin="shadowOpacity" />
+</u:selector>
+
</f:template>
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-10 18:23:11 UTC (rev 726)
+++ trunk/richfaces/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanel.js 2007-05-10 18:25:35 UTC (rev 727)
@@ -107,6 +107,7 @@
this.cursorDiv = $(id + "CursorDiv");
this.cdiv = $(id + "CDiv");
this.contentDiv = $(id + "ContentDiv");
+ this.shadowDiv = $(id + "ShadowDiv");
this.context = new ModalPanel.Context(this);
@@ -294,6 +295,7 @@
this.iframe.style.width = options.width + 'px';
}
this.contentDiv.style.width = options.width + 'px';
+ this.shadowDiv.style.width = options.width + 'px';
}
if (options.height) {
@@ -305,6 +307,7 @@
this.iframe.style.height = options.height + 'px';
}
this.contentDiv.style.height = options.height + 'px';
+ this.shadowDiv.style.height = options.height + 'px';
}
if (options.left) {
Modified: trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx
===================================================================
--- trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-05-10 18:23:11 UTC (rev 726)
+++ trunk/richfaces/modal-panel/src/main/templates/org/richfaces/htmlModalPanel.jspx 2007-05-10 18:25:35 UTC (rev 727)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
+<f:template
+ xmlns:f="http:/jsf.exadel.com/template"
xmlns:c=" http://java.sun.com/jsf/core"
xmlns:ui=" http://ajax4jsf.org/cdk/ui"
xmlns:u=" http://ajax4jsf.org/cdk/u"
@@ -65,6 +65,10 @@
}
]]>
</jsp:scriptlet>
+
+ <div id="#{clientId}ShadowDiv" class="dr-mpnl-shadow rich-mpnl-shadow"
+ style="#{component.shadowStyle}" >
+ </div>
<div style="position: absolute; overflow: hidden; z-index: 2;"
class="dr-mpnl-pnl" id="#{clientId}ContentDiv">
@@ -127,4 +131,4 @@
</div>
</div>
-</f:root>
\ No newline at end of file
+</f:template>
\ No newline at end of file
18 years, 7 months
JBoss Rich Faces SVN: r726 - trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2007-05-10 14:23:11 -0400 (Thu, 10 May 2007)
New Revision: 726
Modified:
trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
Log:
Modified: trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml
===================================================================
--- trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-05-10 18:22:40 UTC (rev 725)
+++ trunk/sandbox-samples/scrollable-grid-demo/src/main/webapp/pages/scrollable-grid.xhtml 2007-05-10 18:23:11 UTC (rev 726)
@@ -33,81 +33,81 @@
</head>
<body>
-
- <sg:scrollable-grid value="#{selectionBean.dataModel}" var="issues" first="0" rows="100">
-
- <sg:column style="width: 100px" frozen="true">
- <f:facet name="header">
- <h:outputText value="Key"></h:outputText>
- </f:facet>
- <h:outputText value="#{issues.key.value}"></h:outputText>
- <f:facet name="footer">
- <h:outputText value="footer1"></h:outputText>
- </f:facet>
- </sg:column>
- <sg:column style="width: 100px">
- <f:facet name="header">
- <h:outputText value="Summary"></h:outputText>
- </f:facet>
- <h:outputText value="#{issues.summary}"></h:outputText>
- <f:facet name="footer">
- <h:outputText value="footer2"></h:outputText>
- </f:facet>
- </sg:column>
- <sg:column style="width: 100px">
- <f:facet name="header">
- <h:outputText value="Assignee"></h:outputText>
- </f:facet>
- <h:outputText value="#{issues.assignee.name}"></h:outputText>
- <f:facet name="footer">
- <h:outputText value="footer3"></h:outputText>
- </f:facet>
- </sg:column>
- <sg:column style="width: 100px">
- <f:facet name="header">
- <h:outputText value="Status"></h:outputText>
- </f:facet>
- <h:outputText value="#{issues.status}"></h:outputText>
- <f:facet name="footer">
- <h:outputText value="footer4"></h:outputText>
- </f:facet>
- </sg:column>
- <sg:column style="width: 100px">
- <f:facet name="header">
- <h:outputText value="Reporter"></h:outputText>
- </f:facet>
- <h:outputText value="#{issues.reporter.username}"></h:outputText>
- <f:facet name="footer">
- <h:outputText value="footer5"></h:outputText>
- </f:facet>
- </sg:column>
- <sg:column style="width: 100px">
- <f:facet name="header">
- <h:outputText value="Created"></h:outputText>
- </f:facet>
- <h:outputText value="#{issues.created}"></h:outputText>
- <f:facet name="footer">
- <h:outputText value="footer6"></h:outputText>
- </f:facet>
- </sg:column>
- <sg:column style="width: 100px">
- <f:facet name="header">
- <h:outputText value="Updated"></h:outputText>
- </f:facet>
- <h:outputText value="#{issues.updated}"></h:outputText>
- <f:facet name="footer">
- <h:outputText value="footer7"></h:outputText>
- </f:facet>
- </sg:column>
- <sg:column style="width: 100px">
- <f:facet name="header">
- <h:outputText value="Resolution"></h:outputText>
- </f:facet>
- <h:outputText value="#{issues.resolution}"></h:outputText>
- <f:facet name="footer">
- <h:outputText value="footer8"></h:outputText>
- </f:facet>
- </sg:column>
- </sg:scrollable-grid>
+ <h:form>
+ <sg:scrollable-grid value="#{selectionBean.dataModel}" var="issues" first="0" rows="50">
+ <sg:column style="width: 100px" frozen="true">
+ <f:facet name="header">
+ <h:outputText value="Key"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.key.value}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer1"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column style="width: 100px">
+ <f:facet name="header">
+ <h:outputText value="Summary"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.summary}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer2"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column style="width: 100px">
+ <f:facet name="header">
+ <h:outputText value="Assignee"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.assignee.name}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer3"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column style="width: 100px">
+ <f:facet name="header">
+ <h:outputText value="Status"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.status}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer4"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column style="width: 100px">
+ <f:facet name="header">
+ <h:outputText value="Reporter"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.reporter.username}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer5"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column style="width: 100px">
+ <f:facet name="header">
+ <h:outputText value="Created"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.created}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer6"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column style="width: 100px">
+ <f:facet name="header">
+ <h:outputText value="Updated"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.updated}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer7"></h:outputText>
+ </f:facet>
+ </sg:column>
+ <sg:column style="width: 100px">
+ <f:facet name="header">
+ <h:outputText value="Resolution"></h:outputText>
+ </f:facet>
+ <h:outputText value="#{issues.resolution}"></h:outputText>
+ <f:facet name="footer">
+ <h:outputText value="footer8"></h:outputText>
+ </f:facet>
+ </sg:column>
+ </sg:scrollable-grid>
+ </h:form>
</body>
</html>
\ No newline at end of file
18 years, 7 months