Skip to content
This repository was archived by the owner on Jun 9, 2021. It is now read-only.

Adding Bynder browse media UI Extension#75

Merged
Frederik Lölhöffel (floelhoeffel) merged 8 commits intomasterfrom
bynder-browse-media
Oct 24, 2018
Merged

Adding Bynder browse media UI Extension#75
Frederik Lölhöffel (floelhoeffel) merged 8 commits intomasterfrom
bynder-browse-media

Conversation

@floelhoeffel
Copy link
Copy Markdown
Contributor

No description provided.

@@ -0,0 +1,92 @@
<!DOCTYPE html>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add <meta charset="utf-8">

}

.logo {
background-image: url(https://www.bynder.com/static/3.0/dist/img/svg/glyph-blue.svg);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap the URL with "



<body>
<div class="logo">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just <div class="logo"></div>

<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"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Break line after every attribute so it's easier to follow.

})


document.getElementById('bynder-compactview').addEventListener('click', function (e) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you don't use e, skip it

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not addressed

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done



document.getElementById('bynder-compactview').addEventListener('click', function (e) {
if (isOpen === false) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if (!isOpen) {

})

function renderIds(ids) {
if (!ids || ids.length === 0) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More defensive: !Array.isArray(ids) || ids.length < 1

api.window.updateHeight()
return
}
assetsListsContainer.style.display = 'block'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do it after HTML of the list is fully generated (your innerHTML manipulation)

}
})
</script>
</body> No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a new line after

@floelhoeffel
Copy link
Copy Markdown
Contributor Author

PTAL

isOpen = false
// The selected assets go in the event detail property
var selectedAssets = e.detail
var assetIds = []
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not addressed

})


document.getElementById('bynder-compactview').addEventListener('click', function (e) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not addressed

Frederik Lölhöffel added 3 commits October 24, 2018 16:37
Copy link
Copy Markdown
Contributor

@jelz Jakub (jelz) left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one nit

For local development, start a webserver:

```bash
❯python -m SimpleHTTPServer
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe drop the > so it can be copy/pasted w/o confusion

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants