mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
wip: upgrade fineuploader
This commit is contained in:
parent
b6289f03e3
commit
81887dd4f5
3 changed files with 7352 additions and 3648 deletions
|
@ -333,6 +333,7 @@ script(type='text/ng-template', id='newDocModalTemplate')
|
||||||
span(ng-hide="state.inflight") #{translate("create")}
|
span(ng-hide="state.inflight") #{translate("create")}
|
||||||
span(ng-show="state.inflight") #{translate("creating")}...
|
span(ng-show="state.inflight") #{translate("creating")}...
|
||||||
|
|
||||||
|
|
||||||
script(type='text/ng-template', id='newFolderModalTemplate')
|
script(type='text/ng-template', id='newFolderModalTemplate')
|
||||||
.modal-header
|
.modal-header
|
||||||
h3 #{translate("new_folder")}
|
h3 #{translate("new_folder")}
|
||||||
|
@ -363,6 +364,20 @@ script(type='text/ng-template', id='newFolderModalTemplate')
|
||||||
span(ng-hide="state.inflight") #{translate("create")}
|
span(ng-hide="state.inflight") #{translate("create")}
|
||||||
span(ng-show="state.inflight") #{translate("creating")}...
|
span(ng-show="state.inflight") #{translate("creating")}...
|
||||||
|
|
||||||
|
script(type='text/template', id='qq-uploader')
|
||||||
|
div woot
|
||||||
|
<div class="qq-uploader">
|
||||||
|
<div class="qq-upload-drop-area"><span>{dragZoneText}</span></div>
|
||||||
|
<div class="qq-upload-button btn btn-primary btn-lg">
|
||||||
|
<div>{uploadButtonText}</div>
|
||||||
|
</div>
|
||||||
|
<span class="or btn-lg"> or </span>
|
||||||
|
<span class="drag-here btn-lg">#{dragAreaText}</span>
|
||||||
|
<span class="qq-drop-processing"><span>{dropProcessingText}</span><span class="qq-drop-processing-spinner"></span></span>
|
||||||
|
<div class="small">#{hintText}</div>
|
||||||
|
<ul class="qq-upload-list"></ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
script(type="text/ng-template", id="uploadFileModalTemplate")
|
script(type="text/ng-template", id="uploadFileModalTemplate")
|
||||||
.modal-header
|
.modal-header
|
||||||
h3 #{translate("upload_files")}
|
h3 #{translate("upload_files")}
|
||||||
|
@ -404,6 +419,7 @@ script(type="text/ng-template", id="uploadFileModalTemplate")
|
||||||
.modal-footer
|
.modal-footer
|
||||||
button.btn.btn-default(ng-click="cancel()") #{translate("cancel")}
|
button.btn.btn-default(ng-click="cancel()") #{translate("cancel")}
|
||||||
|
|
||||||
|
|
||||||
script(type='text/ng-template', id='deleteEntityModalTemplate')
|
script(type='text/ng-template', id='deleteEntityModalTemplate')
|
||||||
.modal-header
|
.modal-header
|
||||||
h3 #{translate("delete")} {{ entity.name }}
|
h3 #{translate("delete")} {{ entity.name }}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
define [
|
define [
|
||||||
"base"
|
"base"
|
||||||
], (App) ->
|
"libs/fineuploader"
|
||||||
|
], (App, qq) ->
|
||||||
App.directive 'fineUpload', ($timeout) ->
|
App.directive 'fineUpload', ($timeout) ->
|
||||||
return {
|
return {
|
||||||
scope: {
|
scope: {
|
||||||
|
@ -23,6 +24,7 @@ define [
|
||||||
control: "="
|
control: "="
|
||||||
}
|
}
|
||||||
link: (scope, element, attrs) ->
|
link: (scope, element, attrs) ->
|
||||||
|
console.log ">> element", element
|
||||||
multiple = scope.multiple or false
|
multiple = scope.multiple or false
|
||||||
endpoint = scope.endpoint
|
endpoint = scope.endpoint
|
||||||
if scope.allowedExtensions?
|
if scope.allowedExtensions?
|
||||||
|
@ -70,19 +72,8 @@ define [
|
||||||
onSubmit: onSubmit
|
onSubmit: onSubmit
|
||||||
onCancel: onCancel
|
onCancel: onCancel
|
||||||
text: text
|
text: text
|
||||||
template: """
|
# template: "qq-uploader"
|
||||||
<div class="qq-uploader">
|
template: document.getElementById('qq-uploader')
|
||||||
<div class="qq-upload-drop-area"><span>{dragZoneText}</span></div>
|
|
||||||
<div class="qq-upload-button btn btn-primary btn-lg">
|
|
||||||
<div>{uploadButtonText}</div>
|
|
||||||
</div>
|
|
||||||
<span class="or btn-lg"> or </span>
|
|
||||||
<span class="drag-here btn-lg">#{dragAreaText}</span>
|
|
||||||
<span class="qq-drop-processing"><span>{dropProcessingText}</span><span class="qq-drop-processing-spinner"></span></span>
|
|
||||||
<div class="small">#{hintText}</div>
|
|
||||||
<ul class="qq-upload-list"></ul>
|
|
||||||
</div>
|
|
||||||
"""
|
|
||||||
window.q = q
|
window.q = q
|
||||||
scope.control?.q = q
|
scope.control?.q = q
|
||||||
return q
|
return q
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue