Merge pull request #12317 from nextcloud/deps/noid/es6-polyfill
Add es6-shim as polyfill and minify core vendor scripts
This commit is contained in:
commit
9eb5ab9e70
10 changed files with 116 additions and 4077 deletions
|
@ -905,7 +905,7 @@ describe('OCA.Files.FileList tests', function() {
|
|||
done();
|
||||
});
|
||||
});
|
||||
it('Restores thumbnail if a file could not be moved', function() {
|
||||
it('Restores thumbnail if a file could not be moved', function(done) {
|
||||
return fileList.move('One.txt', '/somedir').then(function(){
|
||||
|
||||
expect(fileList.findFileEl('One.txt').find('.thumbnail').parent().attr('class'))
|
||||
|
@ -922,6 +922,7 @@ describe('OCA.Files.FileList tests', function() {
|
|||
|
||||
expect(OC.TestUtil.getImageUrl(fileList.findFileEl('One.txt').find('.thumbnail')))
|
||||
.toEqual(OC.imagePath('core', 'filetypes/text.svg'));
|
||||
done();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -1766,7 +1767,12 @@ describe('OCA.Files.FileList tests', function() {
|
|||
});
|
||||
it('dropping files on breadcrumb calls move operation', function(done) {
|
||||
var testDir = '/subdir/two/three with space/four/five';
|
||||
var moveStub = sinon.stub(filesClient, 'move').returns($.Deferred().promise());
|
||||
var moveStub = sinon.stub(filesClient, 'move');
|
||||
var resolve1, resolve2;
|
||||
var deferredMove1 = $.Deferred();
|
||||
var deferredMove2 = $.Deferred();
|
||||
moveStub.onCall(0).returns(deferredMove1.promise());
|
||||
moveStub.onCall(1).returns(deferredMove2.promise());
|
||||
fileList.changeDirectory(testDir);
|
||||
deferredList.resolve(200, [testRoot].concat(testFiles));
|
||||
var $crumb = fileList.breadcrumb.$el.find('.crumb:eq(4)');
|
||||
|
@ -1782,8 +1788,7 @@ describe('OCA.Files.FileList tests', function() {
|
|||
$('<tr data-file="Two.jpg" data-dir="' + testDir + '"></tr>')
|
||||
]);
|
||||
// simulate drop event
|
||||
return fileList._onDropOnBreadCrumb(new $.Event('drop', {target: $crumb}), ui).then(function(){
|
||||
|
||||
var result = fileList._onDropOnBreadCrumb(new $.Event('drop', {target: $crumb}), ui).then(function(){
|
||||
expect(moveStub.callCount).toEqual(2);
|
||||
expect(moveStub.getCall(0).args[0]).toEqual(testDir + '/One.txt');
|
||||
expect(moveStub.getCall(0).args[1]).toEqual('/subdir/two/three with space/One.txt');
|
||||
|
@ -1792,6 +1797,9 @@ describe('OCA.Files.FileList tests', function() {
|
|||
moveStub.restore();
|
||||
done();
|
||||
});
|
||||
deferredMove1.resolve(201);
|
||||
deferredMove2.resolve(201);
|
||||
return result;
|
||||
});
|
||||
it('dropping files on same dir breadcrumb does nothing', function() {
|
||||
var testDir = '/subdir/two/three with space/four/five';
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
"bootstrap": "3.3.7",
|
||||
"clipboard": "1.7.1",
|
||||
"davclient.js": "https://github.com/evert/davclient.js.git#0.1.2",
|
||||
"es6-promise": "https://github.com/jakearchibald/es6-promise.git#2.3.0",
|
||||
"handlebars": "4.0.5",
|
||||
"jcrop": "0.9.12",
|
||||
"jquery": "2.1.4",
|
||||
|
@ -33,6 +32,7 @@
|
|||
"snapjs": "2.0.0-rc1",
|
||||
"strengthify": "0.5.5",
|
||||
"underscore": "1.8.3",
|
||||
"zxcvbn": "4.4.2"
|
||||
"zxcvbn": "4.4.2",
|
||||
"es6-shim": "^0.35.4"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,13 +3,13 @@
|
|||
"jquery/dist/jquery.min.js",
|
||||
"jquery-migrate/jquery-migrate.min.js",
|
||||
"jquery-ui/ui/minified/jquery-ui.custom.min.js",
|
||||
"underscore/underscore.js",
|
||||
"underscore/underscore-min.js",
|
||||
"moment/min/moment-with-locales.min.js",
|
||||
"handlebars/handlebars.min.js",
|
||||
"blueimp-md5/js/md5.min.js",
|
||||
"bootstrap/js/tooltip.js",
|
||||
"backbone/backbone.js",
|
||||
"es6-promise/dist/es6-promise.js",
|
||||
"es6-shim/es6-shim.min.js",
|
||||
"davclient.js/lib/client.js",
|
||||
"clipboard/dist/clipboard.min.js",
|
||||
"autosize/dist/autosize.min.js",
|
||||
|
|
14
core/vendor/.gitignore
vendored
14
core/vendor/.gitignore
vendored
|
@ -16,7 +16,7 @@ README*
|
|||
# underscore
|
||||
underscore/**
|
||||
!underscore/.bower.json
|
||||
!underscore/underscore.js
|
||||
!underscore/underscore-min.js
|
||||
!underscore/LICENSE
|
||||
|
||||
# blueimp-md5
|
||||
|
@ -135,13 +135,11 @@ davclient.js/**
|
|||
!davclient.js/lib/client.js
|
||||
!davclient.js/LICENSE
|
||||
|
||||
# es6-promise
|
||||
es6-promise/**
|
||||
!es6-promise/.bower.json
|
||||
!es6-promise/LICENSE
|
||||
!es6-promise/dist
|
||||
es6-promise/dist/*
|
||||
!es6-promise/dist/es6-promise.js
|
||||
# es6-shim
|
||||
es6-shim/**
|
||||
!es6-shim/.bower.json
|
||||
!es6-shim/LICENSE
|
||||
!es6-shim/es6-shim.min.js
|
||||
|
||||
# base64
|
||||
base64/*min.js
|
||||
|
|
2523
core/vendor/core.js
vendored
2523
core/vendor/core.js
vendored
File diff suppressed because one or more lines are too long
40
core/vendor/es6-shim/.bower.json
vendored
Normal file
40
core/vendor/es6-shim/.bower.json
vendored
Normal file
|
@ -0,0 +1,40 @@
|
|||
{
|
||||
"name": "es6-shim",
|
||||
"repo": "paulmillr/es6-shim",
|
||||
"description": "ECMAScript 6 (Harmony) compatibility shims for legacy JavaScript engines",
|
||||
"keywords": [
|
||||
"ecmascript",
|
||||
"harmony",
|
||||
"es6",
|
||||
"shim",
|
||||
"promise",
|
||||
"promises",
|
||||
"setPrototypeOf",
|
||||
"map",
|
||||
"set",
|
||||
"__proto__"
|
||||
],
|
||||
"main": "es6-shim.js",
|
||||
"scripts": [
|
||||
"es6-shim.js"
|
||||
],
|
||||
"dependencies": {},
|
||||
"development": {},
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"components",
|
||||
"test"
|
||||
],
|
||||
"homepage": "https://github.com/paulmillr/es6-shim",
|
||||
"version": "0.35.4",
|
||||
"_release": "0.35.4",
|
||||
"_resolution": {
|
||||
"type": "version",
|
||||
"tag": "0.35.4",
|
||||
"commit": "271142ca5c58b7bfec6970b1c070515da0d8ef98"
|
||||
},
|
||||
"_source": "https://github.com/paulmillr/es6-shim.git",
|
||||
"_target": "^0.35.4",
|
||||
"_originalSource": "es6-shim"
|
||||
}
|
26
core/vendor/es6-shim/LICENSE
vendored
Normal file
26
core/vendor/es6-shim/LICENSE
vendored
Normal file
|
@ -0,0 +1,26 @@
|
|||
The project was initially based on [es6-shim by Axel Rauschmayer](https://github.com/rauschma/es6-shim).
|
||||
|
||||
Current maintainers are: [Paul Miller](http://paulmillr.com), [Jordan Harband](https://github.com/ljharb), and [C. Scott Ananian](http://cscott.net).
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013-2016 Paul Miller (http://paulmillr.com) and contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
12
core/vendor/es6-shim/es6-shim.min.js
vendored
Normal file
12
core/vendor/es6-shim/es6-shim.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
6
core/vendor/underscore/underscore-min.js
vendored
Normal file
6
core/vendor/underscore/underscore-min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
1548
core/vendor/underscore/underscore.js
vendored
1548
core/vendor/underscore/underscore.js
vendored
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue