I have an icon that I want to disable after a certain set of javascript statements are ran. However after using the disable() command the icons are not disabled.
Below is the specific icon:
view:"icon", icon:"calendar", id:"cell", width:50, height:50,
click:"widget_type = 'calendar'; makeWidget(); $$('widget_select').hide();"
and this is where I am trying to disable the icon, this is in a separate file as well:
if (widget_type =="calendar"){
var node = {
x: Math.random() * (5 - 1) + 1,
y: Math.random() * (5 - 1) + 1,
width: 3,
height: 4,
type: widget_type
};
serializedData.push(node);
grid.addWidget($('<div><div class="grid-stack-item-content" id=' + node.type + '></div><div/>'),
node.x, node.y, node.width, node.height);
loadCalendar();
$$('cell').disable();
}
I also have used isEnabled() after the statement above and it will say that the icon is disabled, but the icon does not grey out at all.
Any help is appreciated and I will gladly provide more code upon request.