Add highlighting attribute into widget tree

This commit is contained in:
Hadi Nategh 2015-08-11 09:53:42 +00:00
parent 11b2918d47
commit 476606d6cb

View File

@ -108,6 +108,12 @@ var et2_tree = et2_inputWidget.extend(
"default": false,
"description": "Allow marking multiple nodes, default is false which means disabled multiselection, true or 'strict' activates it and 'strict' makes it strick to only same level marking"
},
highlighting:{
"name": "highlighting",
"type": "boolean",
"default": false,
"description": "Add highlighting class on hovered over item, highlighting is disabled by default"
}
},
/**
@ -224,11 +230,13 @@ var et2_tree = et2_inputWidget.extend(
widget.input.setXMLAutoLoading(egw.link(url));
widget.input.setDataMode('JSON');
}
if (widget.options.multimarking)
{
widget.input.enableMultiselection(!!widget.options.multimarking, widget.options.multimarking === 'strict');
}
// Enable/Disable highlighting
widget.input.enableHighlighting(widget.options.highlighting?true:false);
},
/**