/** treeview. a wrapper for fuelux treeview element. it's just a wrapper so you still need to include fuelux treeview script first. */ (function($ , undefined) { $.fn.acetree = $.fn.ace_tree = function(options) { var $defaults = { 'open-icon' : ace.vars['icon'] + 'fa fa-folder-open', 'close-icon' : ace.vars['icon'] + 'fa fa-folder', 'selectable' : true, 'selected-icon' : ace.vars['icon'] + 'fa fa-check', 'unselected-icon' : ace.vars['icon'] + 'fa fa-times', 'loadinghtml': 'loading...' } this.each(function() { var attrib_values = ace.helper.getattrsettings(this, $defaults); var $options = $.extend({}, $defaults, options, attrib_values); var $this = $(this); $this.addclass('tree').attr('role', 'tree'); $this.html( '
  • \ \ '+($options['unselected-icon'] == null ? '' : '')+'\ \ \
  • '); $this.addclass($options['selectable'] == true ? 'tree-selectable' : 'tree-unselectable'); $this.tree($options); }); return this; } })(window.jquery);