Skip to content

Commit

Permalink
prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Jul 4, 2024
1 parent 47b20dc commit d82e327
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 31 deletions.
11 changes: 7 additions & 4 deletions src/web/assets/feedme/src/js/feed-me.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $(function () {

// Change the import strategy for Users
var $disableLabel = $(
'input[name="duplicateHandle[]"][value="disable"]'
'input[name="duplicateHandle[]"][value="disable"]',
).next('label');
var originalDisableLabel = $disableLabel.text();
var $disableInstructions = $disableLabel.siblings('.instructions');
Expand All @@ -39,7 +39,10 @@ $(function () {
if (value === 'craft-elements-User') {
$disableLabel.text(Craft.t('feed-me', 'Suspend missing users'));
$disableInstructions.text(
Craft.t('feed-me', 'Suspends any users that are missing from the feed.')
Craft.t(
'feed-me',
'Suspends any users that are missing from the feed.',
),
);
} else {
$disableLabel.text(originalDisableLabel);
Expand Down Expand Up @@ -118,7 +121,7 @@ $(function () {
// for categories and entries - only show "create if they do not exist" if matching done by "title"
// for users - only show "create if they do not exist" if matching done by "email"
$(
'.categories-field-match select, .entries-field-match select, .users-field-match select'
'.categories-field-match select, .entries-field-match select, .users-field-match select',
).on('change', function (e) {
var match = 'title';
var $selectParent = $(this).parent();
Expand Down Expand Up @@ -226,7 +229,7 @@ $(function () {
});

$container.find('select').html(newOptions);
}
},
);

$('.field-extra-settings .element-group-section select').trigger('change');
Expand Down
42 changes: 21 additions & 21 deletions src/web/assets/feedme/src/lib/selectize.js
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@
module.exports = factory(
require('jquery'),
require('sifter'),
require('microplugin')
require('microplugin'),
);
} else {
root.Selectize = factory(root.jQuery, root.Sifter, root.MicroPlugin);
Expand Down Expand Up @@ -722,7 +722,7 @@
for (var i = 0; i < this._events[event].length; i++) {
this._events[event][i].apply(
this,
Array.prototype.slice.call(arguments, 1)
Array.prototype.slice.call(arguments, 1),
);
}
},
Expand Down Expand Up @@ -1288,7 +1288,7 @@
if (!self.settings.splitOn && self.settings.delimiter) {
var delimiterEscaped = self.settings.delimiter.replace(
/[-\/\\^$*+?.()|[\]{}]/g,
'\\$&'
'\\$&',
);
self.settings.splitOn = new RegExp('\\s*' + delimiterEscaped + '+\\s*');
}
Expand Down Expand Up @@ -1392,7 +1392,7 @@
if (self.isOpen) {
self.positionDropdown.apply(self, arguments);
}
}
},
);
$window.on('mousemove' + eventNS, function () {
self.ignoreHover = false;
Expand Down Expand Up @@ -1593,7 +1593,7 @@
if (self.settings.splitOn) {
setTimeout(function () {
var splitInput = $.trim(self.$control_input.val() || '').split(
self.settings.splitOn
self.settings.splitOn,
);
for (var i = 0, n = splitInput.length; i < n; i++) {
self.createItem(splitInput[i]);
Expand Down Expand Up @@ -2089,14 +2089,14 @@
.stop()
.animate(
{scrollTop: scroll_bottom},
animate ? self.settings.scrollDuration : 0
animate ? self.settings.scrollDuration : 0,
);
} else if (y < scroll) {
self.$dropdown_content
.stop()
.animate(
{scrollTop: scroll_top},
animate ? self.settings.scrollDuration : 0
animate ? self.settings.scrollDuration : 0,
);
}
}
Expand All @@ -2110,7 +2110,7 @@
if (self.settings.mode === 'single') return;

self.$activeItems = Array.prototype.slice.apply(
self.$control.children(':not(input)').addClass('active')
self.$control.children(':not(input)').addClass('active'),
);
if (self.$activeItems.length) {
self.hideInput();
Expand Down Expand Up @@ -2227,7 +2227,7 @@
calculateScore = self.settings.score.apply(this, [query]);
if (typeof calculateScore !== 'function') {
throw new Error(
'Selectize "score" setting must be a function that returns a function'
'Selectize "score" setting must be a function that returns a function',
);
}
}
Expand All @@ -2237,7 +2237,7 @@
self.lastQuery = query;
result = self.sifter.search(
query,
$.extend(options, {score: calculateScore})
$.extend(options, {score: calculateScore}),
);
self.currentResults = result;
} else {
Expand Down Expand Up @@ -2345,8 +2345,8 @@
'optgroup',
$.extend({}, self.optgroups[optgroup], {
html: html_children,
})
)
}),
),
);
} else {
html.push(groups[optgroup].join(''));
Expand Down Expand Up @@ -2627,7 +2627,7 @@
getOption: function (value) {
return this.getElementWithValue(
value,
this.$dropdown_content.find('[data-selectable]')
this.$dropdown_content.find('[data-selectable]'),
);
},

Expand Down Expand Up @@ -2947,7 +2947,7 @@
escape_html(self.items[i]) +
'" selected="selected">' +
escape_html(label) +
'</option>'
'</option>',
);
}
if (!options.length && !this.$input.attr('multiple')) {
Expand Down Expand Up @@ -3112,7 +3112,7 @@

if (self.$activeItems.length) {
$tail = self.$control.children(
'.active:' + (direction > 0 ? 'last' : 'first')
'.active:' + (direction > 0 ? 'last' : 'first'),
);
caret = self.$control.children(':not(input)').index($tail);
if (direction > 0) {
Expand Down Expand Up @@ -3393,13 +3393,13 @@
id = data[self.settings.optgroupValueField] || '';
html = html.replace(
regex_tag,
'<$1 data-group="' + escape_replace(escape_html(id)) + '"'
'<$1 data-group="' + escape_replace(escape_html(id)) + '"',
);
}
if (templateName === 'option' || templateName === 'item') {
html = html.replace(
regex_tag,
'<$1 data-value="' + escape_replace(escape_html(value || '')) + '"'
'<$1 data-value="' + escape_replace(escape_html(value || '')) + '"',
);
}

Expand Down Expand Up @@ -3687,7 +3687,7 @@

instance = new Selectize(
$input,
$.extend(true, {}, defaults, settings_element, settings_user)
$.extend(true, {}, defaults, settings_element, settings_user),
);
});
};
Expand Down Expand Up @@ -3781,7 +3781,7 @@
);
},
},
options
options,
);

