Permalink
Browse files

Updating to SWFUpload v2.2.0 Beta 2 and Rails 2.1.2

  • Loading branch information...
1 parent 6f60bd5 commit 8e309c7e2c7ca045490e448d9cd06301ef80e0af @cameronyule cameronyule committed Oct 30, 2008
View
2 README
@@ -1,7 +1,7 @@
swfupload-rails-authentication
==============================
-Demo Rails 2.1 app showing SWFUpload working in tandem with restful-authentication, CSRF protection and attachment_fu.
+Demo Rails 2.1.2 app showing SWFUpload working in tandem with restful-authentication, CSRF protection and attachment_fu.
Requirements
@@ -6,12 +6,25 @@
window.onload = function () {
swfu = new SWFUpload({
upload_url : '<%= assets_path -%>?_swfupload_demo_session=<%= u session.session_id %>',
- flash_url : '/flash/swfupload_f9.swf',
+ flash_url : '/flash/swfupload.swf',
+
+ // Button settings
+ button_image_url: "/images/TestImageNoText_65x29.png", // Relative to the Flash file
+ button_width: "65",
+ button_height: "29",
+ button_placeholder_id: "spanButtonPlaceHolder",
+ button_text: '<span class="theFont">Hello</span>',
+ button_text_style: ".theFont { font-size: 16; }",
+ button_text_left_padding: 12,
+ button_text_top_padding: 3,
file_size_limit : '10000',
file_types : '*.jpg',
file_types_description : 'JPG Images',
file_upload_limit : '0',
+ custom_settings : {
+ progressTarget : "fsUploadProgress"
+ },
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
@@ -39,9 +52,10 @@
<% form_for(@asset) do |f| %>
<fieldset>
- <button id="btnBrowse" type="button" style="padding: 5px;" onclick="swfu.selectFiles(); this.blur();">
- Select Files <span style="font-size: 7pt;">(5 MB Max)</span>
- </button>
+ <div id="divStatus">0 Files Uploaded</div>
+ <div>
+ <span id="spanButtonPlaceHolder"></span>
+ </div>
</fieldset>
<% end %>
View
@@ -5,7 +5,7 @@
# ENV['RAILS_ENV'] ||= 'production'
# Specifies gem version of Rails to use when vendor/rails is not present
-RAILS_GEM_VERSION = '2.1.0' unless defined? RAILS_GEM_VERSION
+RAILS_GEM_VERSION = '2.1.2' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')
View
Oops, something went wrong.
View
Binary file not shown.
View
Binary file not shown.
Binary file not shown.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
@@ -84,7 +84,7 @@
white-space: nowrap;
}
-a.progressCancel {
+/*a.progressCancel {
font-size: 0;
display: block;
height: 14px;
@@ -97,4 +97,57 @@ a.progressCancel {
a.progressCancel:hover {
background-position: 0px 0px;
+}*/
+
+div.fieldset {
+ border: 1px solid #afe14c;
+ margin: 10px 0;
+ padding: 20px 10px;
+}
+div.fieldset span.legend {
+ position: relative;
+ background-color: #FFF;
+ padding: 3px;
+ top: -30px;
+ font: 700 14px Arial, Helvetica, sans-serif;
+ color: #73b304;
+}
+
+div.flash {
+ width: 375px;
+ margin: 10px 5px;
+ border-color: #D9E4FF;
+
+ -moz-border-radius-topleft : 5px;
+ -webkit-border-top-left-radius : 5px;
+ -moz-border-radius-topright : 5px;
+ -webkit-border-top-right-radius : 5px;
+ -moz-border-radius-bottomleft : 5px;
+ -webkit-border-bottom-left-radius : 5px;
+ -moz-border-radius-bottomright : 5px;
+ -webkit-border-bottom-right-radius : 5px;
+
+}
+
+button,
+input,
+select,
+textarea {
+ border-width: 1px;
+ margin-bottom: 10px;
+ padding: 2px 3px;
}
+
+
+
+input[disabled]{ border: 1px solid #ccc } /* FF 2 Fix */
+
+
+label {
+ width: 150px;
+ text-align: right;
+ display:block;
+ margin-right: 5px;
+}
+
+#btnSubmit { margin: 0 0 0 155px ; }

0 comments on commit 8e309c7

Please sign in to comment.