Skip to content
This repository was archived by the owner on May 25, 2023. It is now read-only.

Commit aa33192

Browse files
committed
fn.fileupload undefined: use ESM import.
1 parent 0e92a4d commit aa33192

8 files changed

+26
-260
lines changed

js/jquery.fileupload-audio.js

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,6 @@
1-
/*
2-
* jQuery File Upload Audio Preview Plugin
3-
* https://github.com/blueimp/jQuery-File-Upload
4-
*
5-
* Copyright 2013, Sebastian Tschan
6-
* https://blueimp.net
7-
*
8-
* Licensed under the MIT license:
9-
* https://opensource.org/licenses/MIT
10-
*/
11-
12-
/* global define, require */
13-
14-
(function (factory) {
15-
'use strict';
16-
if (typeof define === 'function' && define.amd) {
17-
// Register as an anonymous AMD module:
18-
define(['jquery', 'load-image', './jquery.fileupload-process'], factory);
19-
} else if (typeof exports === 'object') {
20-
// Node/CommonJS:
21-
factory(
22-
require('jquery'),
23-
require('blueimp-load-image/js/load-image'),
24-
require('./jquery.fileupload-process')
25-
);
26-
} else {
27-
// Browser globals:
28-
factory(window.jQuery, window.loadImage);
29-
}
30-
})(function ($, loadImage) {
31-
'use strict';
1+
import 'jquery';
2+
// require('blueimp-load-image/js/load-image'),
3+
import './jquery.fileupload-process';
324

335
// Prepend to the default processQueue:
346
$.blueimp.fileupload.prototype.options.processQueue.unshift(
@@ -98,4 +70,3 @@
9870
}
9971
}
10072
});
101-
});

js/jquery.fileupload-image.js

Lines changed: 8 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,11 @@
1-
/*
2-
* jQuery File Upload Image Preview & Resize Plugin
3-
* https://github.com/blueimp/jQuery-File-Upload
4-
*
5-
* Copyright 2013, Sebastian Tschan
6-
* https://blueimp.net
7-
*
8-
* Licensed under the MIT license:
9-
* https://opensource.org/licenses/MIT
10-
*/
11-
12-
/* global define, require */
13-
14-
(function (factory) {
15-
'use strict';
16-
if (typeof define === 'function' && define.amd) {
17-
// Register as an anonymous AMD module:
18-
define([
19-
'jquery',
20-
'load-image',
21-
'load-image-meta',
22-
'load-image-scale',
23-
'load-image-exif',
24-
'load-image-orientation',
25-
'canvas-to-blob',
26-
'./jquery.fileupload-process'
27-
], factory);
28-
} else if (typeof exports === 'object') {
29-
// Node/CommonJS:
30-
factory(
31-
require('jquery'),
32-
require('blueimp-load-image/js/load-image'),
33-
require('blueimp-load-image/js/load-image-meta'),
34-
require('blueimp-load-image/js/load-image-scale'),
35-
require('blueimp-load-image/js/load-image-exif'),
36-
require('blueimp-load-image/js/load-image-orientation'),
37-
require('blueimp-canvas-to-blob'),
38-
require('./jquery.fileupload-process')
39-
);
40-
} else {
41-
// Browser globals:
42-
factory(window.jQuery, window.loadImage);
43-
}
44-
})(function ($, loadImage) {
45-
'use strict';
1+
import 'jquery';
2+
import 'blueimp-load-image/js/load-image';
3+
import 'blueimp-load-image/js/load-image-meta';
4+
import 'blueimp-load-image/js/load-image-scale';
5+
import 'blueimp-load-image/js/load-image-exif';
6+
import 'blueimp-load-image/js/load-image-orientation';
7+
import 'blueimp-canvas-to-blob';
8+
import './jquery.fileupload-process';
469

4710
// Prepend to the default processQueue:
4811
$.blueimp.fileupload.prototype.options.processQueue.unshift(
@@ -344,4 +307,3 @@
344307
}
345308
}
346309
});
347-
});

js/jquery.fileupload-ui.js

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,9 @@
1-
/*
2-
* jQuery File Upload User Interface Plugin
3-
* https://github.com/blueimp/jQuery-File-Upload
4-
*
5-
* Copyright 2010, Sebastian Tschan
6-
* https://blueimp.net
7-
*
8-
* Licensed under the MIT license:
9-
* https://opensource.org/licenses/MIT
10-
*/
11-
12-
/* global define, require */
13-
14-
(function (factory) {
15-
'use strict';
16-
if (typeof define === 'function' && define.amd) {
17-
// Register as an anonymous AMD module:
18-
define([
19-
'jquery',
20-
'blueimp-tmpl',
21-
'./jquery.fileupload-image',
22-
'./jquery.fileupload-audio',
23-
'./jquery.fileupload-video',
24-
'./jquery.fileupload-validate'
25-
], factory);
26-
} else if (typeof exports === 'object') {
27-
// Node/CommonJS:
28-
factory(
29-
require('jquery'),
30-
require('blueimp-tmpl'),
31-
require('./jquery.fileupload-image'),
32-
require('./jquery.fileupload-audio'),
33-
require('./jquery.fileupload-video'),
34-
require('./jquery.fileupload-validate')
35-
);
36-
} else {
37-
// Browser globals:
38-
factory(window.jQuery, window.tmpl);
39-
}
40-
})(function ($, tmpl) {
41-
'use strict';
1+
import 'jquery'
2+
import 'blueimp-tmpl'
3+
import './jquery.fileupload-image'
4+
import './jquery.fileupload-audio'
5+
import './jquery.fileupload-video'
6+
import './jquery.fileupload-validate';
427

438
$.blueimp.fileupload.prototype._specialOptions.push(
449
'filesContainer',
@@ -756,4 +721,3 @@
756721
this._super();
757722
}
758723
});
759-
});

js/jquery.fileupload-validate.js

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,5 @@
1-
/*
2-
* jQuery File Upload Validation Plugin
3-
* https://github.com/blueimp/jQuery-File-Upload
4-
*
5-
* Copyright 2013, Sebastian Tschan
6-
* https://blueimp.net
7-
*
8-
* Licensed under the MIT license:
9-
* https://opensource.org/licenses/MIT
10-
*/
11-
12-
/* global define, require */
13-
14-
(function (factory) {
15-
'use strict';
16-
if (typeof define === 'function' && define.amd) {
17-
// Register as an anonymous AMD module:
18-
define(['jquery', './jquery.fileupload-process'], factory);
19-
} else if (typeof exports === 'object') {
20-
// Node/CommonJS:
21-
factory(require('jquery'), require('./jquery.fileupload-process'));
22-
} else {
23-
// Browser globals:
24-
factory(window.jQuery);
25-
}
26-
})(function ($) {
27-
'use strict';
1+
import 'jquery';
2+
import './jquery.fileupload-process';
283

294
// Append to the default processQueue:
305
$.blueimp.fileupload.prototype.options.processQueue.push({
@@ -116,4 +91,3 @@
11691
}
11792
}
11893
});
119-
});

js/jquery.fileupload-video.js

Lines changed: 3 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,6 @@
1-
/*
2-
* jQuery File Upload Video Preview Plugin
3-
* https://github.com/blueimp/jQuery-File-Upload
4-
*
5-
* Copyright 2013, Sebastian Tschan
6-
* https://blueimp.net
7-
*
8-
* Licensed under the MIT license:
9-
* https://opensource.org/licenses/MIT
10-
*/
11-
12-
/* global define, require */
13-
14-
(function (factory) {
15-
'use strict';
16-
if (typeof define === 'function' && define.amd) {
17-
// Register as an anonymous AMD module:
18-
define(['jquery', 'load-image', './jquery.fileupload-process'], factory);
19-
} else if (typeof exports === 'object') {
20-
// Node/CommonJS:
21-
factory(
22-
require('jquery'),
23-
require('blueimp-load-image/js/load-image'),
24-
require('./jquery.fileupload-process')
25-
);
26-
} else {
27-
// Browser globals:
28-
factory(window.jQuery, window.loadImage);
29-
}
30-
})(function ($, loadImage) {
31-
'use strict';
1+
import 'jquery';
2+
import 'blueimp-load-image/js/load-image';
3+
import './jquery.fileupload-process';
324

335
// Prepend to the default processQueue:
346
$.blueimp.fileupload.prototype.options.processQueue.unshift(
@@ -98,4 +70,3 @@
9870
}
9971
}
10072
});
101-
});

