blob: 5731474e3a457bf17b0a54294ec2cc2d0ff62361 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
import $ from 'jquery';
export default function initDeprecatedRemoveRowBehavior() {
$('.js-remove-row').on('ajax:success', function removeRowAjaxSuccessCallback() {
$(this).closest('li').addClass('gl-display-none!');
});
$('.js-remove-tr').on('ajax:before', function removeTRAjaxBeforeCallback() {
$(this).parent().find('.btn').addClass('disabled');
});
$('.js-remove-tr').on('ajax:success', function removeTRAjaxSuccessCallback() {
$(this).closest('tr').addClass('gl-display-none!');
});
}
|