Skip to content

Commit

Permalink
add license reference to source file
Browse files Browse the repository at this point in the history
  • Loading branch information
rikschennink committed Mar 19, 2018
1 parent 7263079 commit ed87d6b
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 19 deletions.
2 changes: 1 addition & 1 deletion LICENSE
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2018 pqina
Copyright (c) 2018 PQINA | Rik Schennik <rik@pqina.nl>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
41 changes: 23 additions & 18 deletions filepond.jquery.js
@@ -1,15 +1,20 @@
(function($, FilePond){
/*
* jQuery FilePond 1.0.0
* Licensed under MIT, https://opensource.org/licenses/MIT
* Please visit https://pqina.nl/filepond for details.
*/
(function ($, FilePond) {
'use strict';

// No jQuery No Go
if (!$ || !FilePond) {
return;
}

// Test if FilePond is supported
if (!FilePond.supported()) {
// add stub
$.fn.filepond = function() {};
$.fn.filepond = function () { };
return;
}

Expand All @@ -22,22 +27,22 @@
return !args.length || typeof args[0] === 'object';
}

function isGetter(obj, key) {
var descriptor = Object.getOwnPropertyDescriptor(obj, key);
return descriptor ? typeof descriptor.get !== 'undefined' : false;
}
function isGetter(obj, key) {
var descriptor = Object.getOwnPropertyDescriptor(obj, key);
return descriptor ? typeof descriptor.get !== 'undefined' : false;
}

function isSetter(obj, key) {
var descriptor = Object.getOwnPropertyDescriptor(obj, key);
return descriptor ? typeof descriptor.set !== 'undefined' : false;
}
function isSetter(obj, key) {
var descriptor = Object.getOwnPropertyDescriptor(obj, key);
return descriptor ? typeof descriptor.set !== 'undefined' : false;
}

function isMethod(obj, key) {
return typeof obj[key] === 'function';
}
function isMethod(obj, key) {
return typeof obj[key] === 'function';
}

// Setup plugin
$.fn.filepond = function() {
$.fn.filepond = function () {

// get arguments as array
var args = argsToArray(arguments);
Expand All @@ -46,14 +51,14 @@
var results = [];

// Execute for every item in the list
var items = this.each(function() {
var items = this.each(function () {

// test if is create call
if (isFactory(args)) {
FilePond.create(this, args[0])
return;
}

// get a reference to the pond instance based on the element
var pond = FilePond.find(this);

Expand Down Expand Up @@ -94,7 +99,7 @@
};

// Static API
Object.keys(FilePond).forEach(function(key) {
Object.keys(FilePond).forEach(function (key) {
$.fn.filepond[key] = FilePond[key];
});

Expand Down

0 comments on commit ed87d6b

Please sign in to comment.