JBoss Rich Faces SVN: r6307 - trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-22 11:48:43 -0500 (Fri, 22 Feb 2008)
New Revision: 6307
Modified:
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
delete frame after upload completed
Modified: trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-22 16:35:11 UTC (rev 6306)
+++ trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-22 16:48:43 UTC (rev 6307)
@@ -376,6 +376,7 @@
this.element = $(this.id);
this._progressBar = $(progressBarId);
this.progressBar = this._progressBar.component;
+ this.entries = new Array();
this.labelMarkup = label;
this.disabled = disabled;
@@ -408,8 +409,15 @@
iframe.style.display = 'none';
document.body.appendChild(iframe);
}
+ this.iframe = iframe;
return iframe;
},
+
+
+ deleteFrame: function() {
+ this.iframe.src = "about:blank";
+ document.body.removeChild(this.iframe);
+ },
initEvents : function() {
for (var e in this.events) {
@@ -665,6 +673,7 @@
_endUpload: function() {
this.activeEntry = null;
+ this.deleteFrame();
},
_updateEntriesState: function() {
16 years, 11 months
JBoss Rich Faces SVN: r6306 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: msorokin
Date: 2008-02-22 11:35:11 -0500 (Fri, 22 Feb 2008)
New Revision: 6306
Modified:
trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml
Log:
Details of usage and JS API were added
http://jira.jboss.com/jira/browse/RF-16901137
Modified: trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml 2008-02-22 15:59:40 UTC (rev 6305)
+++ trunk/docs/userguide/en/src/main/docbook/included/progressBar.xml 2008-02-22 16:35:11 UTC (rev 6306)
@@ -76,21 +76,21 @@
<section>
<title>Details of Usage</title>
<para>
- Some processes running with in an application might take some time to complete, therefore in
+ Some processes running within an application might take some time to complete, therefore in
order to indicate for a user the status of the process we recommend you to use <emphasis role="bold"><property><rich:progressBar></property> </emphasis>
component.
</para>
<para>
- The component employs the following facets to display the "initial" and "complete" states of the process:
+ The component employs the following facets to display the <property> "initial"</property> and <property> "complete"</property> states of the process:
</para>
<programlisting role="XML"><![CDATA[...
<f:facet name="initial">
<h:outputText value="Process not started"></h:outputText>
</f:facet>
-
-...]]></programlisting>
+. .]]>
+</programlisting>
<para>
and
</para>
@@ -99,14 +99,13 @@
<![CDATA[...
<f:facet name="complete">
<h:outputText value="Process completed"></h:outputText>
- </f:facet>
-
- ...]]>
+ </f:facet>
+ ...]]>
</programlisting>
<para> However, the usage of these facets is optional. If you omit them nothing will be displayed. </para>
- <para> The progress bar starts and finishes rendering its state relying on <emphasis><property>"minValue"</property></emphasis> (default value – "0")
+ <para> The progress bar starts and finishes rendering its state being governed by <emphasis><property>"minValue"</property></emphasis> (default value – "0")
and <emphasis><property>"maxValue"</property></emphasis> (default value is "100") parameters relatively. See the following example: </para>
@@ -117,13 +116,11 @@
maxValue="400">
<h:outputText value="{value}%" ></h:outputText>
</rich:progressBar>
-
-
...]]>
</programlisting>
- <para> In order do display textual and numerical information on the progress bar you need to use this code </para>
+ <para> In order do display textual and numerical information on the progress bar you need to use this code: </para>
<programlisting role="XML">
<![CDATA[...
@@ -133,26 +130,95 @@
- <para> The interval <emphasis><property>"interval"</property></emphasis>attribute defines the frequency of status polling. Polling is active while the component is operational. </para>
+ <para> The <emphasis><property>"interval"</property></emphasis>attribute defines the frequency of status polling. Polling is active while the component is operational. </para>
<programlisting role="XML">
<![CDATA[...
<rich:progressBar value="#{bean.incValue}" enabled="#{bean.enabled}" id="progrs"
interval="900" >
. . .
</rich:progressBar>
- ...]]>
+ ...]]>
</programlisting>
-
-
+
+
+ <para>The <property><rich:progressBar></property>component can be use in two modes: Ajax (default) and Client. In order to define the mode you need, use <emphasis><property>"mode"</property></emphasis> attribute. </para>
+
+ <itemizedlist>
+ <listitem>
+ <para><property>Ajax</property> - polling is activated when the component is enabled to check its value. </para>
+ </listitem>
+ <listitem>
+ <para><property>Client</property> - component updates after its value changed through JavaScript API. </para>
+ </listitem>
+
+ </itemizedlist>
+
+
</section>
<!-- End. Details of Usage-->
+ <!-- JavaScript API-->
+ <section>
+ <title>JavaScript API</title>
+ <table>
+ <title>JavaScript API</title>
+ <tgroup cols="2">
+ <thead>
+ <row>
+ <entry>Function</entry>
+ <entry>Description</entry>
+
+ </row>
+ </thead>
+ <tbody>
+ <!--Sorting API -->
+ <row>
+ <entry>enable()</entry>
+ <entry>Begins polling for ajax mode </entry>
+
+ </row>
+ <row>
+ <entry>disable()</entry>
+ <entry>Stops polling for ajax mode</entry>
+
+ </row>
+
+ <row>
+ <entry>setValue(value)</entry>
+ <entry>Updates the progress of the process</entry>
+
+ </row>
+ <row>
+ <entry>setLabel(label)</entry>
+ <entry>Update the label for the process</entry>
+
+ </row>
+
+
+
+
+ </tbody>
+ </tgroup>
+ </table>
+ </section>
+ <!-- End of JavaScript API-->
+ <!-- Look-and-Feel Customization-->
+ <section>
+ <title>Look-and-Feel Customization</title>
+ <para>For skinnability implementation, the component uses a <emphasis>
+ <property>style class redefinition method.</property>
+ </emphasis> Default style classes are mapped on <emphasis>
+ <property>skin parameters.</property>
+ </emphasis></para>
+
+ </section>
+ <!-- End of Look-and-Feel Customization-->
</section>
\ No newline at end of file
16 years, 11 months
JBoss Rich Faces SVN: r6305 - trunk/sandbox/samples/sortingFilteringDemo.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-02-22 10:59:40 -0500 (Fri, 22 Feb 2008)
New Revision: 6305
Modified:
trunk/sandbox/samples/sortingFilteringDemo/pom.xml
Log:
fixed dependencies
Modified: trunk/sandbox/samples/sortingFilteringDemo/pom.xml
===================================================================
--- trunk/sandbox/samples/sortingFilteringDemo/pom.xml 2008-02-22 15:59:34 UTC (rev 6304)
+++ trunk/sandbox/samples/sortingFilteringDemo/pom.xml 2008-02-22 15:59:40 UTC (rev 6305)
@@ -1,35 +1,36 @@
-<?xml version="1.0"?><project>
- <parent>
- <artifactId>samples</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
- <version>3.2.0-SNAPSHOT</version>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.sandbox</groupId>
- <artifactId>sortingFilteringDemo</artifactId>
- <packaging>war</packaging>
- <name>sortingFilteringDemo Maven Webapp</name>
- <version>3.2.0-SNAPSHOT</version>
- <build>
- <finalName>sortingFilteringDemo</finalName>
- </build>
- <dependencies>
- <dependency>
- <groupId>org.richfaces.sandbox.ui</groupId>
- <artifactId>sortableHeader</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>core</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- </dependency>
- <dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>dataTable</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- </dependency>
+<?xml version="1.0"?>
+<project>
+ <parent>
+ <artifactId>samples</artifactId>
+ <groupId>org.richfaces.sandbox</groupId>
+ <version>3.2.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces.sandbox</groupId>
+ <artifactId>sortingFilteringDemo</artifactId>
+ <packaging>war</packaging>
+ <name>sortingFilteringDemo Maven Webapp</name>
+ <version>3.2.0-SNAPSHOT</version>
+ <build>
+ <finalName>sortingFilteringDemo</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>sortableHeader</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
<dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>core</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>dataTable</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
<groupId>org.richfaces.samples</groupId>
<artifactId>skins</artifactId>
<version>3.2.0-SNAPSHOT</version>
@@ -39,5 +40,10 @@
<artifactId>jira-data</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
- </dependencies>
+ <dependency>
+ <groupId>org.richfaces.sandbox.ui</groupId>
+ <artifactId>inplaceInput</artifactId>
+ <version>3.2.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
16 years, 11 months
JBoss Rich Faces SVN: r6304 - trunk/samples/dataTableDemo.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-02-22 10:59:34 -0500 (Fri, 22 Feb 2008)
New Revision: 6304
Modified:
trunk/samples/dataTableDemo/pom.xml
Log:
fixed dependencies
Modified: trunk/samples/dataTableDemo/pom.xml
===================================================================
--- trunk/samples/dataTableDemo/pom.xml 2008-02-22 15:54:39 UTC (rev 6303)
+++ trunk/samples/dataTableDemo/pom.xml 2008-02-22 15:59:34 UTC (rev 6304)
@@ -25,10 +25,5 @@
<artifactId>skins</artifactId>
<version>3.2.0-SNAPSHOT</version>
</dependency>
- <dependency>
- <groupId>org.richfaces.sandbox.ui</groupId>
- <artifactId>inplaceInput</artifactId>
- <version>3.2.0-SNAPSHOT</version>
- </dependency>
</dependencies>
</project>
16 years, 11 months
JBoss Rich Faces SVN: r6303 - trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-22 10:54:39 -0500 (Fri, 22 Feb 2008)
New Revision: 6303
Modified:
trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
cosmetic changes
Modified: trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-22 15:52:01 UTC (rev 6302)
+++ trunk/sandbox/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-02-22 15:54:39 UTC (rev 6303)
@@ -255,7 +255,6 @@
this.inplaceInput.fire("rich:onviewactivation", {oldValue : this.valueKeeper.value, value : this.tempValueKeeper.value});
}
this.endEditableState();
- //this.applyUserValue();
if (userValue == "") {
this.setDefaultText();
this.valueKeeper.value = "";
16 years, 11 months
JBoss Rich Faces SVN: r6302 - trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-02-22 10:52:01 -0500 (Fri, 22 Feb 2008)
New Revision: 6302
Modified:
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
client side event firing
Modified: trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-22 15:26:08 UTC (rev 6301)
+++ trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-22 15:52:01 UTC (rev 6302)
@@ -413,8 +413,16 @@
initEvents : function() {
for (var e in this.events) {
- if (e) {
- this.element.observe("rich:" + e, this.events[e]);
+ if (e && this.events[e]) {
+ if(e == 'onupload') {
+ this.element.observe("rich:" + e, function(event) {
+ if(this.events[e](event) !== false) {
+ this._upload();
+ }
+ }.bindAsEventListener(this));
+ } else {
+ this.element.observe("rich:" + e, this.events[e]);
+ }
}
}
},
@@ -501,17 +509,18 @@
return null;
},
-
+
upload: function() {
if (this.disabled) return;
if(this.events.onupload) {
- if(this.events.onupload() === false) {
- //the action is cancelled
- return;
- }
+ this.element.fire("rich:onupload", {});
+ } else {
+ this._upload();
}
+ },
+ _upload() {
this.runUpload = true;
if (!this.activeEntry) {
@@ -522,7 +531,7 @@
entry.upload();
}
}
- },
+ }
stop: function() {
if (this.disabled) return;
16 years, 11 months
JBoss Rich Faces SVN: r6301 - in trunk/sandbox/samples/fileUploadDemo/src/main: webapp/pages and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-22 10:26:08 -0500 (Fri, 22 Feb 2008)
New Revision: 6301
Added:
trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/FileData.java
Modified:
trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
Log:
demo site update
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-02-22 15:25:37 UTC (rev 6300)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-02-22 15:26:08 UTC (rev 6301)
@@ -21,20 +21,14 @@
package org.richfaces;
-import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.io.OutputStream;
+import java.util.ArrayList;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.FacesEvent;
-
import org.richfaces.event.UploadEvent;
/**
@@ -47,9 +41,32 @@
private boolean flag;
+ private String fileTypes = "*";
+
+ private Integer maxFiles = 5;
+
+ private String width = "400";
+
+ private String height = "210";
+
public boolean isFlag() {
return flag;
}
+
+ public List getFileList() {
+ if (data != null) {
+ List fileList = new ArrayList();
+ for (Object o : data.keySet()) {
+ String name = (String)o;
+ File file = (File)data.get(o);
+ if (file != null) {
+ fileList.add(new FileData(name));
+ }
+ }
+ return fileList;
+ }
+ return null;
+ }
public void setFlag(boolean flag) {
this.flag = flag;
@@ -57,35 +74,10 @@
public void listener(UploadEvent event) throws IOException{
File file = event.getFile();
- System.out.println("File name : " + file.getAbsolutePath());
+ System.out.println("File : '" + event.getFileName() + "' was uploaded");
+ System.out.println("Absolute Path : '" + file.getAbsolutePath() + "'!");
}
- public void action(ActionEvent event) {
- try {
- if (data != null) {
- for (String name : (String [])data.keySet().toArray(new String [0])) {
- System.out.println("\nFile Name : " + name);
- File file = (File)data.get(name);
-
- FileInputStream stream = new FileInputStream(file);
- ByteArrayOutputStream buffer = new ByteArrayOutputStream(4096);
- byte [] bytes = new byte[4096];
- int read;
- while ((read = stream.read(bytes)) != -1) {
- buffer.write(bytes, 0 , read);
- }
- stream.close();
- data.remove(name);
- file.delete();
- System.out.println(buffer.toString());
-
- }
- }
- } catch (Exception e) {
- e.getMessage();
- }
- }
-
/**
* @return the data
*/
@@ -99,7 +91,64 @@
public void setData(Map<String, InputStream> data) {
this.data = data;
}
+
+ /**
+ * @return the fileTypes
+ */
+ public String getFileTypes() {
+ return fileTypes;
+ }
+
+ /**
+ * @param fileTypes the fileTypes to set
+ */
+ public void setFileTypes(String fileTypes) {
+ this.fileTypes = fileTypes;
+ }
+
+ /**
+ * @return the maxFiles
+ */
+ public Integer getMaxFiles() {
+ return maxFiles;
+ }
+
+ /**
+ * @param maxFiles the maxFiles to set
+ */
+ public void setMaxFiles(Integer maxFiles) {
+ this.maxFiles = maxFiles;
+ }
+
+ /**
+ * @return the width
+ */
+ public String getWidth() {
+ return width;
+ }
+
+ /**
+ * @param width the width to set
+ */
+ public void setWidth(String width) {
+ this.width = width;
+ }
+
+ /**
+ * @return the height
+ */
+ public String getHeight() {
+ return height;
+ }
+
+ /**
+ * @param height the height to set
+ */
+ public void setHeight(String height) {
+ this.height = height;
+ }
}
+
Added: trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/FileData.java
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/FileData.java (rev 0)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/FileData.java 2008-02-22 15:26:08 UTC (rev 6301)
@@ -0,0 +1,40 @@
+/*
+ * FileData.java Date created: 22.02.2008
+ * Last modified by: $Author$
+ * $Revision$ $Date$
+ */
+
+package org.richfaces;
+
+/**
+ * TODO Class description goes here.
+ * @author "Andrey Markavtsov"
+ *
+ */
+public class FileData {
+ private String name;
+
+
+
+ public FileData(String name) {
+ this.name = name;
+ }
+
+
+ /**
+ * @return the name
+ */
+ public String getName() {
+ return name;
+ }
+
+
+ /**
+ * @param name the name to set
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+
+
+}
\ No newline at end of file
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-22 15:25:37 UTC (rev 6300)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-22 15:26:08 UTC (rev 6301)
@@ -19,24 +19,36 @@
</head>
<body>
<f:view>
+
<h:form>
- <h:selectOneRadio>
- <f:selectItem itemLabel="1" itemValue="1"/>
- <f:selectItem itemLabel="2" itemValue="2"/>
- </h:selectOneRadio>
+<table cellpadding="0" cellspacing="0" style="width: 500px">
+<tr><td>Files Types:</td><td>
+<h:inputText value="#{bean.fileTypes}"></h:inputText></td></tr>
+<tr><td>Max Files Count:</td><td>
+<h:inputText value="#{bean.maxFiles}"></h:inputText></td></tr>
+<tr><td>Upload List Width:</td><td>
+<h:inputText value="#{bean.width}"></h:inputText></td></tr>
+<tr><td>Upload List Height:</td><td>
+<h:inputText value="#{bean.height}"></h:inputText></td></tr>
+</table><br/>
+<a4j:commandButton reRender="upload1" value="Accept"></a4j:commandButton>
+</h:form>
- <h:selectBooleanCheckbox value="#{bean.flag}" id="boolean" />
-
- <h:messages />
-
-<fu:fileUpload data="#{bean.data}" fileUploadListener="#{bean.listener}" listWidth="600px" listHeight="150px"
+<h:form>
+<fu:fileUpload
+ id="upload1"
+ data="#{bean.data}"
+ fileUploadListener="#{bean.listener}"
+ listWidth="#{bean.width}px"
+ listHeight="#{bean.height}px"
uploadListClass="list"
uploadListClassDisabled="list_disabled"
fileEntryClass="entry"
fileEntryClassDisabled="entry_disabled"
fileEntryControlClass="entry_control"
fileEntryControlClassDisabled="entry_control_disabled"
- maxFilesQuantity="4">
+ maxFilesQuantity="#{bean.maxFiles}"
+ acceptedTypes="#{bean.fileTypes}">
<f:facet name="progress">
<progressBar:progressBar style="height: 10px; width: 300px;">
</progressBar:progressBar>
@@ -45,10 +57,16 @@
<h:outputText value="{_KB}KB from {KB}KB uploaded --- {mm}:{ss}"></h:outputText>
</f:facet>
</fu:fileUpload><br/><br/><br/>
-<h:commandButton actionListener="#{bean.action}" style="font-weight: bold; width: 300px;" value="Print file content in console"></h:commandButton>
-<br/>
-<input type="button" onclick="$('j_id_jsp_223736782_1:j_id_jsp_223736782_7').component.enable();" value="Enable" />
-<input type="button" onclick="$('j_id_jsp_223736782_1:j_id_jsp_223736782_7').component.disable();" value="Disable" /><br/>
+<a4j:commandLink style="font-weight: bold; width: 200px;" value="Show files uploaded:" reRender="files_list"></a4j:commandLink><br/><br/>
+<h:dataTable value="#{bean.fileList}" var="file" id="files_list" style="width: 500px">
+ <h:column>
+ <h:outputText value="#{file.name}"></h:outputText>
+ </h:column>
+</h:dataTable>
+
+<br/><br/><br/>
+<input type="button" onclick="$('j_id_jsp_223736782_7:upload1').component.enable();" value="Enable" />
+<input type="button" onclick="$('j_id_jsp_223736782_7:upload1').component.disable();" value="Disable" /><br/>
</h:form>
</f:view>
</body>
16 years, 11 months
JBoss Rich Faces SVN: r6300 - in trunk/sandbox/ui/fileUpload/src/main: templates/org/richfaces and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-22 10:25:37 -0500 (Fri, 22 Feb 2008)
New Revision: 6300
Modified:
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Log:
fix uploading in _blank window in Firefox after ajax rerendering
Modified: trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-22 15:17:57 UTC (rev 6299)
+++ trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-22 15:25:37 UTC (rev 6300)
@@ -386,7 +386,7 @@
this.stopScript = stopScript;
this.getFileSizeScript = getFileSizeScript;
- this.iframe = $(this.id + "_iframe");
+ this.iframe = this.createFrame();//$(this.id + "_iframe");
this.items = $(this.id + ":fileItems");
this.classes = classes;
this.events = events;
@@ -398,6 +398,18 @@
this.initEvents();
this.setupAutoUpload();
},
+
+ createFrame: function () {
+ var iframe = $(this.id + "_iframe");
+ if (!iframe) {
+ iframe = document.createElement("iframe");
+ iframe.id = this.id + "_iframe";
+ iframe.name = this.id;
+ iframe.style.display = 'none';
+ document.body.appendChild(iframe);
+ }
+ return iframe;
+ },
initEvents : function() {
for (var e in this.events) {
Modified: trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-22 15:17:57 UTC (rev 6299)
+++ trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-22 15:25:37 UTC (rev 6300)
@@ -40,7 +40,7 @@
<div class="upload_list_decor" style="width: #{component.attributes['listWidth']}" id="#{clientId}">
-<iframe name="#{clientId}" id="#{clientId}_iframe" style="display: none;"/>
+<!-- iframe name="ddd" id="#{clientId}_iframe" style="display: none;"/ -->
<span style="display: none;">
<jsp:scriptlet>
16 years, 11 months
JBoss Rich Faces SVN: r6299 - management/design/inplaceSelect/design/images.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2008-02-22 10:17:57 -0500 (Fri, 22 Feb 2008)
New Revision: 6299
Modified:
management/design/inplaceSelect/design/images/mark_list.gif
Log:
Modified: management/design/inplaceSelect/design/images/mark_list.gif
===================================================================
(Binary files differ)
16 years, 11 months
JBoss Rich Faces SVN: r6298 - trunk/sandbox/ui/inplaceInput/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-22 09:31:37 -0500 (Fri, 22 Feb 2008)
New Revision: 6298
Modified:
trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx
Log:
add input events
Modified: trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-02-22 14:30:18 UTC (rev 6297)
+++ trunk/sandbox/ui/inplaceInput/src/main/templates/inplaceinput.jspx 2008-02-22 14:31:37 UTC (rev 6298)
@@ -75,6 +75,17 @@
onselect='#{component.attributes["onselect"]}'
onblur='#{component.attributes["onblur"]}'
onfocus='#{component.attributes["onfocus"]}'
+ oninputclick='#{component.attributes["oninputclick"]}'
+ oninputdblclick='#{component.attributes["oninputdblclick"]}'
+ oninputkeydown='#{component.attributes["oninputkeydown"]}'
+ oninputkeypress='#{component.attributes["oninputkeypress"]}'
+ oninputkeyup='#{component.attributes["oninputkeyup"]}'
+ oninputmousedown='#{component.attributes["oninputmousedown"]}'
+ oninputmousemove='#{component.attributes["oninputmousemove"]}'
+ oninputmouseout='#{component.attributes["oninputmouseout"]}'
+ oninputmouseover='#{component.attributes["oninputmouseover"]}'
+ oninputmouseup='#{component.attributes["oninputmouseup"]}'
+
/>
<input id='#{clientId}value' name='#{clientId}value' type='hidden' value='#{fieldValue}'/>
<div id="#{clientId}bar" class="is_btn_set" style="display:none;">
16 years, 11 months