BigW Consortium Gitlab

Commit c92bcb82 by Mike Greiling

refactor star.js to use ES class syntax

parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment