Skip to content

Commit

Permalink
Invalidate displayed message when filter gets changed
Browse files Browse the repository at this point in the history
  • Loading branch information
iradul committed Sep 10, 2018
1 parent 9398d50 commit 9d116ee
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 58 deletions.
117 changes: 59 additions & 58 deletions k2ws/static.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions k2ws/static/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
message: '',
intervalMsgFreezed: false,
filterEnabled: false,
filterInvalidated: false,
stackingEnabled: false,
stackedMessages: 0,
closeAfter: 0,
Expand Down Expand Up @@ -128,6 +129,10 @@
return msg;
}

$$el.filterEditor.on('change', function(cMirror){
$$flags.filterInvalidated = true;
});

$f_toggleButton($$el.close, false);
document.getElementById("open").onclick = function (evt) {
if ($$ws) {
Expand Down Expand Up @@ -173,6 +178,9 @@
document.getElementById("close").click();
}
}
} else if ($$flags.filterInvalidated) {
$$flags.message = '';
$$flags.filterInvalidated = false;
}
}
}
Expand Down

0 comments on commit 9d116ee

Please sign in to comment.