self.setup = (function () {
Expand All @@ -3802,7 +3802,7 @@
equalizeWidth: true,
equalizeHeight: true,
},
options
options,
);

this.getAdjacentOption = function ($option, direction) {
Expand Down Expand Up @@ -3903,7 +3903,7 @@
className: 'remove',
append: true,
},
options
options,
);

var self = this;
Expand Down
6 changes: 4 additions & 2 deletions src/web/assets/feedme/src/scss/_font-awesome.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4752,7 +4752,8 @@ readers do not read off random characters that represent icons */
font-style: normal;
font-weight: 400;
src: url('../fonts/fa-regular-400.eot');
src: url('../fonts/fa-regular-400.eot?#iefix') format('embedded-opentype'),
src:
url('../fonts/fa-regular-400.eot?#iefix') format('embedded-opentype'),
url('../fonts/fa-regular-400.woff2') format('woff2'),
url('../fonts/fa-regular-400.woff') format('woff'),
url('../fonts/fa-regular-400.ttf') format('truetype'),
Expand All @@ -4773,7 +4774,8 @@ readers do not read off random characters that represent icons */
font-style: normal;
font-weight: 900;
src: url('../fonts/fa-solid-900.eot');
src: url('../fonts/fa-solid-900.eot?#iefix') format('embedded-opentype'),
src:
url('../fonts/fa-solid-900.eot?#iefix') format('embedded-opentype'),
url('../fonts/fa-solid-900.woff2') format('woff2'),
url('../fonts/fa-solid-900.woff') format('woff'),
url('../fonts/fa-solid-900.ttf') format('truetype'),
Expand Down
10 changes: 7 additions & 3 deletions src/web/assets/feedme/src/scss/feed-me.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion src/web/assets/feedme/src/scss/feed-me.scss
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,9 @@ body.ltr .table-feed-me .thin.action {
position: relative;
display: inline-block;
background-image: linear-gradient(#fff, #fafafa);
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.1), 0 0 0 1px rgba(0, 0, 0, 0.025),
box-shadow:
inset 0 0 0 1px rgba(0, 0, 0, 0.1),
0 0 0 1px rgba(0, 0, 0, 0.025),
0 1px 1px rgba(0, 0, 0, 0.1);

&:after {
Expand Down

0 comments on commit d82e327

Please sign in to comment.