Commit 4afda984 by Tom Giannattasio

fixed multiple file picker bug; removed 'fakepath' from uploading file name

parent cf4f1118
...@@ -431,7 +431,6 @@ function showUploadModal(e) { ...@@ -431,7 +431,6 @@ function showUploadModal(e) {
e.preventDefault(); e.preventDefault();
$modal = $('.upload-modal').show(); $modal = $('.upload-modal').show();
$('.file-input').bind('change', startUpload); $('.file-input').bind('change', startUpload);
$('.upload-modal .choose-file-button').bind('click', showFileSelectionMenu);
$modalCover.show(); $modalCover.show();
} }
...@@ -442,7 +441,7 @@ function showFileSelectionMenu(e) { ...@@ -442,7 +441,7 @@ function showFileSelectionMenu(e) {
function startUpload(e) { function startUpload(e) {
$('.upload-modal h1').html('Uploading…'); $('.upload-modal h1').html('Uploading…');
$('.upload-modal .file-name').html($('.file-input').val()); $('.upload-modal .file-name').html($('.file-input').val().replace(/.+\\/g, ''));
$('.upload-modal .file-chooser').ajaxSubmit({ $('.upload-modal .file-chooser').ajaxSubmit({
beforeSend: resetUploadBar, beforeSend: resetUploadBar,
uploadProgress: showUploadFeedback, uploadProgress: showUploadFeedback,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment