sunrise-file-upload 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.rdoc +4 -2
- data/Rakefile +0 -20
- data/lib/sunrise/file_upload/version.rb +1 -1
- data/lib/sunrise/file_upload/view_helper.rb +5 -2
- metadata +18 -19
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2011 Aimbulance
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
CHANGED
@@ -28,8 +28,8 @@ Find asset by foreign key or guid:
|
|
28
28
|
|
29
29
|
=== Views
|
30
30
|
|
31
|
-
<%= stylesheet_link_tag "fileupload/
|
32
|
-
<%= javascript_include_tag :fileupload %>
|
31
|
+
<%= stylesheet_link_tag "/javascripts/fileupload/fileuploader.css" %>
|
32
|
+
<%= javascript_include_tag :fileupload, "jquery.tmpl.min" %>
|
33
33
|
|
34
34
|
<%= form.fileupload :picture %>
|
35
35
|
<%= form.hidden_field :fileupload_guid if form.object.new_record? %>
|
@@ -41,3 +41,5 @@ Find asset by foreign key or guid:
|
|
41
41
|
<ul class="fileupload-list" style="display:none;"></ul>
|
42
42
|
</div>
|
43
43
|
</script>
|
44
|
+
|
45
|
+
Copyright (c) 2011 Aimbulance, released under the MIT license
|
data/Rakefile
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
require 'rake'
|
3
3
|
require 'rake/testtask'
|
4
4
|
require 'rake/rdoctask'
|
5
|
-
require File.join(File.dirname(__FILE__), 'lib', 'sunrise', 'file_upload', 'version')
|
6
5
|
|
7
6
|
desc 'Default: run unit tests.'
|
8
7
|
task :default => :test
|
@@ -23,22 +22,3 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
|
|
23
22
|
rdoc.rdoc_files.include('README')
|
24
23
|
rdoc.rdoc_files.include('lib/**/*.rb')
|
25
24
|
end
|
26
|
-
|
27
|
-
begin
|
28
|
-
require 'jeweler'
|
29
|
-
Jeweler::Tasks.new do |s|
|
30
|
-
s.name = "sunrise-file-upload"
|
31
|
-
s.version = Sunrise::FileUpload::VERSION.dup
|
32
|
-
s.summary = "Rails FileUpload"
|
33
|
-
s.description = "Sunrise is a Aimbulance CMS"
|
34
|
-
s.email = "galeta.igor@gmail.com"
|
35
|
-
s.homepage = "https://github.com/galetahub/sunrise-file-upload"
|
36
|
-
s.authors = ["Igor Galeta", "Pavlo Galeta"]
|
37
|
-
s.files = FileList["[A-Z]*", "{app,config,lib}/**/*"]
|
38
|
-
s.extra_rdoc_files = FileList["[A-Z]*"] - %w(Gemfile Rakefile)
|
39
|
-
end
|
40
|
-
|
41
|
-
Jeweler::GemcutterTasks.new
|
42
|
-
rescue LoadError
|
43
|
-
puts "Jeweler not available. Install it with: gem install jeweler"
|
44
|
-
end
|
@@ -44,8 +44,11 @@ module Sunrise
|
|
44
44
|
formatted_options = options.inspect.gsub('=>', ':')
|
45
45
|
js = [ "new qq.FileUploaderInput(#{formatted_options});" ]
|
46
46
|
|
47
|
-
if value
|
48
|
-
|
47
|
+
if value
|
48
|
+
Array.wrap(value).each do |asset|
|
49
|
+
next unless asset.persisted?
|
50
|
+
js << "qq.FileUploader.instances['#{element_id}']._updatePreview(#{asset.to_json});"
|
51
|
+
end
|
49
52
|
end
|
50
53
|
|
51
54
|
"$(document).ready(function(){ #{js.join} });"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sunrise-file-upload
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 3
|
10
|
+
version: 0.1.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Igor Galeta
|
@@ -16,8 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2011-
|
20
|
-
default_executable:
|
19
|
+
date: 2011-12-13 00:00:00 Z
|
21
20
|
dependencies: []
|
22
21
|
|
23
22
|
description: Sunrise is a Aimbulance CMS
|
@@ -29,23 +28,23 @@ extensions: []
|
|
29
28
|
extra_rdoc_files:
|
30
29
|
- README.rdoc
|
31
30
|
files:
|
32
|
-
- README.rdoc
|
33
|
-
- Rakefile
|
34
|
-
- lib/generators/sunrise/file_upload/USAGE
|
35
|
-
- lib/generators/sunrise/file_upload/install_generator.rb
|
36
|
-
- lib/generators/sunrise/file_upload/templates/fileuploader-input.js
|
37
|
-
- lib/sunrise-file-upload.rb
|
38
31
|
- lib/sunrise/file_upload.rb
|
39
|
-
- lib/sunrise/file_upload/active_record.rb
|
40
|
-
- lib/sunrise/file_upload/callbacks.rb
|
41
32
|
- lib/sunrise/file_upload/engine.rb
|
33
|
+
- lib/sunrise/file_upload/view_helper.rb
|
42
34
|
- lib/sunrise/file_upload/form_builder.rb
|
43
|
-
- lib/sunrise/file_upload/http.rb
|
44
35
|
- lib/sunrise/file_upload/manager.rb
|
36
|
+
- lib/sunrise/file_upload/http.rb
|
45
37
|
- lib/sunrise/file_upload/request.rb
|
46
38
|
- lib/sunrise/file_upload/version.rb
|
47
|
-
- lib/sunrise/file_upload/
|
48
|
-
|
39
|
+
- lib/sunrise/file_upload/active_record.rb
|
40
|
+
- lib/sunrise/file_upload/callbacks.rb
|
41
|
+
- lib/generators/sunrise/file_upload/install_generator.rb
|
42
|
+
- lib/generators/sunrise/file_upload/templates/fileuploader-input.js
|
43
|
+
- lib/generators/sunrise/file_upload/USAGE
|
44
|
+
- lib/sunrise-file-upload.rb
|
45
|
+
- MIT-LICENSE
|
46
|
+
- Rakefile
|
47
|
+
- README.rdoc
|
49
48
|
homepage: https://github.com/galetahub/sunrise-file-upload
|
50
49
|
licenses: []
|
51
50
|
|
@@ -74,10 +73,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
73
|
version: "0"
|
75
74
|
requirements: []
|
76
75
|
|
77
|
-
rubyforge_project:
|
78
|
-
rubygems_version: 1.
|
76
|
+
rubyforge_project: sunrise-core
|
77
|
+
rubygems_version: 1.8.10
|
79
78
|
signing_key:
|
80
79
|
specification_version: 3
|
81
|
-
summary: Rails FileUpload
|
80
|
+
summary: Rails HTML5 FileUpload helpers
|
82
81
|
test_files: []
|
83
82
|
|