FIX ESLint issues

This commit is contained in:
Sabina Talipova 2023-06-30 10:49:57 +12:00
parent 4401d768f5
commit 8f4d342dc8
4 changed files with 13 additions and 15 deletions

View File

@ -1,4 +1,5 @@
/* global window */
/* eslint-disable func-names */
import jQuery from 'jquery';
jQuery.entwine('ss', ($) => {

View File

@ -1,4 +1,5 @@
/* global window, alert, confirm */
/* eslint-disable func-names, no-alert, no-restricted-globals */
import jQuery from 'jquery';
import i18n from 'i18n';
@ -30,7 +31,6 @@ jQuery.entwine('colymba', ($) => {
},
});
/**
* Bulkselect table cell behaviours
*/
@ -54,7 +54,7 @@ jQuery.entwine('colymba', ($) => {
} else {
$(cb).prop('checked', false);
}
}
},
});
/**
@ -67,7 +67,7 @@ jQuery.entwine('colymba', ($) => {
},
onclick() {
$(this).parents('.grid-field__table').find('input.bulkSelectAll').prop('checked', '');
}
},
});
/**
@ -88,10 +88,9 @@ jQuery.entwine('colymba', ($) => {
return parseInt($(this).data('record'), 10);
})
.get();
}
},
});
/**
* Bulk action dropdown behaviours
*/
@ -129,16 +128,14 @@ jQuery.entwine('colymba', ($) => {
$btn.find('img').remove();
}
if (config[value].destructive) {
$btn.addClass('btn-outline-danger');
} else {
$btn.removeClass('btn-outline-danger');
}
}
},
});
/**
* bulk action button behaviours
*/
@ -198,7 +195,7 @@ jQuery.entwine('colymba', ($) => {
url,
data: inputData,
type: 'POST',
context: $(this)
context: $(this),
}).always(function (data) {
let returnData = data;
$btn.removeClass('loading');
@ -228,6 +225,6 @@ jQuery.entwine('colymba', ($) => {
}
return true;
}
},
});
});

View File

@ -1,4 +1,5 @@
/* global window */
/* eslint-disable func-names */
import jQuery from 'jquery';
jQuery.entwine('colymba', ($) => {
@ -30,10 +31,9 @@ jQuery.entwine('colymba', ($) => {
});
this.data('state', state);
}
},
});
/**
* Contains each rocrds editing fields,
* tracks changes and updates...
@ -44,6 +44,6 @@ jQuery.entwine('colymba', ($) => {
if (!this.hasClass('hasUpdate')) {
this.addClass('hasUpdate');
}
}
},
});
});

View File

@ -16,8 +16,8 @@ const bulkUploadFieldAttach = (payload) => {
jQuery.ajax(schema.data.attachFileEndpoint.url, {
method: schema.data.attachFileEndpoint.method, // doesn't seem to change anything
data: {
fileID: payload.file.id
}
fileID: payload.file.id,
},
}).done((data) => {
bulkTools.gridfieldRefresh($gridfield, data);
// bulkTools.removeUploadItem($gridfield, null, payload.file.id);//bad! can't dispath in Reducer