[WIP] Add thumb on offers, refactor categories, try to fix counter on relations polymorphic with eage loader, bad pattern !
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
|
||||
$('input' + selector).change(function() {
|
||||
data['id'] = $(this).data('id');
|
||||
data['active'] = $(this).is(':checked');
|
||||
var name = (typeof($(this).data('name')) == 'undefined') ? 'active' : $(this).data('name');
|
||||
data[name] = $(this).is(':checked');
|
||||
if (data['id'] && (typeof(url) != 'undefined') && (url != '')) {
|
||||
var dataJson = Object.assign({}, data);
|
||||
$.post(url, dataJson);
|
||||
|
||||
Reference in New Issue
Block a user