Skip to content

Commit b4a86a8

Browse files
committed
added file upload plugin with support to upload one file at a time with one instance of the plugin
1 parent adb6163 commit b4a86a8

11 files changed

+1126
-3
lines changed

.classpath

+6-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
<classpathentry kind="src" path="src"/>
44
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
55
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
6-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
6+
<classpathentry kind="con" path="org.eclipse.jst.server.core.container/org.eclipse.jst.server.tomcat.runtimeTarget/Apache Tomcat v6.0">
7+
<attributes>
8+
<attribute name="owner.project.facets" value="jst.web"/>
9+
</attributes>
10+
</classpathentry>
11+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/java-6-openjdk">
712
<attributes>
813
<attribute name="owner.project.facets" value="java"/>
914
</attributes>

.settings/org.eclipse.wst.common.project.facet.core.xml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<faceted-project>
3+
<runtime name="Apache Tomcat v6.0"/>
34
<fixed facet="jst.web"/>
45
<fixed facet="wst.jsdt.web"/>
56
<fixed facet="java"/>
Binary file not shown.
85.7 KB
Binary file not shown.

WebContent/WEB-INF/web.xml

+10
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,14 @@
99
<welcome-file>default.htm</welcome-file>
1010
<welcome-file>default.jsp</welcome-file>
1111
</welcome-file-list>
12+
<servlet>
13+
<description></description>
14+
<display-name>UploadServlet</display-name>
15+
<servlet-name>UploadServlet</servlet-name>
16+
<servlet-class>info.sudr.file.UploadServlet</servlet-class>
17+
</servlet>
18+
<servlet-mapping>
19+
<servlet-name>UploadServlet</servlet-name>
20+
<url-pattern>/upload</url-pattern>
21+
</servlet-mapping>
1222
</web-app>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
.file_upload {
2+
position: relative;
3+
overflow: hidden;
4+
direction: ltr;
5+
cursor: pointer;
6+
text-align: center;
7+
color: #333;
8+
font-weight: bold;
9+
-moz-border-radius: 10px;
10+
-webkit-border-radius: 10px;
11+
border-radius: 10px;
12+
width: 200px;
13+
height: 30px;
14+
line-height: 30px;
15+
background: palegreen;
16+
border: 1px solid limegreen;
17+
}
18+
19+
.file_upload_small {
20+
width: 200px;
21+
height: 30px;
22+
line-height: 30px;
23+
font-size: auto;
24+
background: palegreen;
25+
border: 1px solid limegreen;
26+
}
27+
28+
.file_upload_large {
29+
width: 100%;
30+
height: 150px;
31+
line-height: 150px;
32+
font-size: 20px;
33+
background: palegreen;
34+
border: 1px solid limegreen;
35+
}
36+
37+
.file_upload_highlight {
38+
background: lawngreen;
39+
}
40+
41+
.file_upload input {
42+
position: absolute;
43+
top: 0;
44+
right: 0;
45+
margin: 0;
46+
border: 300px solid transparent;
47+
opacity: 0;
48+
-ms-filter: 'alpha(opacity=0)';
49+
filter: alpha(opacity=0);
50+
-o-transform: translate(-300px, -300px) scale(10);
51+
-moz-transform: translate(-800px, 0) scale(10);
52+
cursor: pointer;
53+
}
54+
55+
.file_upload iframe, .file_upload button {
56+
display: none;
57+
}
58+
59+
.file_upload_preview img {
60+
width: 80px;
61+
}
62+
63+
.file_upload_progress .ui-progressbar-value {
64+
background: url(pbar-ani.gif);
65+
}
66+
67+
.file_upload_progress div {
68+
width: 150px;
69+
height: 15px;
70+
}
71+
72+
.file_upload_cancel button {
73+
cursor: pointer;
74+
}

0 commit comments

Comments
 (0)