Answer the question
In order to leave comments, you need to log in
How to add color change functionality to Sir Trevor JS?
There is a site on yii1 + sir trevor js 3.0
I just can't add the functionality to change the color. The button appeared, I don’t know what to do next. Settled on this:
var Color = SirTrevor.Formatter.extend({
title: "color",
cmd: "color",
text : "C",
onClick: function() {
var color = prompt(i18n.t("general:color"));
document.execCommand(this.cmd, false, color);
}
});
SirTrevor.Formatters.Color = new Color();
Answer the question
In order to leave comments, you need to log in
And why don't you immediately filter the entire collection in the place where you fill in filteredMonitorings?
this.monitoringsService.getFilteredMonitorings().subscribe(rows =>
this.filteredMonitorings = rows
.filter(monitoring => monitoring.spr_prioritys_id)
.filter(monitoring => monitoring.n_users_id)
.filter(monitoring => monitoring.priority_itog));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question