提交 849927ea 编写于 作者: C Catouse

* fix upload dnd not work in ie.

上级 13bf2dda
...@@ -211,9 +211,15 @@ ...@@ -211,9 +211,15 @@
$this.addClass('file-dragable'); $this.addClass('file-dragable');
}); });
$dropElement.on('dragleave.' + NAME + ' drop.' + NAME, function(e) { $dropElement.on('dragleave.' + NAME + ' drop.' + NAME, function(e) {
$this.removeClass('file-drag-enter'); $this.removeClass('file-drag-enter').removeClass('file-dragable');
e.preventDefault();
e.stopPropagation();
}).on('dragover.' + NAME + ' dragenter.' + NAME, function(e) { }).on('dragover.' + NAME + ' dragenter.' + NAME, function(e) {
$this.addClass('file-drag-enter'); $this.addClass('file-drag-enter');
}).on('dragdrop.' + NAME + ' dragenter.' + NAME, function(e) {
$this.removeClass('file-drag-enter').removeClass('file-dragable');
e.preventDefault();
e.stopPropagation();
}); });
$list.on('click.' + NAME, '.btn-delete-file', function() { $list.on('click.' + NAME, '.btn-delete-file', function() {
...@@ -900,4 +906,3 @@ ...@@ -900,4 +906,3 @@
$('[data-ride="uploader"]').uploader(); $('[data-ride="uploader"]').uploader();
}); });
}(jQuery, window, plupload, moxie, undefined)); }(jQuery, window, plupload, moxie, undefined));
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
.file-dragable {position: relative} .file-dragable {position: relative}
[data-drop-placeholder]:before { [data-drop-placeholder]:before {
content: attr(data-drop-placeholder); content: attr(data-drop-placeholder);
display: block;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
...@@ -38,7 +39,7 @@ ...@@ -38,7 +39,7 @@
height: 100%; height: 100%;
border: 2px dashed @color-warning; border: 2px dashed @color-warning;
background-color: fade(@color-warning-pale, 50%); background-color: fade(@color-warning-pale, 50%);
z-index: 10; z-index: 100;
font-size: 16px; font-size: 16px;
transition: all @animation-speed-fast; transition: all @animation-speed-fast;
text-align: center; text-align: center;
...@@ -52,11 +53,15 @@ ...@@ -52,11 +53,15 @@
.file-dragable[data-drop-placeholder]:before { .file-dragable[data-drop-placeholder]:before {
.opacity(1); .opacity(1);
transform: scale(1); transform: scale(1);
.ie & {display: block!important; display: flex!important}
} }
.file-drag-enter[data-drop-placeholder]:before { .file-drag-enter[data-drop-placeholder]:before {
border-style: solid; border-style: solid;
background-color: @color-warning-pale; background-color: @color-warning-pale;
} }
.ie .file-drag-enter.file-dragable > .uploader-message {
pointer-events: none;
}
// File list // File list
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册