webwork/src/resources/web/tests blank.html,NONE,1.1 fileprogress.jsp,NONE,1.1 fileupload.jsp,1.2,1.3
[email protected] Sun, 28 Dec 2003 17:16:45 -0800
| Newsgroups | gmane.comp.java.open-symphony.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/opensymphony/webwork/src/resources/web/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv13795/src/resources/web/tests
Modified Files:
fileupload.jsp
Added Files:
blank.html fileprogress.jsp
Log Message:
Added file progress support, and switched default parser to use internal
--- NEW FILE: blank.html ---
--- NEW FILE: fileprogress.jsp ---
<%@ taglib uri="webwork" prefix="webwork" %>
<html>
<head>
<meta http-equiv="refresh" content="1; url=<webwork:url />">
</head>
<webwork:if test="@progress != null">
<body>
<h4>Reading <webwork:property value="@progress/fileName" />...</h4></br>
<table>
<tr align="center">
<table ID="progressTable" border="1" cellpadding="0" cellspacing="0">
<tr height="20" border="1">
<td bgcolor="#0000FF" id="doneCol" ></td>
<td id="remainingCol"></td>
</tr>
</table>
</tr>
<tr align="center">
<table>
<tr>
<td colspan="2"><webwork:property value="@progress/read" /> / <webwork:property value="@progress/size" /></td>
</tr>
</table>
</tr>
</table>
<script>
var total = 280;
document.getElementById('progressTable').style.width = total + "px";
var doneWidth = <webwork:property value="@progress/read" /> / <webwork:property value="@progress/size" />;
document.getElementById("doneCol").style.width = (doneWidth * total) + "px";
var remainingWidth = <webwork:property value="@progress/remaining" /> / <webwork:property value="@progress/size" />;
document.getElementById("remainingCol").style.width = (remainingWidth * total) + "px";
</script>
</body>
</webwork:if>
</html>
Index: fileupload.jsp
===================================================================
RCS file: /cvsroot/opensymphony/webwork/src/resources/web/tests/fileupload.jsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- fileupload.jsp 17 Jun 2002 15:23:59 -0000 1.2
+++ fileupload.jsp 29 Dec 2003 01:16:43 -0000 1.3
@@ -8,6 +8,13 @@
<title>File Upload</title>
</head>
<body>
+<script>
+function showProgress()
+{
+ parent.progress.document.location.href='fileprogress.jsp';
+ return true;
+}
+</script>
<h1>File Upload</h1>
<h3>Select a problem and submit patch. Max upload is 2 MB.</h3></br>
<webwork:if test="hasErrorMessages == true">
@@ -17,7 +24,7 @@
</webwork:iterator>
</webwork:if>
-<form action="<webwork:url value="'fileupload.action'"/>" method="POST" enctype="multipart/form-data">
+<form action="<webwork:url value="'fileupload.action'"/>" method="POST" enctype="multipart/form-data" onsubmit="showProgress()">
<center>
<table width="350" border="0" cellpadding="3" cellspacing="0">
<ui:select label="'Severity'" name="'severity'" list="severityList"/>
@@ -31,6 +38,6 @@
</table>
</center>
</form>
-
+<iframe name="progress" src="blank.html" border="0" frameborder="0" style="border:none">
</body>
</html>
-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click