jquery-file-upload 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/Gemfile +14 -0
  4. data/LICENSE +21 -0
  5. data/README.md +12 -0
  6. data/app/assets/images/jquery-file-upload/loading.gif +0 -0
  7. data/app/assets/images/jquery-file-upload/progressbar.gif +0 -0
  8. data/app/assets/javascripts/jquery-file-upload/cors/jquery.postmessage-transport.js +120 -0
  9. data/app/assets/javascripts/jquery-file-upload/cors/jquery.xdr-transport.js +89 -0
  10. data/app/assets/javascripts/jquery-file-upload/jquery.fileupload-image.js +321 -0
  11. data/app/assets/javascripts/jquery-file-upload/jquery.fileupload-jquery-ui.js +155 -0
  12. data/app/assets/javascripts/jquery-file-upload/jquery.fileupload-process.js +175 -0
  13. data/app/assets/javascripts/jquery-file-upload/jquery.fileupload-ui.js +710 -0
  14. data/app/assets/javascripts/jquery-file-upload/jquery.fileupload-validate.js +122 -0
  15. data/app/assets/javascripts/jquery-file-upload/jquery.fileupload.js +1466 -0
  16. data/app/assets/javascripts/jquery-file-upload/jquery.iframe-transport.js +217 -0
  17. data/app/assets/javascripts/jquery-file-upload/vendor/jquery.ui.widget.js +563 -0
  18. data/app/assets/javascripts/jquery-file-upload.js.coffee +1 -0
  19. data/app/assets/javascripts/jquery.fileupload-angular.js +429 -0
  20. data/app/assets/javascripts/jquery.fileupload-audio.js +112 -0
  21. data/app/assets/javascripts/jquery.fileupload-video.js +112 -0
  22. data/app/assets/stylesheets/jquery-file-upload/jquery.fileupload-noscript.css +22 -0
  23. data/app/assets/stylesheets/jquery-file-upload/jquery.fileupload-ui-noscript.css +17 -0
  24. data/app/assets/stylesheets/jquery-file-upload/jquery.fileupload-ui.css +57 -0
  25. data/app/assets/stylesheets/jquery-file-upload/jquery.fileupload.css +36 -0
  26. data/app/views/jquery-file-upload/basic_plus_ui/_download.html.erb +43 -0
  27. data/app/views/jquery-file-upload/basic_plus_ui/_form.html.slim +38 -0
  28. data/app/views/jquery-file-upload/basic_plus_ui/_upload.html.erb +32 -0
  29. data/jquery-file-upload.gemspec +19 -0
  30. data/lib/jquery-file-upload/configuration.rb +13 -0
  31. data/lib/jquery-file-upload/engine.rb +6 -0
  32. data/lib/jquery-file-upload/version.rb +3 -0
  33. data/lib/jquery-file-upload.rb +15 -0
  34. metadata +89 -0
