Skip to content

Commit

Permalink
EZP-29475: after prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
Michał Grabowski committed Apr 15, 2020
1 parent c882035 commit 06e7d3e
Showing 1 changed file with 17 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function(global, doc, eZ, React, ReactDOM, Translator) {
(function (global, doc, eZ, React, ReactDOM, Translator) {
const CLASS_FIELD_SINGLE = 'ez-field-edit--ezobjectrelation';
const SELECTOR_FIELD_MULTIPLE = '.ez-field-edit--ezobjectrelationlist';
const SELECTOR_FIELD_SINGLE = '.ez-field-edit--ezobjectrelation';
Expand Down Expand Up @@ -122,9 +122,18 @@

const config = JSON.parse(event.currentTarget.dataset.udwConfig);
const limit = parseInt(event.currentTarget.dataset.limit);
const title = limit === 1
? Translator.trans(/*@Desc("Select a Content item")*/ 'ezobjectrelationlist.title.single', {}, 'universal_discovery_widget')
: Translator.trans(/*@Desc("Select Content item(s)")*/ 'ezobjectrelationlist.title.multi', {}, 'universal_discovery_widget');
const title =
limit === 1
? Translator.trans(
/*@Desc("Select a Content item")*/ 'ezobjectrelationlist.title.single',
{},
'universal_discovery_widget'
)
: Translator.trans(
/*@Desc("Select Content item(s)")*/ 'ezobjectrelationlist.title.multi',
{},
'universal_discovery_widget'
);

ReactDOM.render(
React.createElement(
Expand Down Expand Up @@ -166,9 +175,9 @@
<td class="ez-relations__item-name">${contentName}</td>
<td>${contentTypeName}</td>
<td>${new Date(item.ContentInfo.Content.publishedDate).toLocaleString()}</td>
<td colspan="2"><input class="ez-relations__order-input" type="number" value="${selectedItems.length +
index +
1}" /></td>
<td colspan="2"><input class="ez-relations__order-input" type="number" value="${
selectedItems.length + index + 1
}" /></td>
</tr>
`;
};
Expand Down Expand Up @@ -219,7 +228,7 @@
};
const attachRowsEventHandlers = () => {
const isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') > -1;

findOrderInputs().forEach((item) => {
item.addEventListener('blur', updateSelectedItemsOrder, false);

Expand Down

0 comments on commit 06e7d3e

Please # to comment.