GithubHelp home page GithubHelp logo

jQuery event arguments about filedrop HOT 5 CLOSED

progerxp avatar progerxp commented on June 2, 2024
jQuery event arguments

from filedrop.

Comments (5)

ProgerXP avatar ProgerXP commented on June 2, 2024

jQuery puts its own event object in front of all arguments when it calls DOM listeners so you can add e before every argument of FileDrop's own events. Normally you'd just ignore it, it's not useful.

Right now FileDrop has been rewritten and expanded with HTML5 support. Here's the demo if you feel like taking a look.

from filedrop.

nickmay avatar nickmay commented on June 2, 2024

This is fabulous!

Many thanks… You really should put a tip box somewhere on your site. I have sweated blood trying to roll my own file upload system...

3 thoughts/questions.

1: I still can’t turn off logging when using the jQuery interface. I tried this...

var options = {logging:false, iframe: {url: 'upload.php'}};

but it doesn’t seem to work….

2: file.SendTo (old jQuery example on https://github.com/ProgerXP/FileDrop) has been re-capitalised to file.sendTo (your new code). That is a very minor thing, but it stops the new code from “just working” with existing implementations. It is going to generate support requests / confusion. If you add a note to your new page explaining the change, people will know to update their code.

3: Using a class and doing something like this isn’t going to cause problems is it?

$('.dropbox').each(function(){

var upload_parameter = something unique to this instance...
var el      =$(this);
el.filedrop({logging:log,iframe:{force:force_iframe,url:send_url}})
.on() …etc
.on() …etc

})

Many thanks!

Nick

from filedrop.

ProgerXP avatar ProgerXP commented on June 2, 2024

still can’t turn off logging when using the jQuery interface.

Logging is global, you have to set window.fd.logging = false before/after FileDrop.js has loaded.

That is a very minor thing, but it stops the new code from “just working” with existing implementations.

There are multiple changes that prevent new FileDrop from working seamlessly with old scripts. I'm planning on writing separate compatibility layer for v1 but if you're writing a new project/could update your old code this is the way to go. Overall I made properties more standardized (zone -> el, camelCase capitalization, etc.).

And I will surely update my page and write the migration guide, don't forget FD2 isn't yet released.

Using a class and doing something like this isn’t going to cause problems is it?

Yes, should be fine.

p.s: I've renamed your ticket to better match the thread. Please don't mind.

from filedrop.

nickmay avatar nickmay commented on June 2, 2024

Understood. I know the docs are not yet complete - if I can help with testing, on either Mac Safari or iOS, let me know.

from filedrop.

ProgerXP avatar ProgerXP commented on June 2, 2024

if I can help with testing, on either Mac Safari or iOS, let me know.

This would be awesome. For starter you can just run the new demo I've linked to above and see if all samples work. If not tell me which are failing, I will check them out. So far I've only tested FD2 in Firefox and Chrome; the latter fails on some uploads.

When I'm near release I will drop you a line to do more thorough testing. Thanks!

from filedrop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.