imagedrop 0.0.3 → 0.0.5
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.
- checksums.yaml +4 -4
 - data/CHANGELOG.md +7 -0
 - data/README.md +7 -4
 - data/app/assets/stylesheets/imagedrop.css.scss +1 -0
 - data/imagedrop.gemspec +1 -1
 - data/lib/imagedrop/version.rb +1 -1
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: c95393ec7d63585046b900f49766ac47e1f6e86d
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 2b34f10a507dc8f3f6d98f86986e3a5bad569c6a
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 00d0564182455f4a3cdfc430b8a3a19906aa8ced877ee876e202ec6f286acc1625c5f3b19d6927c2195c9d8918a1998a0b31bd2d31e21cff1feb7de146d12ee0
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 753858531b8e0128f4adecacad31b512e1471208d943c4e02149419f8dbe60fd093838562d1eb3199aecc85f44cb9d37b52b174f546c2f6d5c22384f7b9ac149
         
     | 
    
        data/CHANGELOG.md
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | 
         @@ -4,9 +4,12 @@ Good for avatars and such! 
     | 
|
| 
       4 
4 
     | 
    
         | 
| 
       5 
5 
     | 
    
         
             
            Transforms the lowly file input field into sophisticated looking drag-and-drop targets complete with a preview image and placeholder text.
         
     | 
| 
       6 
6 
     | 
    
         | 
| 
      
 7 
     | 
    
         
            +
            *  Home page: https://github.com/iamnan/imagedrop
         
     | 
| 
      
 8 
     | 
    
         
            +
            *  Demo: http://iamnan.github.io/imagedrop
         
     | 
| 
      
 9 
     | 
    
         
            +
             
     | 
| 
       7 
10 
     | 
    
         
             
            Actually, it's nothing fancy, but very effective. ImageDrop employs a little CSS trickery to change the  file input field into a drop zone.
         
     | 
| 
       8 
11 
     | 
    
         | 
| 
       9 
     | 
    
         
            -
            A tiny bit of javascript  
     | 
| 
      
 12 
     | 
    
         
            +
            A tiny bit of javascript validates the file type and generates the image preview by updating the the parent element's background-image with the image dropped on the input field.
         
     | 
| 
       10 
13 
     | 
    
         | 
| 
       11 
14 
     | 
    
         
             
            During dragging and dropping, another div (sibling to the input) is temporarily revealed to act as a placeholder. This is also done purely with CSS.
         
     | 
| 
       12 
15 
     | 
    
         | 
| 
         @@ -19,7 +22,7 @@ So the html structure in the form looks like this: 
     | 
|
| 
       19 
22 
     | 
    
         | 
| 
       20 
23 
     | 
    
         
             
            ## Requirements/Compatibility
         
     | 
| 
       21 
24 
     | 
    
         | 
| 
       22 
     | 
    
         
            -
            ImageDrop uses simple CSS that is compatible with all browsers back to IE8.  
     | 
| 
      
 25 
     | 
    
         
            +
            ImageDrop uses simple CSS that is compatible with all browsers back to IE8. (Create a github issue if you find I'm wrong about that.) It also uses the browser's FileReader API through javascript, and that is compatible with most everything. So, the requirements are:
         
     | 
| 
       23 
26 
     | 
    
         | 
| 
       24 
27 
     | 
    
         
             
            * Jquery (whatever version)
         
     | 
| 
       25 
28 
     | 
    
         
             
            * Uh, that's it...
         
     | 
| 
         @@ -27,9 +30,9 @@ ImageDrop uses simple CSS that is compatible with all browsers back to IE8. Corr 
     | 
|
| 
       27 
30 
     | 
    
         
             
            ## Features
         
     | 
| 
       28 
31 
     | 
    
         
             
            * It's small. (Just 989 characters of javascript.)
         
     | 
| 
       29 
32 
     | 
    
         
             
            * Works with a *lot* of browsers; [most browsers](http://caniuse.com/#search=FileReader) in fact.
         
     | 
| 
       30 
     | 
    
         
            -
            * Supports a live preview  
     | 
| 
      
 33 
     | 
    
         
            +
            * Supports a live image preview on the client-side, no bugging the server about it.
         
     | 
| 
       31 
34 
     | 
    
         
             
            * Supports placeholder text and/or images (for drag operations).
         
     | 
| 
       32 
     | 
    
         
            -
            * Validates the file type before bugging the server  
     | 
| 
      
 35 
     | 
    
         
            +
            * Validates the file type before on the client-side, no bugging the server about that either.
         
     | 
| 
       33 
36 
     | 
    
         
             
            * Can be integrated into any web framework, not just Rails although this gem is mostly for Rails.
         
     | 
| 
       34 
37 
     | 
    
         
             
            * Plays nice with Bootstrap.
         
     | 
| 
       35 
38 
     | 
    
         | 
    
        data/imagedrop.gemspec
    CHANGED
    
    | 
         @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| 
     | 
|
| 
       10 
10 
     | 
    
         
             
              spec.email         = ["dgerton@gmail.com"]
         
     | 
| 
       11 
11 
     | 
    
         
             
              spec.summary       = %q{Good for avatars and such!}
         
     | 
| 
       12 
12 
     | 
    
         
             
              spec.description   = %q{Transforms the lowly file input field into a sophisticated looking drag and drop target, complete with preview image and placeholder text.}
         
     | 
| 
       13 
     | 
    
         
            -
              spec.homepage      = " 
     | 
| 
      
 13 
     | 
    
         
            +
              spec.homepage      = "http://iamnan.github.io/imagedrop"
         
     | 
| 
       14 
14 
     | 
    
         
             
              spec.license       = "MIT"
         
     | 
| 
       15 
15 
     | 
    
         | 
| 
       16 
16 
     | 
    
         
             
              spec.files         = `git ls-files -z`.split("\x0")
         
     | 
    
        data/lib/imagedrop/version.rb
    CHANGED
    
    
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: imagedrop
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.5
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Dave Gerton
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2014-10- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2014-10-26 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: bundler
         
     | 
| 
         @@ -59,7 +59,7 @@ files: 
     | 
|
| 
       59 
59 
     | 
    
         
             
            - lib/imagedrop.rb
         
     | 
| 
       60 
60 
     | 
    
         
             
            - lib/imagedrop/engine.rb
         
     | 
| 
       61 
61 
     | 
    
         
             
            - lib/imagedrop/version.rb
         
     | 
| 
       62 
     | 
    
         
            -
            homepage:  
     | 
| 
      
 62 
     | 
    
         
            +
            homepage: http://iamnan.github.io/imagedrop
         
     | 
| 
       63 
63 
     | 
    
         
             
            licenses:
         
     | 
| 
       64 
64 
     | 
    
         
             
            - MIT
         
     | 
| 
       65 
65 
     | 
    
         
             
            metadata: {}
         
     |