diff options
Diffstat (limited to 'examples/rails_app-2.3.4/app/views/files/index.html.erb')
-rw-r--r-- | examples/rails_app-2.3.4/app/views/files/index.html.erb | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/examples/rails_app-2.3.4/app/views/files/index.html.erb b/examples/rails_app-2.3.4/app/views/files/index.html.erb new file mode 100644 index 0000000..b604ee0 --- /dev/null +++ b/examples/rails_app-2.3.4/app/views/files/index.html.erb @@ -0,0 +1,60 @@ +<html> + <head> + <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> + <title>upr test</title> + <%= javascript_include_tag :all %> +<style type="text/css"> +#progress-bar { + width:500px; + height:25px; + margin:15px; + border:solid 1px #000; + position:relative; +} + +#progress-bar #status-bar { + display:block; + height:25px; + width:0; + background-color:#00f; + border-right:solid 1px #000; + position:absolute; + top:0; left:0; +} + +#progress-bar #status-text { + display:block; + padding: 0 15px; + line-height:25px; + position:absolute; + top:0; left:0; +} +</style> + </head> + <body> +<% +upid = "#{Time.now.to_i}.#{rand}" +act = { :action => 'upload', :upload_id => upid } +opt = { + :multipart => true, + :target => 'upload', + :onsubmit => "UploadProgress.monitor('#{escape_javascript(upid)}')" +} +-%> +<p><%= link_to upid, :action => 'status', :upload_id => upid %></p> +<% form_tag(act, opt) do %> + <div id="file-fields"> + <p><%= file_field_tag :data %></p> + </div> + <p><%= link_to_function 'Add File Field', 'UploadProgress.FileField.add()' %> + </p> + <p><%= submit_tag :Upload %></p> +<% end %> + +<div id="results"></div> +<div id="progress-bar"></div> + +<iframe id="upload" name="upload" src="about:blank"></iframe> + + </body> +</html> |