Include angular-file-upload and add a fix for its dragleave issue
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
@@ -47,12 +47,14 @@ import angularuiselect from 'ui-select';
|
||||
import ngsortable from 'ng-sortable';
|
||||
import md from 'angular-markdown-it';
|
||||
import nganimate from 'angular-animate';
|
||||
import 'angular-file-upload';
|
||||
|
||||
var app = angular.module('Deck', [
|
||||
ngsanitize,
|
||||
uirouter,
|
||||
angularuiselect,
|
||||
ngsortable, md, nganimate
|
||||
ngsortable, md, nganimate,
|
||||
'angularFileUpload'
|
||||
]);
|
||||
|
||||
export default app;
|
||||
|
||||
@@ -82,4 +82,22 @@ app.config(function ($provide, $interpolateProvider, $httpProvider, $urlRouterPr
|
||||
}
|
||||
});
|
||||
|
||||
$provide.decorator('nvFileOverDirective', function ($delegate) {
|
||||
var directive = $delegate[0],
|
||||
link = directive.link;
|
||||
|
||||
directive.compile = function () {
|
||||
return function (scope, element, attrs) {
|
||||
var overClass = attrs.overClass || 'nv-file-over';
|
||||
link.apply(this, arguments);
|
||||
element.on('dragleave', function (event) {
|
||||
element.removeClass(overClass);
|
||||
event.stopPropagation();
|
||||
});
|
||||
};
|
||||
};
|
||||
|
||||
return $delegate;
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
5
js/package-lock.json
generated
5
js/package-lock.json
generated
@@ -405,6 +405,11 @@
|
||||
"resolved": "https://registry.npmjs.org/angular-animate/-/angular-animate-1.7.2.tgz",
|
||||
"integrity": "sha512-/MQL2FEFXhdzFUKJ9AJq6gAYz3YGsh2xHTztuQKY5FkqjEBpF5YGypgprTz153P7t51T8nFqLsG8jwkpRdM6gg=="
|
||||
},
|
||||
"angular-file-upload": {
|
||||
"version": "2.5.0",
|
||||
"resolved": "https://registry.npmjs.org/angular-file-upload/-/angular-file-upload-2.5.0.tgz",
|
||||
"integrity": "sha1-D1PJP7xw7YuoNAqaKJumS2gOIWc="
|
||||
},
|
||||
"angular-markdown-it": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/angular-markdown-it/-/angular-markdown-it-0.6.1.tgz",
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
"dependencies": {
|
||||
"angular": "^1.7.1",
|
||||
"angular-animate": "^1.7.2",
|
||||
"angular-file-upload": "^2.5.0",
|
||||
"angular-markdown-it": "^0.6.1",
|
||||
"angular-sanitize": "^1.7.2",
|
||||
"markdown-it": "^8.4.1",
|
||||
|
||||
Reference in New Issue
Block a user