Add dropbox CSP directive if configured and make button clickable
The lack of a 'preventDefault' on the click event handler resulted in the dropbox link being unclickable. Furthermore because of a missing CSP rule, the dropbox script couldn't be loaded. The dropbox origin is now added to the CSP script sources if dropbox integration is configured. Signed-off-by: Erik Michelson <github@erik.michelson.eu>
This commit is contained in:
@@ -996,7 +996,8 @@ ui.toolbar.export.snippet.click(function () {
|
||||
})
|
||||
})
|
||||
// import from dropbox
|
||||
ui.toolbar.import.dropbox.click(function () {
|
||||
ui.toolbar.import.dropbox.click(function (event) {
|
||||
event.preventDefault()
|
||||
var options = {
|
||||
success: function (files) {
|
||||
ui.spinner.show()
|
||||
|
||||
Reference in New Issue
Block a user