FIX ESLint issues
This commit is contained in:
parent
4401d768f5
commit
8f4d342dc8
|
@ -1,4 +1,5 @@
|
||||||
/* global window */
|
/* global window */
|
||||||
|
/* eslint-disable func-names */
|
||||||
import jQuery from 'jquery';
|
import jQuery from 'jquery';
|
||||||
|
|
||||||
jQuery.entwine('ss', ($) => {
|
jQuery.entwine('ss', ($) => {
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global window, alert, confirm */
|
/* global window, alert, confirm */
|
||||||
|
/* eslint-disable func-names, no-alert, no-restricted-globals */
|
||||||
import jQuery from 'jquery';
|
import jQuery from 'jquery';
|
||||||
import i18n from 'i18n';
|
import i18n from 'i18n';
|
||||||
|
|
||||||
|
@ -30,7 +31,6 @@ jQuery.entwine('colymba', ($) => {
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bulkselect table cell behaviours
|
* Bulkselect table cell behaviours
|
||||||
*/
|
*/
|
||||||
|
@ -54,7 +54,7 @@ jQuery.entwine('colymba', ($) => {
|
||||||
} else {
|
} else {
|
||||||
$(cb).prop('checked', false);
|
$(cb).prop('checked', false);
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -67,7 +67,7 @@ jQuery.entwine('colymba', ($) => {
|
||||||
},
|
},
|
||||||
onclick() {
|
onclick() {
|
||||||
$(this).parents('.grid-field__table').find('input.bulkSelectAll').prop('checked', '');
|
$(this).parents('.grid-field__table').find('input.bulkSelectAll').prop('checked', '');
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -88,10 +88,9 @@ jQuery.entwine('colymba', ($) => {
|
||||||
return parseInt($(this).data('record'), 10);
|
return parseInt($(this).data('record'), 10);
|
||||||
})
|
})
|
||||||
.get();
|
.get();
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bulk action dropdown behaviours
|
* Bulk action dropdown behaviours
|
||||||
*/
|
*/
|
||||||
|
@ -129,16 +128,14 @@ jQuery.entwine('colymba', ($) => {
|
||||||
$btn.find('img').remove();
|
$btn.find('img').remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (config[value].destructive) {
|
if (config[value].destructive) {
|
||||||
$btn.addClass('btn-outline-danger');
|
$btn.addClass('btn-outline-danger');
|
||||||
} else {
|
} else {
|
||||||
$btn.removeClass('btn-outline-danger');
|
$btn.removeClass('btn-outline-danger');
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* bulk action button behaviours
|
* bulk action button behaviours
|
||||||
*/
|
*/
|
||||||
|
@ -198,7 +195,7 @@ jQuery.entwine('colymba', ($) => {
|
||||||
url,
|
url,
|
||||||
data: inputData,
|
data: inputData,
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
context: $(this)
|
context: $(this),
|
||||||
}).always(function (data) {
|
}).always(function (data) {
|
||||||
let returnData = data;
|
let returnData = data;
|
||||||
$btn.removeClass('loading');
|
$btn.removeClass('loading');
|
||||||
|
@ -228,6 +225,6 @@ jQuery.entwine('colymba', ($) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/* global window */
|
/* global window */
|
||||||
|
/* eslint-disable func-names */
|
||||||
import jQuery from 'jquery';
|
import jQuery from 'jquery';
|
||||||
|
|
||||||
jQuery.entwine('colymba', ($) => {
|
jQuery.entwine('colymba', ($) => {
|
||||||
|
@ -30,10 +31,9 @@ jQuery.entwine('colymba', ($) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
this.data('state', state);
|
this.data('state', state);
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Contains each rocrds editing fields,
|
* Contains each rocrds editing fields,
|
||||||
* tracks changes and updates...
|
* tracks changes and updates...
|
||||||
|
@ -44,6 +44,6 @@ jQuery.entwine('colymba', ($) => {
|
||||||
if (!this.hasClass('hasUpdate')) {
|
if (!this.hasClass('hasUpdate')) {
|
||||||
this.addClass('hasUpdate');
|
this.addClass('hasUpdate');
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -16,8 +16,8 @@ const bulkUploadFieldAttach = (payload) => {
|
||||||
jQuery.ajax(schema.data.attachFileEndpoint.url, {
|
jQuery.ajax(schema.data.attachFileEndpoint.url, {
|
||||||
method: schema.data.attachFileEndpoint.method, // doesn't seem to change anything
|
method: schema.data.attachFileEndpoint.method, // doesn't seem to change anything
|
||||||
data: {
|
data: {
|
||||||
fileID: payload.file.id
|
fileID: payload.file.id,
|
||||||
}
|
},
|
||||||
}).done((data) => {
|
}).done((data) => {
|
||||||
bulkTools.gridfieldRefresh($gridfield, data);
|
bulkTools.gridfieldRefresh($gridfield, data);
|
||||||
// bulkTools.removeUploadItem($gridfield, null, payload.file.id);//bad! can't dispath in Reducer
|
// bulkTools.removeUploadItem($gridfield, null, payload.file.id);//bad! can't dispath in Reducer
|
||||||
|
|
Loading…
Reference in New Issue