refactor snippets_list.js to use ES class syntax

This commit is contained in:
Mike Greiling 2017-06-30 16:27:30 -05:00
parent dfe7b14347
commit cbef9f08f5
1 changed files with 5 additions and 5 deletions

View File

@ -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;