Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/video media read #410

Merged
merged 5 commits into from
Jan 11, 2022
Merged

Feature/video media read #410

merged 5 commits into from
Jan 11, 2022

Conversation

Harvel218
Copy link
Contributor

Q A
Bug fix? no/yes
New feature? no/yes
BC breaks? no/yes
Deprecations? no/yes
Related tickets fixes #X, partially #Y, mentioned in #Z
License MIT

@er1z
Copy link
Contributor

er1z commented Dec 21, 2021

Configure your Git not to submit DS_Store files, please.

}

function htmlToString(item) {
return String(item).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
Copy link

Choose a reason for hiding this comment

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

Add each .replace( in newline

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its not longer than 120 chars - formatter isnt considering it to format (and i cant just maunaly do this because i have format on save :( )

Can it be ommited?

Copy link

Choose a reason for hiding this comment

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

can be omitted, however imho it adds readability to code


function checkName(item) {
if (item) return item;
else return 'Empty name';
Copy link

Choose a reason for hiding this comment

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

add newline between 23 and 24, else is not needed

`<div class="media-list__item">
<label for="${media.code}" class="media-list__item__label"><strong>${trimValue(
htmlToString(checkName(media.name))
)}</strong></strong> (${trimValue(media.code)})</label>
Copy link

Choose a reason for hiding this comment

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

why double </strong></strong>?

</div>`
)
.join('');
return output;
Copy link

Choose a reason for hiding this comment

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

newline before return


function insertImageHtml(data) {
const output = data
.map(
Copy link

Choose a reason for hiding this comment

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

.map(media =>

}
},
error(jqXHR, textStatus, errorThrown) {
console.log(`ajax error ${textStatus} ${errorThrown}`);
Copy link

Choose a reason for hiding this comment

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

console.error ?

page: pageNumber,
limit: limit,
};
const shallowEncoded = $.param(myObject);
Copy link

Choose a reason for hiding this comment

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

newline


$.ajax({
type: 'GET',
url: route + '?' + shallowDecoded,
Copy link

Choose a reason for hiding this comment

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

as above

totalPages = numPages(data.total);
changePage(currentPage, 'video-btn-next', 'video-btn-prev', 'video-page-number');
const element = CKEDITOR.document.getById('media-video-list');
if (element) {
Copy link

Choose a reason for hiding this comment

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

as above

controlStyle: 'width: 100%',
onKeyUp: function () {
phrase = this.getValue();
if (oldValue === phrase) {
Copy link

Choose a reason for hiding this comment

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

newline before if and after }

@KrisFlorq KrisFlorq merged commit 4320890 into master Jan 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants