JBoss Rich Faces SVN: r10114 - trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-08-15 09:07:54 -0400 (Fri, 15 Aug 2008)
New Revision: 10114
Modified:
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
Log:
Modified: trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
--- trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-08-15 12:46:03 UTC (rev 10113)
+++ trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-08-15 13:07:54 UTC (rev 10114)
@@ -83,8 +83,8 @@
fileUpload =richInputs, \t File Upload, \t\t/images/ico_FileUpload.gif, \t\t/images/cn_FileUpload.gif, fileUpload.html, jbossrichfaces/freezone/docs/tlddoc/rich/fileUpload.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIFileUpload.html, \t\t\t\t\t/richfaces/fileUpload.jsf
StandardSkinning =richMisc, \t Standard Skinning, \t\t/images/ico_StandardComponentsSkinning.gif, \t\t/images/cn_StandardComponentsSkinning.gif, ArchitectureOverview.html\#StControlsSkinning, jbossrichfaces/freezone/docs/tlddoc/rich/StandardSkinning.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIfileUpload.html, \t\t\t\t\t/richfaces/standardSkinning.jsf
plugnskin =richMisc, \t Plug'n'Skin, \t\t/images/ico_plugnskin.gif, \t\t/images/cn_plugnskin.gif, ArchitectureOverview.html\#PlugnSkin, jbossrichfaces/freezone/docs/tlddoc/rich/plugnskin.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIfileUpload.html, \t\t\t\t\t/richfaces/plugnskin.jsf
-hotKey=richMisc, \t Hot Key, \t\t/images/ico_hotkey.gif, \t\t/images/cn_hotkey.gif, hotKey.html, jbossrichfaces/freezone/docs/tlddoc/rich/hotkey.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/hotKey.jsf
-ajaxValidator=richValidators, \t Ajax Validator, \t\t/images/ico_ajaxValidator.gif, \t\t/images/cn_ajaxValidator.gif, ajaxValidator.html, jbossrichfaces/freezone/docs/tlddoc/rich/ajaxValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/ajaxValidator.jsf
-beanValidator=richValidators, \t Bean Validator, \t\t/images/ico_beanValidator.gif, \t\t/images/cn_beanValidator.gif, beanValidator.html, jbossrichfaces/freezone/docs/tlddoc/rich/beanValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/beanValidator.jsf
-graphValidator=richValidators, \t Graph Validator, \t\t/images/ico_graphValidator.gif, \t\t/images/cn_graphValidator.gif, graphValidator.html, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/graphValidator.jsf
-stateAPI=richMisc, \t State Manager API, \t\t/images/ico_stateAPI.gif, \t\t/images/cn_stateAPI.gif, ArchitectureOverview.html\#statemanagerapi, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/stateAPI.jsf
+hotKey=richMisc, \t Hot Key, \t\t/images/ico_Hotkey.gif, \t\t/images/cn_Hotkey.gif, hotKey.html, jbossrichfaces/freezone/docs/tlddoc/rich/hotkey.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/hotKey.jsf
+ajaxValidator=richValidators, \t Ajax Validator, \t\t/images/ico_AjaxValidator.gif, \t\t/images/cn_AjaxValidator.gif, ajaxValidator.html, jbossrichfaces/freezone/docs/tlddoc/rich/ajaxValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/ajaxValidator.jsf
+beanValidator=richValidators, \t Bean Validator, \t\t/images/ico_BeanValidator.gif, \t\t/images/cn_BeanValidator.gif, beanValidator.html, jbossrichfaces/freezone/docs/tlddoc/rich/beanValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/beanValidator.jsf
+graphValidator=richValidators, \t Graph Validator, \t\t/images/ico_GraphValidator.gif, \t\t/images/cn_GraphValidator.gif, graphValidator.html, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/graphValidator.jsf
+stateAPI=richMisc, \t State Manager API, \t\t/images/ico_StateManagerAPI.gif, \t\t/images/cn_StateManagerAPI.gif, ArchitectureOverview.html\#statemanagerapi, jbossrichfaces/freezone/docs/tlddoc/rich/graphValidator.html, jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIhotkey.html, \t\t\t\t\t/richfaces/stateAPI.jsf
16 years, 4 months
JBoss Rich Faces SVN: r10113 - in management/design/Split Panel component: markup and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2008-08-15 08:46:03 -0400 (Fri, 15 Aug 2008)
New Revision: 10113
Added:
management/design/Split Panel component/markup/
management/design/Split Panel component/markup/splitPanel.html
Log:
Added: management/design/Split Panel component/markup/splitPanel.html
===================================================================
--- management/design/Split Panel component/markup/splitPanel.html (rev 0)
+++ management/design/Split Panel component/markup/splitPanel.html 2008-08-15 12:46:03 UTC (rev 10113)
@@ -0,0 +1,95 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >
+
+<html>
+<head>
+
+<title>Untitled</title>
+<style>
+
+</style>
+
+</head>
+
+<body>
+
+
+<div style="width : 800px; height : 600px;">
+ <div style="background : gold; width : 800px; height : 600px; float : left;">
+ <div style="width : 790px; height : 590px; margin : 5px">
+
+ <div style="background : red; width : 790px; height : 590px">
+ <div style=" width : 200px; height : 590px; float : left;">
+
+ <div style="border : 1px solid black; width : 198px; height : 33px; background : silver">
+ <div style="margin : 7px">Header</div>
+ </div>
+ <div style=" border : 1px solid black; border-top : 0px; overflow : auto; width : 198px; height : 554px">
+
+ <br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
+ </div>
+ </div>
+ <div style="background : yellow; width : 5px; height : 590px; float : left; cursor: col-resize">
+
+ </div>
+ <div style="background : blue; width : 585px; height : 590px; float : left;">
+
+ <div style=" width : 585px; height : 590px;">
+ <div style=" width : 585px; height : 200px; float : left;">
+ <div style=" border : 1px solid black; overflow : auto; width : 583px; height : 198px">
+
+ </div>
+ </div>
+ <div style="background : yellow; width : 585px; height : 5px; float : left; cursor: row-resize">
+
+ </div>
+ <div style="border : 1px solid black; width : 583px; height : 33px; background : silver">
+ <div style="margin : 7px">Header</div>
+ </div>
+ <div style=" border : 1px solid black; border-top : 0px; background : green; width : 583px; height : 349px; float : left;">
+
+ </div>
+ </div>
+
+ </div>
+ </div>
+
+ </div>
+ </div>
+</div>
+
+<br /><br />
+<hr>
+<pre>
+<splitPanel cols="200,*" border="5px">
+ <splitArea areaBorder="1" scroll="auto">
+ <areaHeader value="Header">
+ </splitArea>
+ <splitPanel rows="200,*" border="5px">
+ <splitArea areaBorder="1" scroll="auto">
+ </splitArea>
+ <splitArea areaBorder="1" scroll="auto">
+ <areaHeader value="Header">
+ </splitArea>
+ </splitPanel>
+</splitPanel>
+</pre>
+<hr>
+<pre>
+
+<b>No header</b>
+areaSize = parentSize - 2 x areaBorder
+
+<b>With header</b>
+areaWidth = parentWidth - 2 x areaBorder
+areaHeight = parentHeight - headerHeight - 3 x areaBorder
+
+<b>Size of (*) area (if we have n areas)</b>
+area(*)Size = parentSize - areaSize(1) - .... - areaSize(n-1) - (n-1) x border
+
+</pre>
+<hr>
+
+
+
+</body>
+</html>
16 years, 4 months
JBoss Rich Faces SVN: r10112 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-08-15 07:49:00 -0400 (Fri, 15 Aug 2008)
New Revision: 10112
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/hibernateValidation.xhtml
Log:
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-15 11:47:25 UTC (rev 10111)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-15 11:49:00 UTC (rev 10112)
@@ -16,7 +16,7 @@
</style>
<h:form id="graphValidatorForm2">
<a4j:region renderRegionOnly="true">
- <rich:graphValidator value="#{dayStatistics}" summary="">
+ <rich:graphValidator summary="Invalid values: " value="#{dayStatistics}">
<table>
<thead>
<tr>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/hibernateValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/hibernateValidation.xhtml 2008-08-15 11:47:25 UTC (rev 10111)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/hibernateValidation.xhtml 2008-08-15 11:49:00 UTC (rev 10112)
@@ -11,7 +11,7 @@
<f:facet name="header">
<h:outputText value="User Info:" />
</f:facet>
- <rich:graphValidator>
+ <rich:graphValidator summary="Invalid values: ">
<h:panelGrid columns="3">
<h:outputText value="Name:" />
<h:inputText value="#{validationBean.name}" id="name">
16 years, 4 months
JBoss Rich Faces SVN: r10111 - trunk/ui/beanValidator/src/main/java/org/richfaces/component.
by richfaces-svn-commits@lists.jboss.org
Author: amarkhel
Date: 2008-08-15 07:47:25 -0400 (Fri, 15 Aug 2008)
New Revision: 10111
Modified:
trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java
Log:
Modified: trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java
===================================================================
--- trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java 2008-08-15 11:38:01 UTC (rev 10110)
+++ trunk/ui/beanValidator/src/main/java/org/richfaces/component/UIGraphValidator.java 2008-08-15 11:47:25 UTC (rev 10111)
@@ -104,8 +104,9 @@
// send all validation messages.
for (String msg : messages) {
// TODO - create Summary message ?
+ String summary = null != getSummary() ? getSummary() + msg : msg;
context.addMessage(null, new FacesMessage(
- FacesMessage.SEVERITY_ERROR, getSummary() + msg, msg));
+ FacesMessage.SEVERITY_ERROR, summary, msg));
}
}
16 years, 4 months
JBoss Rich Faces SVN: r10110 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-15 07:38:01 -0400 (Fri, 15 Aug 2008)
New Revision: 10110
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
Log:
https://jira.jboss.org/jira/browse/RF-3594 - "process" attribute was edited in the Guide
Modified: trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-08-15 11:30:26 UTC (rev 10109)
+++ trunk/docs/userguide/en/src/main/docbook/modules/RFCarchitectover.xml 2008-08-15 11:38:01 UTC (rev 10110)
@@ -1291,27 +1291,37 @@
<section id="process">
<title>Decide what to process</title>
<para>
- In order to process defined components you could use the
- <emphasis>
- <property>"process"</property>
- </emphasis>
- attribute.
+ The <emphasis><property>"process"</property></emphasis> attribute allows to
+ define the ids of components to be processed together with the component which is marked as <property>ajaxSingle</property> or wrapped to region.
</para>
<para>
- The
- <emphasis>
- <property>"process"</property>
- </emphasis>
- attribute defines the ids of the components to be
- processed together with the component which contains
- this attribute. In order to define processed components
- you could set theirs ids into the value of the
- <emphasis>
- <property>"process"</property>
- </emphasis>
- attribute.
+ You could make use of the <emphasis><property>"process"</property></emphasis> attribute when you need to process only two
+ components in the different parts of view.
</para>
<para>
+ Imagine you need to process only two input fields but not all the view.
+ If you wrap the first input to region or make <emphasis role="bold"><property><a4j:support></property></emphasis> component
+ with <code>ajaxSingle="true"</code> nested the second input will not be processed.
+ </para>
+ <para>
+ Here is a simple solution:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<h:inputText value="#{bean.name}" id="name">
+ <a4j:support ajaxSingle="true" process="email" event="onblur" reRender="someOut"/>
+</h:inputText>
+<h:inputTextarea value="#{bean.description}" id="desc" />
+<h:inputText value="#{bean.email}" id="email">
+ <a4j:support ajaxSingle="true" process="name" event="onblur" reRender="someOut"/>
+</h:inputText>
+...]]></programlisting>
+ <para>
+ In the example above when the input field with the <code>id="name"</code> looses focus, an AJAX request is sent.
+ So only two input fields (with <code>id="name"</code> and additionally with <code>id="email"</code>)
+ are processed: decoding, conversion/validation, value applying phases are executed.
+ The input field with the <code>id="email"</code> is handled the same way on blur event.
+ </para>
+ <!--para>
The
<emphasis>
<property>"process"</property>
@@ -1379,7 +1389,7 @@
<property><h:outputText></property>
</emphasis>
.
- </para>
+ </para-->
</section>
</section>
16 years, 4 months
JBoss Rich Faces SVN: r10109 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-08-15 07:30:26 -0400 (Fri, 15 Aug 2008)
New Revision: 10109
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
Log:
Bug fixing(RF-4189)
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-15 11:13:05 UTC (rev 10108)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-15 11:30:26 UTC (rev 10109)
@@ -16,7 +16,7 @@
</style>
<h:form id="graphValidatorForm2">
<a4j:region renderRegionOnly="true">
- <rich:graphValidator value="#{dayStatistics}">
+ <rich:graphValidator value="#{dayStatistics}" summary="">
<table>
<thead>
<tr>
@@ -41,7 +41,7 @@
</rich:graphValidator>
<a4j:commandButton value="Store my details"
actionListener="#{dayStatistics.store}" reRender="panel" />
- <rich:messages infoClass="green" errorClass="red" showDetail="true" showSummary="false"/>
+ <rich:messages infoClass="green" errorClass="red" />
</a4j:region>
</h:form>
</ui:composition>
16 years, 4 months
JBoss Rich Faces SVN: r10108 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/examples.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-08-15 07:13:05 -0400 (Fri, 15 Aug 2008)
New Revision: 10108
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/examples/externalMultipleSorting.xhtml
Log:
RF-4169
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/examples/externalMultipleSorting.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/examples/externalMultipleSorting.xhtml 2008-08-15 11:05:36 UTC (rev 10107)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/examples/externalMultipleSorting.xhtml 2008-08-15 11:13:05 UTC (rev 10108)
@@ -18,7 +18,7 @@
<h:form>
<rich:dataTable value="#{dataTableScrollerBean.allCars}"
var="category" rows="20" id="table" reRender="ds2"
- sortPriorities="#{sortingBean.prioritList}">
+ sortPriority="#{sortingBean.prioritList}">
<rich:column id="make" sortBy="#{category.make}"
sortOrder="#{sortingBean.makeDirection}" selfSorted="false">
<f:facet name="header">
16 years, 4 months
JBoss Rich Faces SVN: r10107 - trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples.
by richfaces-svn-commits@lists.jboss.org
Author: alevkovsky
Date: 2008-08-15 07:05:36 -0400 (Fri, 15 Aug 2008)
New Revision: 10107
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
Log:
Bug fixing(RF-4189)
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-15 09:55:36 UTC (rev 10106)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/graphValidator/examples/additionalValidation.xhtml 2008-08-15 11:05:36 UTC (rev 10107)
@@ -41,7 +41,7 @@
</rich:graphValidator>
<a4j:commandButton value="Store my details"
actionListener="#{dayStatistics.store}" reRender="panel" />
- <rich:messages infoClass="green" errorClass="red" />
+ <rich:messages infoClass="green" errorClass="red" showDetail="true" showSummary="false"/>
</a4j:region>
</h:form>
</ui:composition>
16 years, 4 months
JBoss Rich Faces SVN: r10106 - trunk/docs/userguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-08-15 05:55:36 -0400 (Fri, 15 Aug 2008)
New Revision: 10106
Modified:
trunk/docs/userguide/en/src/main/docbook/modules/AUGWADParams.xml
Log:
https://jira.jboss.org/jira/browse/RF-4152 - rg.ajax4jsf.GLOBAL_RESOURCE_URI_PREFIX, org.ajax4jsf.SESSION_RESOURCE_URI_PREFIX was added
Modified: trunk/docs/userguide/en/src/main/docbook/modules/AUGWADParams.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/modules/AUGWADParams.xml 2008-08-14 22:53:26 UTC (rev 10105)
+++ trunk/docs/userguide/en/src/main/docbook/modules/AUGWADParams.xml 2008-08-15 09:55:36 UTC (rev 10106)
@@ -132,14 +132,29 @@
</row>
<row>
<entry>org.ajax4jsf.RESOURCE_URI_PREFIX</entry>
- <entry>none</entry>
+ <entry>a4j</entry>
<entry>
- This variable just defines prefix which is added to URIs of generated resources.
+ Defines prefix which is added to all URIs of generated resources.
This prefix designed to handle RichFaces generated resources requests
</entry>
</row>
-
<row>
+ <entry>org.ajax4jsf.GLOBAL_RESOURCE_URI_PREFIX</entry>
+ <entry>a4j/g</entry>
+ <entry>
+ Defines prefix which is added to URIs of global resources.
+ This prefix designed to handle RichFaces generated resources requests
+ </entry>
+ </row>
+ <row>
+ <entry>org.ajax4jsf.SESSION_RESOURCE_URI_PREFIX</entry>
+ <entry>a4j/s</entry>
+ <entry>
+ Defines prefix which is used for session tracking for generated resources.
+ This prefix designed to handle RichFaces generated resources requests
+ </entry>
+ </row>
+ <row>
<entry>org.ajax4jsf.DEFAULT_EXPIRE</entry>
<entry>86400</entry>
<entry>
16 years, 4 months
JBoss Rich Faces SVN: r10105 - in trunk/ui/suggestionbox/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-08-14 18:53:26 -0400 (Thu, 14 Aug 2008)
New Revision: 10105
Modified:
trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
Log:
Blinking suggestion box fixed
Modified: trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java
===================================================================
--- trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-08-14 17:12:06 UTC (rev 10104)
+++ trunk/ui/suggestionbox/src/main/java/org/richfaces/renderkit/html/SuggestionBoxRenderer.java 2008-08-14 22:53:26 UTC (rev 10105)
@@ -87,7 +87,7 @@
*/
private final InternetResource[] additionalScripts = {
new org.ajax4jsf.javascript.PrototypeScript(),
- getResource("/org/richfaces/renderkit/html/scripts/jquery/jquery.js"),
+ getResource("/org/richfaces/renderkit/html/scripts/jquery/jquery.js"),
getResource("/org/richfaces/renderkit/html/scripts/available.js"),
new org.ajax4jsf.javascript.SmartPositionScript(),
getResource("/org/richfaces/renderkit/html/scripts/browser_info.js"),
Modified: trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js
===================================================================
--- trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-08-14 17:12:06 UTC (rev 10104)
+++ trunk/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/scripts/suggestionbox.js 2008-08-14 22:53:26 UTC (rev 10105)
@@ -286,7 +286,7 @@
}
document.body.insertBefore(this.update, document.body.firstChild);
- this.initialized = true;
+ this.initialized = true;
}
this.wasBlur = false;
if (this.active) {
@@ -1013,17 +1013,31 @@
this.clonePosition(this.target, this.source, this.source.offsetHeight);
- if (options.iframeId) {
+ if (options.iframeId) {
var iframe = $(options.iframeId);
+
+ if (jQuery.browser.msie) {
+ var op = iframe.offsetParent;
+ if (op && op.nodeType == Node.ELEMENT_NODE) {
+ //hack copied from propotype.js viewportOffset()
+ //needed for positioning to work properly
+ var jop = jQuery(op);
+ if (jop.css('position') == 'static') {
+ jop.css('position', 'relative').css('position', 'static');
+ }
+ }
+ }
+
+ //iframe.style.position = "absolute";
+ iframe.style.left = this.target.style.left;
+ iframe.style.top = this.target.style.top;
+ iframe.style.width = this.target.style.width;
+ iframe.style.height = this.target.style.height;
+
var zindexVar = options.zindex ? options.zindex : 200 ;
Element.setStyle(this.target, {zIndex: zindexVar + 1});
Element.setStyle(iframe, {zIndex: zindexVar});
- iframe.style.position = "absolute";
- iframe.style.top = this.target.style.top;
- iframe.style.left = this.target.style.left;
- iframe.style.width = this.target.style.width;
- iframe.style.height = this.target.style.height;
}
},
@@ -1031,30 +1045,53 @@
parseToPx: function(value) {
var v = value.strip();
- if (v == 'auto') {
- return 0;
- } else {
- return parseFloat(v.replace(this.PX_REGEX, ""));
+ if (this.PX_REGEX.test(v)) {
+ try {
+ return parseFloat(v.replace(this.PX_REGEX, ""));
+ } catch (e) {
+
+ }
}
+
+ return NaN;
},
-
+
clonePosition: function(target, source, vOffset) {
var jqt = jQuery(target);
+ var jqs = jQuery(source);
+ var so = jqs.offset();
- var visibility = jqt.css('visibility');
- var display = jqt.css('display');
+ var hidden = (jqt.css('display') == 'none');
+ var oldVisibility;
- var so = jQuery(source).offset();
- var to = jqt.css({left: '0px', top: '0px', visibility: 'hidden', display: ''}).offset();
+ if (hidden) {
+ oldVisibility = jqt.css('visibility');
+ jqt.css('visibility', 'hidden').css('display', '');
+ }
+
+ var left = this.parseToPx(jqt.css('left'));
+ if (isNaN(left)) {
+ left = 0;
+ jqt.css('left', '0px');
+ }
- var l = so.left - to.left;
- var p = so.top - to.top + vOffset;
+ var top = this.parseToPx(jqt.css('top'));
+ if (isNaN(top)) {
+ top = 0;
+ jqt.css('top', '0px');
+ }
+ var to = jqt.offset();
+
+ if (hidden) {
+ jqt.css('display', 'none').css('visibility', oldVisibility);
+ }
+
// set position
- target.style.left = l + 'px';
- target.style.top = p + 'px';
-
- jqt.css({visibility: visibility, display: display});
+ jqt.css({
+ left: (so.left - to.left + left) + 'px',
+ top: (so.top - to.top + top + vOffset) + 'px'
+ });
},
getBody: function() {
16 years, 4 months