mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Remove Fine Uploader (#13637)
GitOrigin-RevId: e1e65160ad4a9c1d45a8f4a4a2e4c17730f9dda3
This commit is contained in:
parent
e89d65472f
commit
b2014601b2
11 changed files with 0 additions and 7771 deletions
|
@ -9,7 +9,6 @@ const ACE_VERSION = require('ace-builds/version')
|
||||||
const version = {
|
const version = {
|
||||||
// Upgrade instructions: https://github.com/overleaf/write_latex/wiki/Upgrading-Ace
|
// Upgrade instructions: https://github.com/overleaf/write_latex/wiki/Upgrading-Ace
|
||||||
ace: ACE_VERSION,
|
ace: ACE_VERSION,
|
||||||
fineuploader: '5.15.4',
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|
|
@ -255,49 +255,3 @@ script(type='text/ng-template', id='archiveTrashLeaveOrDeleteProjectsModalTempla
|
||||||
button.btn.btn-danger(
|
button.btn.btn-danger(
|
||||||
ng-click="confirm()"
|
ng-click="confirm()"
|
||||||
) #{translate("confirm")}
|
) #{translate("confirm")}
|
||||||
|
|
||||||
script(type="text/template", id="qq-project-uploader-template")
|
|
||||||
div.qq-uploader-selector
|
|
||||||
div(qq-hide-dropzone="").qq-upload-drop-area-selector.qq-upload-drop-area
|
|
||||||
span.qq-upload-drop-area-text-selector #{translate('drop_files_here_to_upload')}
|
|
||||||
div.qq-upload-button-selector.btn.btn-primary.btn-lg
|
|
||||||
div #{translate('select_a_zip_file')}
|
|
||||||
span.or.btn-lg #{translate('or')}
|
|
||||||
span.drag-here.btn-lg #{translate('drag_a_zip_file')}
|
|
||||||
ul.qq-upload-list-selector
|
|
||||||
li
|
|
||||||
div.qq-progress-bar-container-selector
|
|
||||||
div(
|
|
||||||
role="progressbar"
|
|
||||||
aria-valuenow="0"
|
|
||||||
aria-valuemin="0"
|
|
||||||
aria-valuemax="100"
|
|
||||||
class="qq-progress-bar-selector qq-progress-bar"
|
|
||||||
)
|
|
||||||
span.qq-upload-file-selector.qq-upload-file
|
|
||||||
span.qq-upload-size-selector.qq-upload-size
|
|
||||||
a(type="button").qq-btn.qq-upload-cancel-selector.qq-upload-cancel #{translate('cancel')}
|
|
||||||
button(type="button").qq-btn.qq-upload-retry-selector.qq-upload-retry #{translate('retry')}
|
|
||||||
span(role="status").qq-upload-status-text-selector.qq-upload-status-text
|
|
||||||
|
|
||||||
script(type="text/ng-template", id="uploadProjectModalTemplate")
|
|
||||||
.modal-header
|
|
||||||
button.close(
|
|
||||||
type="button"
|
|
||||||
data-dismiss="modal"
|
|
||||||
ng-click="cancel()"
|
|
||||||
aria-label="Close"
|
|
||||||
)
|
|
||||||
span(aria-hidden="true") ×
|
|
||||||
h3 #{translate("upload_zipped_project")}
|
|
||||||
.modal-body(
|
|
||||||
fine-upload
|
|
||||||
endpoint="/project/new/upload"
|
|
||||||
template-id="qq-project-uploader-template"
|
|
||||||
multiple="false"
|
|
||||||
size-limit=zipFileSizeLimit
|
|
||||||
allowed-extensions="['zip']"
|
|
||||||
on-complete-callback="onComplete"
|
|
||||||
)
|
|
||||||
.modal-footer
|
|
||||||
button.btn.btn-secondary(ng-click="cancel()") #{translate("cancel")}
|
|
||||||
|
|
|
@ -1,90 +0,0 @@
|
||||||
// TODO: This file was created by bulk-decaffeinate.
|
|
||||||
// Fix any style issues and re-enable lint.
|
|
||||||
/*
|
|
||||||
* decaffeinate suggestions:
|
|
||||||
* DS102: Remove unnecessary code created because of implicit returns
|
|
||||||
* DS207: Consider shorter variations of null checks
|
|
||||||
* Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
|
|
||||||
*/
|
|
||||||
import App from '../base'
|
|
||||||
import qq from 'fineuploader'
|
|
||||||
|
|
||||||
export default App.directive('fineUpload', $timeout => ({
|
|
||||||
scope: {
|
|
||||||
multiple: '=',
|
|
||||||
endpoint: '@',
|
|
||||||
templateId: '@',
|
|
||||||
sizeLimit: '@',
|
|
||||||
allowedExtensions: '=',
|
|
||||||
onCompleteCallback: '=',
|
|
||||||
onUploadCallback: '=',
|
|
||||||
onValidateBatch: '=',
|
|
||||||
onErrorCallback: '=',
|
|
||||||
onSubmitCallback: '=',
|
|
||||||
onCancelCallback: '=',
|
|
||||||
autoUpload: '=',
|
|
||||||
params: '=',
|
|
||||||
control: '=',
|
|
||||||
},
|
|
||||||
link(scope, element, attrs) {
|
|
||||||
let autoUpload, validation
|
|
||||||
const multiple = scope.multiple || false
|
|
||||||
const { endpoint } = scope
|
|
||||||
const { templateId } = scope
|
|
||||||
if (scope.allowedExtensions != null) {
|
|
||||||
validation = { allowedExtensions: scope.allowedExtensions }
|
|
||||||
} else {
|
|
||||||
validation = {}
|
|
||||||
}
|
|
||||||
if (scope.sizeLimit) {
|
|
||||||
validation.sizeLimit = scope.sizeLimit
|
|
||||||
}
|
|
||||||
const maxConnections = scope.maxConnections || 1
|
|
||||||
const onComplete = scope.onCompleteCallback || function () {}
|
|
||||||
const onUpload = scope.onUploadCallback || function () {}
|
|
||||||
const onError = scope.onErrorCallback || function () {}
|
|
||||||
const onValidateBatch = scope.onValidateBatch || function () {}
|
|
||||||
const onSubmit = scope.onSubmitCallback || function () {}
|
|
||||||
const onCancel = scope.onCancelCallback || function () {}
|
|
||||||
if (scope.autoUpload == null) {
|
|
||||||
autoUpload = true
|
|
||||||
} else {
|
|
||||||
;({ autoUpload } = scope)
|
|
||||||
}
|
|
||||||
const params = scope.params || {}
|
|
||||||
params._csrf = window.csrfToken
|
|
||||||
|
|
||||||
const q = new qq.FineUploader({
|
|
||||||
element: element[0],
|
|
||||||
multiple,
|
|
||||||
autoUpload,
|
|
||||||
disabledCancelForFormUploads: true,
|
|
||||||
validation,
|
|
||||||
maxConnections,
|
|
||||||
request: {
|
|
||||||
endpoint,
|
|
||||||
forceMultipart: true,
|
|
||||||
params,
|
|
||||||
paramsInBody: false,
|
|
||||||
},
|
|
||||||
callbacks: {
|
|
||||||
onComplete,
|
|
||||||
onUpload,
|
|
||||||
onValidateBatch,
|
|
||||||
onError,
|
|
||||||
onSubmit,
|
|
||||||
onCancel,
|
|
||||||
},
|
|
||||||
template: templateId,
|
|
||||||
failedUploadTextDisplay: {
|
|
||||||
mode: 'custom',
|
|
||||||
responseProperty: 'error',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
window.q = q
|
|
||||||
if (scope.control != null) {
|
|
||||||
scope.control.q = q
|
|
||||||
}
|
|
||||||
return q
|
|
||||||
},
|
|
||||||
}))
|
|
|
@ -42,7 +42,6 @@ import './ide/directives/validFile'
|
||||||
import './ide/directives/verticalResizablePanes'
|
import './ide/directives/verticalResizablePanes'
|
||||||
import './ide/services/ide'
|
import './ide/services/ide'
|
||||||
import './directives/focus'
|
import './directives/focus'
|
||||||
import './directives/fineUpload'
|
|
||||||
import './directives/scroll'
|
import './directives/scroll'
|
||||||
import './directives/onEnter'
|
import './directives/onEnter'
|
||||||
import './directives/stopPropagation'
|
import './directives/stopPropagation'
|
||||||
|
|
|
@ -30,7 +30,6 @@ import './directives/stopPropagation'
|
||||||
import './directives/focus'
|
import './directives/focus'
|
||||||
import './directives/equals'
|
import './directives/equals'
|
||||||
import './directives/eventTracking'
|
import './directives/eventTracking'
|
||||||
import './directives/fineUpload'
|
|
||||||
import './directives/onEnter'
|
import './directives/onEnter'
|
||||||
import './directives/selectAll'
|
import './directives/selectAll'
|
||||||
import './directives/maxHeight'
|
import './directives/maxHeight'
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -52,7 +52,6 @@
|
||||||
// @import "components/panels.less";
|
// @import "components/panels.less";
|
||||||
// @import "components/wells.less";
|
// @import "components/wells.less";
|
||||||
@import 'components/close.less';
|
@import 'components/close.less';
|
||||||
@import 'components/fineupload.less';
|
|
||||||
@import 'components/hover.less';
|
@import 'components/hover.less';
|
||||||
@import 'components/ui-select.less';
|
@import 'components/ui-select.less';
|
||||||
@import 'components/input-suggestions.less';
|
@import 'components/input-suggestions.less';
|
||||||
|
|
|
@ -1,167 +0,0 @@
|
||||||
/*
|
|
||||||
* Original version: 1.0 © 2010 Andrew Valums ( andrew(at)valums.com )
|
|
||||||
* Current Maintainer (2.0+): 2012, Ray Nicholus ( fineuploader(at)garstasio.com )
|
|
||||||
*
|
|
||||||
* Licensed under MIT license, GNU GPL 2 or later, GNU LGPL 2 or later, see license.txt.
|
|
||||||
*/
|
|
||||||
.qq-uploader-selector {
|
|
||||||
position: relative;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.qq-uploader-selector {
|
|
||||||
text-align: center;
|
|
||||||
border: 1px dashed #666;
|
|
||||||
border-radius: 6px;
|
|
||||||
vertical-align: middle;
|
|
||||||
.help {
|
|
||||||
margin-top: 6px;
|
|
||||||
}
|
|
||||||
min-height: 300px;
|
|
||||||
padding: 20px;
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
/*.qq-upload-button-selector {
|
|
||||||
display: block;
|
|
||||||
width: 105px;
|
|
||||||
padding: 7px 0;
|
|
||||||
text-align: center;
|
|
||||||
background: #880000;
|
|
||||||
border-bottom: 1px solid #DDD;
|
|
||||||
color: #FFF;
|
|
||||||
}
|
|
||||||
.qq-upload-button-hover-selector {
|
|
||||||
background: #CC0000;
|
|
||||||
}
|
|
||||||
.qq-upload-button-focus-selector {
|
|
||||||
outline: 1px dotted #000000;
|
|
||||||
}*/
|
|
||||||
.qq-upload-drop-area-selector,
|
|
||||||
.qq-upload-extra-drop-area-selector {
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
min-height: 30px;
|
|
||||||
z-index: 2;
|
|
||||||
background: @orange;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.qq-upload-drop-area-selector span {
|
|
||||||
display: block;
|
|
||||||
position: absolute;
|
|
||||||
top: 50%;
|
|
||||||
width: 100%;
|
|
||||||
margin-top: -12px;
|
|
||||||
font-size: 16px;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.qq-upload-extra-drop-area-selector {
|
|
||||||
position: relative;
|
|
||||||
margin-top: 50px;
|
|
||||||
font-size: 16px;
|
|
||||||
padding-top: 30px;
|
|
||||||
height: 20px;
|
|
||||||
min-height: 40px;
|
|
||||||
}
|
|
||||||
.qq-upload-drop-area-active-selector {
|
|
||||||
background: darken(@orange, 15%);
|
|
||||||
}
|
|
||||||
.qq-upload-list-selector {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
list-style: none;
|
|
||||||
}
|
|
||||||
.qq-upload-list-selector li {
|
|
||||||
margin: 0;
|
|
||||||
margin-top: 10px;
|
|
||||||
padding: 9px;
|
|
||||||
line-height: 15px;
|
|
||||||
font-size: 16px;
|
|
||||||
background-color: @gray-lightest;
|
|
||||||
}
|
|
||||||
.qq-upload-file-selector,
|
|
||||||
.qq-upload-spinner-selector,
|
|
||||||
.qq-upload-size-selector,
|
|
||||||
.qq-upload-cancel-selector,
|
|
||||||
.qq-upload-retry-selector,
|
|
||||||
.qq-upload-failed-text-selector,
|
|
||||||
.qq-upload-finished-selector,
|
|
||||||
.qq-upload-delete-selector {
|
|
||||||
margin-right: 12px;
|
|
||||||
}
|
|
||||||
.qq-upload-file-selector {
|
|
||||||
word-break: break-word;
|
|
||||||
}
|
|
||||||
.qq-upload-spinner-selector {
|
|
||||||
display: inline-block;
|
|
||||||
width: 15px;
|
|
||||||
height: 15px;
|
|
||||||
vertical-align: text-bottom;
|
|
||||||
}
|
|
||||||
.qq-upload-finished-selector {
|
|
||||||
display: none;
|
|
||||||
width: 15px;
|
|
||||||
height: 15px;
|
|
||||||
vertical-align: text-bottom;
|
|
||||||
}
|
|
||||||
.qq-upload-retry-selector,
|
|
||||||
.qq-upload-delete-selector {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.qq-upload-retryable-selector .qq-upload-retry-selector {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
.qq-upload-size-selector,
|
|
||||||
.qq-upload-cancel-selector,
|
|
||||||
.qq-upload-retry-selector,
|
|
||||||
.qq-upload-delete-selector {
|
|
||||||
font-size: 12px;
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
.qq-upload-failed-text-selector {
|
|
||||||
display: none;
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
.qq-upload-failed-icon-selector {
|
|
||||||
display: none;
|
|
||||||
width: 15px;
|
|
||||||
height: 15px;
|
|
||||||
vertical-align: text-bottom;
|
|
||||||
}
|
|
||||||
.qq-upload-fail-selector .qq-upload-failed-text-selector {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
.qq-upload-retrying-selector .qq-upload-failed-text-selector {
|
|
||||||
display: inline;
|
|
||||||
color: #d60000;
|
|
||||||
}
|
|
||||||
.qq-upload-list-selector li.qq-upload-success-selector {
|
|
||||||
background-color: @green;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
.qq-upload-list-selector li.qq-upload-fail-selector {
|
|
||||||
background-color: @red;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
.qq-progress-bar-selector {
|
|
||||||
width: 0%;
|
|
||||||
height: @line-height-computed;
|
|
||||||
margin-bottom: @line-height-computed / 2;
|
|
||||||
font-size: @font-size-small;
|
|
||||||
line-height: @line-height-computed;
|
|
||||||
color: @progress-bar-color;
|
|
||||||
text-align: center;
|
|
||||||
background-color: @progress-bar-info-bg;
|
|
||||||
.box-shadow(inset 0 -1px 0 rgba(0, 0, 0, 0.15));
|
|
||||||
.transition(width 0.6s ease);
|
|
||||||
border-radius: @border-radius-base 0 0 @border-radius-base;
|
|
||||||
}
|
|
||||||
a.qq-btn {
|
|
||||||
&:hover {
|
|
||||||
cursor: pointer !important;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -60,7 +60,6 @@
|
||||||
@import 'components/alerts.less';
|
@import 'components/alerts.less';
|
||||||
@import 'components/progress-bars.less';
|
@import 'components/progress-bars.less';
|
||||||
@import 'components/close.less';
|
@import 'components/close.less';
|
||||||
@import 'components/fineupload.less';
|
|
||||||
@import 'components/hover.less';
|
@import 'components/hover.less';
|
||||||
@import 'components/ui-select.less';
|
@import 'components/ui-select.less';
|
||||||
@import 'components/input-suggestions.less';
|
@import 'components/input-suggestions.less';
|
||||||
|
|
|
@ -374,7 +374,6 @@
|
||||||
"download_pdf": "Download PDF",
|
"download_pdf": "Download PDF",
|
||||||
"download_project_at_this_version": "Download project at this version",
|
"download_project_at_this_version": "Download project at this version",
|
||||||
"download_zip_file": "Download .zip File",
|
"download_zip_file": "Download .zip File",
|
||||||
"drag_a_zip_file": "drag a .zip file",
|
|
||||||
"drag_here": "drag here",
|
"drag_here": "drag here",
|
||||||
"drag_here_paste_an_image_or": "Drag here, paste an image, or ",
|
"drag_here_paste_an_image_or": "Drag here, paste an image, or ",
|
||||||
"drop_files_here_to_upload": "Drop files here to upload",
|
"drop_files_here_to_upload": "Drop files here to upload",
|
||||||
|
@ -1399,7 +1398,6 @@
|
||||||
"select_a_payment_method": "Select a payment method",
|
"select_a_payment_method": "Select a payment method",
|
||||||
"select_a_project": "Select a Project",
|
"select_a_project": "Select a Project",
|
||||||
"select_a_project_figure_modal": "Select a project",
|
"select_a_project_figure_modal": "Select a project",
|
||||||
"select_a_zip_file": "Select a .zip file",
|
|
||||||
"select_all": "Select all",
|
"select_all": "Select all",
|
||||||
"select_all_projects": "Select all projects",
|
"select_all_projects": "Select all projects",
|
||||||
"select_an_output_file": "Select an Output File",
|
"select_an_output_file": "Select an Output File",
|
||||||
|
|
|
@ -216,12 +216,6 @@ module.exports = {
|
||||||
|
|
||||||
// Enables ace/ace shortcut
|
// Enables ace/ace shortcut
|
||||||
ace: 'ace-builds/src-noconflict',
|
ace: 'ace-builds/src-noconflict',
|
||||||
// fineupload vendored dependency (which we're aliasing to fineuploadER
|
|
||||||
// for some reason)
|
|
||||||
fineuploader: path.join(
|
|
||||||
__dirname,
|
|
||||||
`frontend/js/vendor/libs/${PackageVersions.lib('fineuploader')}`
|
|
||||||
),
|
|
||||||
},
|
},
|
||||||
// symlinks: false, // enable this while using `npm link`
|
// symlinks: false, // enable this while using `npm link`
|
||||||
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
|
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
|
||||||
|
|
Loading…
Reference in a new issue