提交 c92bcb82 编写于 作者: M Mike Greiling

refactor star.js to use ES class syntax

上级 cbef9f08
/* eslint-disable func-names, space-before-function-paren, wrap-iife, no-unused-vars, one-var, no-var, one-var-declaration-per-line, prefer-arrow-callback, no-new, max-len */
/* global Flash */
window.Star = (function() {
function Star() {
class Star {
constructor() {
$('.project-home-panel .toggle-star').on('ajax:success', function(e, data, status, xhr) {
var $starIcon, $starSpan, $this, toggleStar;
$this = $(this);
......@@ -23,6 +23,6 @@ window.Star = (function() {
new Flash('Star toggle failed. Try again later.', 'alert');
});
}
}
return Star;
})();
window.Star = Star;
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册