@@ -0,0 +1,57 @@
1
+ @charset "UTF-8";
2
+ /*
3
+ * jQuery File Upload UI Plugin CSS 9.0.0
4
+ * https://github.com/blueimp/jQuery-File-Upload
5
+ *
6
+ * Copyright 2010, Sebastian Tschan
7
+ * https://blueimp.net
8
+ *
9
+ * Licensed under the MIT license:
10
+ * http://www.opensource.org/licenses/MIT
11
+ */
12
+
13
+ .fileupload-buttonbar .btn,
14
+ .fileupload-buttonbar .toggle {
15
+ margin-bottom: 5px;
16
+ }
17
+ .progress-animated .progress-bar,
18
+ .progress-animated .bar {
19
+ background: url("../img/progressbar.gif") !important;
20
+ filter: none;
21
+ }
22
+ .fileupload-process {
23
+ float: right;
24
+ display: none;
25
+ }
26
+ .fileupload-processing .fileupload-process,
27
+ .files .processing .preview {
28
+ display: block;
29
+ width: 32px;
30
+ height: 32px;
31
+ background: url("../img/loading.gif") center no-repeat;
32
+ background-size: contain;
33
+ }
34
+ .files audio,
35
+ .files video {
36
+ max-width: 300px;
37
+ }
38
+
39
+ @media (max-width: 767px) {
40
+ .fileupload-buttonbar .toggle,
41
+ .files .toggle,
42
+ .files .btn span {
43
+ display: none;
44
+ }
45
+ .files .name {
46
+ width: 80px;
47
+ word-wrap: break-word;
48
+ }
49
+ .files audio,
50
+ .files video {
51
+ max-width: 80px;
52
+ }
53
+ .files img,
54
+ .files canvas {
55
+ max-width: 100%;
56
+ }
57
+ }
@@ -0,0 +1,36 @@
1
+ @charset "UTF-8";
2
+ /*
3
+ * jQuery File Upload Plugin CSS 1.3.0
4
+ * https://github.com/blueimp/jQuery-File-Upload
5
+ *
6
+ * Copyright 2013, Sebastian Tschan
7
+ * https://blueimp.net
8
+ *
9
+ * Licensed under the MIT license:
10
+ * http://www.opensource.org/licenses/MIT
11
+ */
12
+
13
+ .fileinput-button {
14
+ position: relative;
15
+ overflow: hidden;
16
+ }
17
+ .fileinput-button input {
18
+ position: absolute;
19
+ top: 0;
20
+ right: 0;
21
+ margin: 0;
22
+ opacity: 0;
23
+ -ms-filter: 'alpha(opacity=0)';
24
+ font-size: 200px;
25
+ direction: ltr;
26
+ cursor: pointer;
27
+ }
28
+
29
+ /* Fixes for IE < 8 */
30
+ @media screen\9 {
31
+ .fileinput-button input {
32
+ filter: alpha(opacity=0);
33
+ font-size: 100%;
34
+ height: 100%;
35
+ }
36
+ }
@@ -0,0 +1,43 @@
1
+ <!-- The template to display files available for download -->
2
+ <script id="template-download" type="text/x-tmpl">
3
+ {% for (var i=0, file; file=o.files[i]; i++) { %}
4
+ <tr class="template-download fade">
5
+ <td>
6
+ <span class="preview">
7
+ {% if (file.thumbnail_url) { %}
8
+ <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnail_url%}"></a>
9
+ {% } %}
10
+ </span>
11
+ </td>
12
+ <td>
13
+ <p class="name">
14
+ {% if (file.url) { %}
15
+ <a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" {%=file.thumbnail_url?'data-gallery':''%}>{%=file.name%}</a>
16
+ {% } else { %}
17
+ <span>{%=file.name%}</span>
18
+ {% } %}
19
+ </p>
20
+ {% if (file.error) { %}
21
+ <div><span class="label label-danger"><%= t '.error' %></span> {%=file.error%}</div>
22
+ {% } %}
23
+ </td>
24
+ <td>
25
+ <span class="size">{%=o.formatFileSize(file.size)%}</span>
26
+ </td>
27
+ <td>
28
+ {% if (file.delete_url) { %}
29
+ <button class="btn btn-danger cancel delete" data-type="{%=file.delete_type%}" data-url="{%=file.delete_url%}"{% if (file.delete_with_credentials) { %} data-xhr-fields='{"with_credentials":true}'{% } %}>
30
+ <i class="glyphicon glyphicon-trash"></i>
31
+ <span><%= t '.delete' %></span>
32
+ </button>
33
+ <input type="checkbox" name="delete" value="1" class="toggle">
34
+ {% } else { %}
35
+ <button class="btn btn-warning cancel">
36
+ <i class="glyphicon glyphicon-ban-circle"></i>
37
+ <span><%= t '.cancel' %></span>
38
+ </button>
39
+ {% } %}
40
+ </td>
41
+ </tr>
42
+ {% } %}
43
+ </script>
@@ -0,0 +1,38 @@
1
+ / The file upload form used as target for the file upload widget
2
+ = form_for file, html: { multipart: true, class: 'fileupload' } do |f|
3
+ / The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload
4
+ .row.fileupload-buttonbar
5
+ .col-lg-7
6
+ / The fileinput-button span is used to style the file input field as button
7
+ span.btn.btn-success.fileinput-button
8
+ i.glyphicon.glyphicon-plus
9
+ span = t '.add_files'
10
+
11
+ - if defined?(as)
12
+ = f.file_field as, multiple: true
13
+ - else
14
+ = f.file_field :file, multiple: true
15
+ button.btn.btn-primary.start type='submit'
16
+ i.glyphicon.glyphicon-upload
17
+ span= t '.start'
18
+ button.btn.btn-warning.cancel type='reset'
19
+ i.glyphicon.glyphicon-ban-circle
20
+ span= t '.cancel'
21
+ button.btn.btn-danger.delete type='button'
22
+ i.glyphicon.glyphicon-trash
23
+ span= t '.delete'
24
+ input.toggle type='checkbox'
25
+
26
+ / The global file processing state
27
+ span.fileupload-process
28
+ / The global progress state
29
+ .col-lg-5.fileupload-progress.fade
30
+ / The global progress bar
31
+ .progress.progress-striped.active aria-valuemax='100' aria-valuemin='0' role='progressbar'
32
+ .progress-bar.progress-bar-success style='width:0;'
33
+
34
+ / The extended global progress state
35
+ .progress-extended &nbsp;
36
+ / The table listing the files available for upload/download
37
+ table.table.table-striped role='presentation'
38
+ tbody.files
@@ -0,0 +1,32 @@
1
+ <!-- The template to display files available for upload -->
2
+ <script id="template-upload" type="text/x-tmpl">
3
+ {% for (var i=0, file; file=o.files[i]; i++) { %}
4
+ <tr class="template-upload fade">
5
+ <td>
6
+ <span class="preview"></span>
7
+ </td>
8
+ <td>
9
+ <p class="name">{%=file.name%}</p>
10
+ <strong class="error text-danger"></strong>
11
+ </td>
12
+ <td>
13
+ <p class="size"><%= t '.processing' %></p>
14
+ <div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="progress-bar progress-bar-success" style="width:0%;"></div></div>
15
+ </td>
16
+ <td>
17
+ {% if (!i && !o.options.autoUpload) { %}
18
+ <button class="btn btn-primary start" disabled>
19
+ <i class="glyphicon glyphicon-upload"></i>
20
+ <span><%= t '.start' %></span>
21
+ </button>
22
+ {% } %}
23
+ {% if (!i) { %}
24
+ <button class="btn btn-warning cancel">
25
+ <i class="glyphicon glyphicon-ban-circle"></i>
26
+ <span><%= t '.cancel' %></span>
27
+ </button>
28
+ {% } %}
29
+ </td>
30
+ </tr>
31
+ {% } %}
32
+ </script>
@@ -0,0 +1,19 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'jquery-file-upload/version'
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = 'jquery-file-upload'
8
+ s.version = JqueryFileUpload::VERSION
9
+ s.date = '2015-01-07'
10
+ s.summary = "Gem based off Blueimp's of JQuery File Upload"
11
+ s.description = "A gem based off of Blueimp's Jquery File Upload. https://github.com/blueimp/jQuery-File-Upload"
12
+ s.authors = ["Michael Stephens"]
13
+ s.email = 'michael.stephens@biola.edu'
14
+ s.files = `git ls-files`.split($/)
15
+ s.homepage = 'http://rubygems.org/gems/jquery-file-upload'
16
+ s.license = 'MIT'
17
+
18
+ s.add_dependency "slim", "~> 2.0"
19
+ end
@@ -0,0 +1,13 @@
1
+ module JqueryFileUpload
2
+ class Configuration
3
+ attr_accessor :video_upload
4
+ attr_accessor :audio_upload
5
+ attr_accessor :angular_js
6
+
7
+ def initialize
8
+ @video_upload = false
9
+ @audio_upload = false
10
+ @angular_js = false
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,6 @@
1
+ module JqueryFileUpload
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,3 @@
1
+ module JqueryFileUpload
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,15 @@
1
+ require 'jquery-file-upload/engine' if defined?(::Rails)
2
+ require 'jquery-file-upload/version'
3
+ require 'slim'
4
+
5
+ module JqueryFileUpload
6
+ require 'jquery-file-upload/configuration'
7
+
8
+ def self.configure
9
+ yield config
10
+ end
11
+
12
+ def self.config
13
+ @config ||= Configuration.new
14
+ end
15
+ end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jquery-file-upload
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Michael Stephens
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-01-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: slim
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.0'
27
+ description: A gem based off of Blueimp's Jquery File Upload. https://github.com/blueimp/jQuery-File-Upload
28
+ email: michael.stephens@biola.edu
29
+ executables: []
30
+ extensions: []
31
+ extra_rdoc_files: []
32
+ files:
33
+ - ".gitignore"
34
+ - Gemfile
35
+ - LICENSE
36
+ - README.md
37
+ - app/assets/images/jquery-file-upload/loading.gif
38
+ - app/assets/images/jquery-file-upload/progressbar.gif
39
+ - app/assets/javascripts/jquery-file-upload.js.coffee
40
+ - app/assets/javascripts/jquery-file-upload/cors/jquery.postmessage-transport.js
41
+ - app/assets/javascripts/jquery-file-upload/cors/jquery.xdr-transport.js
42
+ - app/assets/javascripts/jquery-file-upload/jquery.fileupload-image.js
43
+ - app/assets/javascripts/jquery-file-upload/jquery.fileupload-jquery-ui.js
44
+ - app/assets/javascripts/jquery-file-upload/jquery.fileupload-process.js
45
+ - app/assets/javascripts/jquery-file-upload/jquery.fileupload-ui.js
46
+ - app/assets/javascripts/jquery-file-upload/jquery.fileupload-validate.js
47
+ - app/assets/javascripts/jquery-file-upload/jquery.fileupload.js
48
+ - app/assets/javascripts/jquery-file-upload/jquery.iframe-transport.js
49
+ - app/assets/javascripts/jquery-file-upload/vendor/jquery.ui.widget.js
50
+ - app/assets/javascripts/jquery.fileupload-angular.js
51
+ - app/assets/javascripts/jquery.fileupload-audio.js
52
+ - app/assets/javascripts/jquery.fileupload-video.js
53
+ - app/assets/stylesheets/jquery-file-upload/jquery.fileupload-noscript.css
54
+ - app/assets/stylesheets/jquery-file-upload/jquery.fileupload-ui-noscript.css
55
+ - app/assets/stylesheets/jquery-file-upload/jquery.fileupload-ui.css
56
+ - app/assets/stylesheets/jquery-file-upload/jquery.fileupload.css
57
+ - app/views/jquery-file-upload/basic_plus_ui/_download.html.erb
58
+ - app/views/jquery-file-upload/basic_plus_ui/_form.html.slim
59
+ - app/views/jquery-file-upload/basic_plus_ui/_upload.html.erb
60
+ - jquery-file-upload.gemspec
61
+ - lib/jquery-file-upload.rb
62
+ - lib/jquery-file-upload/configuration.rb
63
+ - lib/jquery-file-upload/engine.rb
64
+ - lib/jquery-file-upload/version.rb
65
+ homepage: http://rubygems.org/gems/jquery-file-upload
66
+ licenses:
67
+ - MIT
68
+ metadata: {}
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubyforge_project:
85
+ rubygems_version: 2.4.3
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: Gem based off Blueimp's of JQuery File Upload
89
+ test_files: []