This commit is contained in:
Renée Kooi 2019-04-08 16:08:04 +02:00
parent 11cb650401
commit 0fa68aab9d
No known key found for this signature in database
GPG key ID: 8CDD5F0BC448F040
5 changed files with 22 additions and 2 deletions

View file

@ -85,6 +85,10 @@
<span class="error"></span>
</form>
<hr>
<h2>transloadit.dashboard()</h2>
<p id="dashboard">
<hr>
<h2>transloadit.pick()</h2>

View file

@ -48,6 +48,17 @@ const formUppyWithDashboard = transloadit.form('#dashboard-form', {
window.formUppyWithDashboard = formUppyWithDashboard
const dashboard = transloadit.dashboard('#dashboard', {
debug: true,
waitForEncoding: true,
params: {
auth: { key: '05a61ed019fe11e783fdbd1f56c73eb0' },
template_id: 'be001500a56011e889f9cddd88df842c'
}
})
window.dashboard = dashboard
/**
* transloadit.modal
*/

View file

@ -248,9 +248,8 @@ module.exports = class Dashboard extends Plugin {
requestCloseModal () {
if (this.opts.onRequestCloseModal) {
return this.opts.onRequestCloseModal()
} else {
this.closeModal()
}
return this.closeModal()
}
getFocusableNodes () {

View file

@ -1,8 +1,10 @@
const form = require('./form')
const dashboard = require('./dashboard')
const pick = require('./pick')
const upload = require('./upload')
module.exports = {
dashboard,
form,
pick,
upload

View file

@ -19,6 +19,10 @@ function pick (opts = {}) {
closeAfterFinish: true
})
function close () {
uppy.close()
}
if (Array.isArray(opts.providers)) {
addProviders(uppy, opts.providers, {
...opts,