for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
import 'bootstrap/js/dist/tooltip';
import '../../scss/pages/property_ads/index.scss';
import '../../scss/pages/property_ads/property_ad.scss';
import '../../scss/pages/property_ads/filter_form.scss';
let $body = $('body');
let $filterForm = $('#filter-form');
let $sortSelect = $('#sort-select');
let $container = $('#property-ad-container');
let xhrCount = 0;
$filterForm.on('submit', function (e) {
e.preventDefault();
loadPropertyAds();
});
$sortSelect.on('change', function () {
function loadPropertyAds() {
let xhrId = ++xhrCount;
$.ajax({
type: 'GET',
url: Routing.generate('property_ads_list'),
Routing
/** global: Routing */
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.
data: {
filters: $filterForm
.find(':input').filter(function () {
return '' !== $(this).val()
})
.serialize(),
sort: $sortSelect.val()
},
beforeSend: function () {
if ($body.find('.loader').length) {
return;
}
$body.append('<div class="loader"></div>');
success: function (html) {
if (xhrId !== xhrCount) {
$container.html(html);
$('#result-count').html($container.find('> article').length);
initTooltips();
complete: function () {
$body.find('.loader').remove();
function initTooltips() {
$('[data-toggle="tooltip"]').tooltip({animation: true});
$(function() {
$body.css('padding-bottom', ($('footer').outerHeight()));
This checks looks for references to variables that have not been declared. This is most likey a typographical error or a variable has been renamed.
To learn more about declaring variables in Javascript, see the MDN.