mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-17 15:53:28 +00:00
[dir view] fileupload: added support for IE9
This commit is contained in:
@@ -309,7 +309,7 @@ define([
|
||||
var $popup = this.fileUploadView.$el;
|
||||
|
||||
if (app.pageOptions.enable_upload_folder) {
|
||||
if ('webkitdirectory' in $('#basic-upload-input')[0]) {
|
||||
if ('webkitdirectory' in $('.basic-upload-input')[0]) {
|
||||
this.$("#basic-upload").remove();
|
||||
this.$("#advanced-upload").show();
|
||||
this.upload_dropdown = new DropdownView({
|
||||
@@ -326,13 +326,13 @@ define([
|
||||
$popup.fileupload(
|
||||
'option',
|
||||
'fileInput',
|
||||
this.$('#basic-upload-input'));
|
||||
this.$('.basic-upload-input:eq(0)'));
|
||||
}
|
||||
} else {
|
||||
$popup.fileupload(
|
||||
'option',
|
||||
'fileInput',
|
||||
this.$('#basic-upload-input'));
|
||||
this.$('.basic-upload-input:eq(0)'));
|
||||
}
|
||||
},
|
||||
|
||||
@@ -629,7 +629,7 @@ define([
|
||||
},
|
||||
|
||||
uploadFile: function() {
|
||||
this.$('#basic-upload-input').trigger('click');
|
||||
this.$('.basic-upload-input').trigger('click');
|
||||
},
|
||||
|
||||
advancedUploadFile: function() {
|
||||
|
@@ -1,6 +1,7 @@
|
||||
define([
|
||||
'common',
|
||||
'backbone',
|
||||
'jquery.iframe-transport', // for IE 9
|
||||
'jquery.fileupload-ui'
|
||||
], function(Common, Backbone, FileUpload) {
|
||||
|
||||
@@ -342,7 +343,8 @@ define([
|
||||
}
|
||||
var path = dirents.path;
|
||||
path = path == '/' ? path : path + '/';
|
||||
if (data.formData.parent_dir != path) {
|
||||
var parent_dir = popup.fileupload('option','formData').parent_dir;
|
||||
if (parent_dir != path) {
|
||||
return;
|
||||
}
|
||||
if (!file_path) {
|
||||
@@ -479,7 +481,7 @@ define([
|
||||
popup.fileupload(
|
||||
'option',
|
||||
'redirect',
|
||||
window.location.href.replace(/\/repo\/[-a-z0-9]{36}\/.*/, app.config.mediaUrl + 'cors/result.html?%s')
|
||||
location.protocol + '//' + location.host + app.config.mediaUrl + 'cors/result.html?%s'
|
||||
);
|
||||
|
||||
},
|
||||
|
Reference in New Issue
Block a user