Useful - checkBoxTreeJS fixed to expand as per original checkBoxTree

In case anyone wants to switch their existing sys_checkBoxTree controls to sys_checkBoxTreeJS controls and have them act as the original did (ie start with all nodes unexpanded, and expand nodes only with selected items in them after save) attached is a modified checkBoxTree.js file which does this.

Changes on line 52 to make parameter expand:false, then add this into the displayTree(data) function:

	  onPostInit: function() {
	      $.map(this.getSelectedNodes(), function(node){
	          node.makeVisible();
	      });
	  },	

Cheers,

Andrew

checkboxTree.txt (4.81 KB)