refactor snippets_list.js to use ES class syntax
This commit is contained in:
parent
dfe7b14347
commit
cbef9f08f5
1 changed files with 5 additions and 5 deletions
|
@ -1,9 +1,9 @@
|
|||
/* eslint-disable arrow-parens, no-param-reassign, space-before-function-paren, func-names, no-var, max-len */
|
||||
|
||||
window.gl.SnippetsList = function() {
|
||||
var $holder = $('.snippets-list-holder');
|
||||
function SnippetsList() {
|
||||
const $holder = $('.snippets-list-holder');
|
||||
|
||||
$holder.find('.pagination').on('ajax:success', (e, data) => {
|
||||
$holder.replaceWith(data.html);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
window.gl.SnippetsList = SnippetsList;
|
||||
|
|
Loading…
Reference in a new issue