Skip to content

Commit

Permalink
fixes #1322 class attributes must be defined in contructor
Browse files Browse the repository at this point in the history
  • Loading branch information
plegall committed Feb 5, 2021
1 parent eadc846 commit 9c1f6c0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions admin/themes/default/js/common.js
Expand Up @@ -142,10 +142,12 @@ $('.search-input').on('input', function() {

// Class to implement a temporary state and reverse it
class TemporaryState {
//Arrays to reverse changes
attrChanges = []; //Attribute changes : {object(s), attribute, value}
classChanges = []; //Class changes : {object(s), state(add:true/remove:false), class}
htmlChanges = []; //Html changes : {object(s), html}
constructor() {
//Arrays to reverse changes
this.attrChanges = []; //Attribute changes : {object(s), attribute, value}
this.classChanges = []; //Class changes : {object(s), state(add:true/remove:false), class}
this.htmlChanges = []; //Html changes : {object(s), html}
}

/**
* Change temporaly an attribute of an object
Expand Down

0 comments on commit 9c1f6c0

Please sign in to comment.