in optaplanner-docs/src/modules/ROOT/images/website/jstree/jstree.js [4798:4831]
set_icon : function (obj, icon) {
var t1, t2, dom, old;
if($.isArray(obj)) {
obj = obj.slice();
for(t1 = 0, t2 = obj.length; t1 < t2; t1++) {
this.set_icon(obj[t1], icon);
}
return true;
}
obj = this.get_node(obj);
if(!obj || obj.id === $.jstree.root) { return false; }
old = obj.icon;
obj.icon = icon === true || icon === null || icon === undefined || icon === '' ? true : icon;
dom = this.get_node(obj, true).children(".jstree-anchor").children(".jstree-themeicon");
if(icon === false) {
dom.removeClass('jstree-themeicon-custom ' + old).css("background","").removeAttr("rel");
this.hide_icon(obj);
}
else if(icon === true || icon === null || icon === undefined || icon === '') {
dom.removeClass('jstree-themeicon-custom ' + old).css("background","").removeAttr("rel");
if(old === false) { this.show_icon(obj); }
}
else if(icon.indexOf("/") === -1 && icon.indexOf(".") === -1) {
dom.removeClass(old).css("background","");
dom.addClass(icon + ' jstree-themeicon-custom').attr("rel",icon);
if(old === false) { this.show_icon(obj); }
}
else {
dom.removeClass(old).css("background","");
dom.addClass('jstree-themeicon-custom').css("background", "url('" + icon + "') center center no-repeat").attr("rel",icon);
if(old === false) { this.show_icon(obj); }
}
return true;
},