diff options
author | Frederic Guillot <fred@kanboard.net> | 2017-01-02 20:47:20 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2017-01-02 20:47:20 -0500 |
commit | f2a24fb3bf2a246de1fc97d1673e8b8908c5b38e (patch) | |
tree | 93308ca46adfcb2ff4cf242bef567201757ece9e /assets/js/components | |
parent | 3833c12ccce59bcc49c4cfa892401973558f604d (diff) |
Update javascript dev dependencies
Diffstat (limited to 'assets/js/components')
-rw-r--r-- | assets/js/components/modal.js | 2 | ||||
-rw-r--r-- | assets/js/components/screenshot.js | 9 | ||||
-rw-r--r-- | assets/js/components/submit-buttons.js | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/assets/js/components/modal.js b/assets/js/components/modal.js index f0867289..458cc526 100644 --- a/assets/js/components/modal.js +++ b/assets/js/components/modal.js @@ -4,7 +4,7 @@ return e.target.parentNode.getAttribute('href'); } - return e.target.getAttribute('href') + return e.target.getAttribute('href'); } KB.onClick('.js-modal-large', function (e) { diff --git a/assets/js/components/screenshot.js b/assets/js/components/screenshot.js index a110f9b1..4cab31a1 100644 --- a/assets/js/components/screenshot.js +++ b/assets/js/components/screenshot.js @@ -2,6 +2,10 @@ KB.component('screenshot', function (containerElement) { var pasteCatcher = null; var inputElement = null; + function onFileLoaded(e) { + createImage(e.target.result); + } + function onPaste(e) { // Firefox doesn't have the property e.clipboardData.items (only Chrome) if (e.clipboardData && e.clipboardData.items) { @@ -16,10 +20,7 @@ KB.component('screenshot', function (containerElement) { // Get the image as base64 data var reader = new FileReader(); - reader.onload = function (event) { - createImage(event.target.result); - }; - + reader.onload = onFileLoaded; reader.readAsDataURL(blob); } } diff --git a/assets/js/components/submit-buttons.js b/assets/js/components/submit-buttons.js index b6ad3769..24d46855 100644 --- a/assets/js/components/submit-buttons.js +++ b/assets/js/components/submit-buttons.js @@ -85,7 +85,7 @@ KB.component('submit-buttons', function (containerElement, options) { if (KB.modal.isOpen()) { formActionElementBuilder .text(' ' + options.orLabel + ' ') - .add(KB.dom('a').attr('href', '#').click(onCancel).text(options.cancelLabel).build()) + .add(KB.dom('a').attr('href', '#').click(onCancel).text(options.cancelLabel).build()); } formActionElement = formActionElementBuilder.build(); |