Adding Bynder browse media UI Extension#75
Adding Bynder browse media UI Extension#75Frederik Lölhöffel (floelhoeffel) merged 8 commits intomasterfrom
Conversation
samples/bynder/extension.html
Outdated
| @@ -0,0 +1,92 @@ | |||
| <!DOCTYPE html> | |||
|
|
|||
There was a problem hiding this comment.
Add <meta charset="utf-8">
samples/bynder/extension.html
Outdated
| } | ||
|
|
||
| .logo { | ||
| background-image: url(https://www.bynder.com/static/3.0/dist/img/svg/glyph-blue.svg); |
samples/bynder/extension.html
Outdated
|
|
||
|
|
||
| <body> | ||
| <div class="logo"> |
There was a problem hiding this comment.
Just <div class="logo"></div>
samples/bynder/extension.html
Outdated
| <div class="logo"> | ||
|
|
||
| </div> | ||
| <div id="bynder-compactview" data-fullScreen="true" data-assetTypes="image,video" data-autoload="false" data-button="Load media from bynder.com" |
There was a problem hiding this comment.
Break line after every attribute so it's easier to follow.
samples/bynder/extension.html
Outdated
| }) | ||
|
|
||
|
|
||
| document.getElementById('bynder-compactview').addEventListener('click', function (e) { |
There was a problem hiding this comment.
you don't use e, skip it
There was a problem hiding this comment.
This is not addressed
There was a problem hiding this comment.
done
samples/bynder/extension.html
Outdated
|
|
||
|
|
||
| document.getElementById('bynder-compactview').addEventListener('click', function (e) { | ||
| if (isOpen === false) { |
samples/bynder/extension.html
Outdated
| }) | ||
|
|
||
| function renderIds(ids) { | ||
| if (!ids || ids.length === 0) { |
There was a problem hiding this comment.
More defensive: !Array.isArray(ids) || ids.length < 1
samples/bynder/extension.html
Outdated
| api.window.updateHeight() | ||
| return | ||
| } | ||
| assetsListsContainer.style.display = 'block' |
There was a problem hiding this comment.
Do it after HTML of the list is fully generated (your innerHTML manipulation)
samples/bynder/extension.html
Outdated
| } | ||
| }) | ||
| </script> | ||
| </body> No newline at end of file |
|
PTAL |
samples/bynder/extension.html
Outdated
| isOpen = false | ||
| // The selected assets go in the event detail property | ||
| var selectedAssets = e.detail | ||
| var assetIds = [] |
There was a problem hiding this comment.
This is not addressed
samples/bynder/extension.html
Outdated
| }) | ||
|
|
||
|
|
||
| document.getElementById('bynder-compactview').addEventListener('click', function (e) { |
There was a problem hiding this comment.
This is not addressed
samples/bynder/README.md
Outdated
| For local development, start a webserver: | ||
|
|
||
| ```bash | ||
| ❯python -m SimpleHTTPServer |
There was a problem hiding this comment.
maybe drop the > so it can be copy/pasted w/o confusion
No description provided.