js/jquery.fileupload.js

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,5 @@
1-
/*
2-
* jQuery File Upload Plugin
3-
* https://github.com/blueimp/jQuery-File-Upload
4-
*
5-
* Copyright 2010, Sebastian Tschan
6-
* https://blueimp.net
7-
*
8-
* Licensed under the MIT license:
9-
* https://opensource.org/licenses/MIT
10-
*/
11-
12-
/* global define, require */
13-
/* eslint-disable new-cap */
14-
15-
(function (factory) {
16-
'use strict';
17-
if (typeof define === 'function' && define.amd) {
18-
// Register as an anonymous AMD module:
19-
define(['jquery', 'jquery-ui/ui/widget'], factory);
20-
} else if (typeof exports === 'object') {
21-
// Node/CommonJS:
22-
factory(require('jquery'), require('./vendor/jquery.ui.widget'));
23-
} else {
24-
// Browser globals:
25-
factory(window.jQuery);
26-
}
27-
})(function ($) {
28-
'use strict';
1+
import $ from 'jquery';
2+
import './vendor/jquery.ui.widget';
293

304
// Detect file input support, based on
315
// https://viljamis.com/2012/file-upload-support-on-mobile/
@@ -1601,4 +1575,3 @@
16011575
return this._getXHRPromise(false, data && data.context);
16021576
}
16031577
});
1604-
});

js/jquery.iframe-transport.js

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,4 @@
1-
/*
2-
* jQuery Iframe Transport Plugin
3-
* https://github.com/blueimp/jQuery-File-Upload
4-
*
5-
* Copyright 2011, Sebastian Tschan
6-
* https://blueimp.net
7-
*
8-
* Licensed under the MIT license:
9-
* https://opensource.org/licenses/MIT
10-
*/
11-
12-
/* global define, require */
13-
14-
(function (factory) {
15-
'use strict';
16-
if (typeof define === 'function' && define.amd) {
17-
// Register as an anonymous AMD module:
18-
define(['jquery'], factory);
19-
} else if (typeof exports === 'object') {
20-
// Node/CommonJS:
21-
factory(require('jquery'));
22-
} else {
23-
// Browser globals:
24-
factory(window.jQuery);
25-
}
26-
})(function ($) {
27-
'use strict';
1+
import 'jquery';
282

293
// Helper variable to create unique names for the transport iframes:
304
var counter = 0,
@@ -224,4 +198,3 @@
224198
}
225199
}
226200
});
227-
});

js/vendor/jquery.ui.widget.js

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,4 @@
1-
/*! jQuery UI - v1.12.1+0b7246b6eeadfa9e2696e22f3230f6452f8129dc - 2020-02-20
2-
* http://jqueryui.com
3-
* Includes: widget.js
4-
* Copyright jQuery Foundation and other contributors; Licensed MIT */
5-
6-
/* global define, require */
7-
/* eslint-disable no-param-reassign, new-cap, jsdoc/require-jsdoc */
8-
9-
(function (factory) {
10-
'use strict';
11-
if (typeof define === 'function' && define.amd) {
12-
// AMD. Register as an anonymous module.
13-
define(['jquery'], factory);
14-
} else if (typeof exports === 'object') {
15-
// Node/CommonJS
16-
factory(require('jquery'));
17-
} else {
18-
// Browser globals
19-
factory(window.jQuery);
20-
}
21-
})(function ($) {
22-
('use strict');
1+
import $ from 'jquery';
232

243
$.ui = $.ui || {};
254

@@ -802,4 +781,3 @@
802781
}
803782
};
804783
});
805-
});

0 commit comments

Comments
 (0)