wip: upgrade fineuploader

This commit is contained in:
Shane Kilkelly 2017-11-20 14:43:13 +00:00
parent b6289f03e3
commit 81887dd4f5
3 changed files with 7352 additions and 3648 deletions

View file

@ -333,6 +333,7 @@ script(type='text/ng-template', id='newDocModalTemplate')
span(ng-hide="state.inflight") #{translate("create")}
span(ng-show="state.inflight") #{translate("creating")}...
script(type='text/ng-template', id='newFolderModalTemplate')
.modal-header
h3 #{translate("new_folder")}
@ -363,6 +364,20 @@ script(type='text/ng-template', id='newFolderModalTemplate')
span(ng-hide="state.inflight") #{translate("create")}
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")
.modal-header
h3 #{translate("upload_files")}
@ -404,6 +419,7 @@ script(type="text/ng-template", id="uploadFileModalTemplate")
.modal-footer
button.btn.btn-default(ng-click="cancel()") #{translate("cancel")}
script(type='text/ng-template', id='deleteEntityModalTemplate')
.modal-header
h3 #{translate("delete")} {{ entity.name }}

View file

@ -1,6 +1,7 @@
define [
"base"
], (App) ->
"libs/fineuploader"
], (App, qq) ->
App.directive 'fineUpload', ($timeout) ->
return {
scope: {
@ -23,6 +24,7 @@ define [
control: "="
}
link: (scope, element, attrs) ->
console.log ">> element", element
multiple = scope.multiple or false
endpoint = scope.endpoint
if scope.allowedExtensions?
@ -70,20 +72,9 @@ define [
onSubmit: onSubmit
onCancel: onCancel
text: text
template: """
<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>
"""
# template: "qq-uploader"
template: document.getElementById('qq-uploader')
window.q = q
scope.control?.q = q
return q
}
}

File diff suppressed because it is too large Load diff