You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm having A LOT of difficulties when trying to add "rv-on-click" to my custom widget.
basically I took the list widget and created my own custom widget with the ability to change the color of the value field. This is how my customlist.js looks:
Dashing.widgets.CustomList = function (dashboard) {
var self = this;
self.__init__ = Dashing.utils.widgetInit(dashboard, 'customlist');
self.row = 2;
self.col = 1;
self.scope = {};
self.getWidget = function () {
return this.__widget__;
};
self.getData = function () {};
self.interval = 10000;
};
rivets.binders['value-color'] = function(el, value) {
if (value == "Down") {
$(el).css('color', 'orange');
}
else if (value == "OK") {
$(el).css('color', 'green');
}
else if (value == "Error" || value == "FAILED") {
$(el).css('color', 'red');
}
};
Now i'm trying to add the following code to the same file ("testbind" is the ID of the customlist div):
I've tried like a million different variations, went over every example I could find online, but this doesnt seem to work, i keep getting this "this.call is not a function" error.
What am i missing?
Thanks.
The text was updated successfully, but these errors were encountered:
Hi,
I'm having A LOT of difficulties when trying to add "rv-on-click" to my custom widget.
basically I took the list widget and created my own custom widget with the ability to change the color of the value field. This is how my customlist.js looks:
Now i'm trying to add the following code to the same file ("testbind" is the ID of the customlist div):
I've tried like a million different variations, went over every example I could find online, but this doesnt seem to work, i keep getting this "this.call is not a function" error.
What am i missing?
Thanks.
The text was updated successfully, but these errors were encountered: