ultimix
jquery.tree.themeroller.js
Go to the documentation of this file.
1 (function ($) {
2  $.extend($.tree.plugins, {
3  "themeroller" : {
4  defaults : {
5 
6  },
7  callbacks : {
8  oninit : function (t) {
9  if(this.settings.ui.theme_name != "themeroller") return;
10  var opts = $.extend(true, {}, $.tree.plugins.themeroller.defaults, this.settings.plugins.themeroller);
11  this.container.addClass("ui-widget ui-widget-content");
12  $("#" + this.container.attr("id") + " li a").live("mouseover", function () { $(this).addClass("ui-state-hover"); });
13  $("#" + this.container.attr("id") + " li a").live("mouseout", function () { $(this).removeClass("ui-state-hover"); });
14  },
15  onparse : function (s, t) {
16  if(this.settings.ui.theme_name != "themeroller") return;
17  var opts = $.extend(true, {}, $.tree.plugins.themeroller.defaults, this.settings.plugins.themeroller);
18  return $(s).find("a").not(".ui-state-default").addClass("ui-state-default").children("ins").addClass("ui-icon").end().end().end();
19  },
20  onselect : function(n, t) {
21  if(this.settings.ui.theme_name != "themeroller") return;
22  var opts = $.extend(true, {}, $.tree.plugins.themeroller.defaults, this.settings.plugins.themeroller);
23  $(n).children("a").addClass("ui-state-active");
24  },
25  ondeselect : function(n, t) {
26  if(this.settings.ui.theme_name != "themeroller") return;
27  var opts = $.extend(true, {}, $.tree.plugins.themeroller.defaults, this.settings.plugins.themeroller);
28  $(n).children("a").removeClass("ui-state-active");
29  }
30  }
31  }
32  });
33 })(jQuery);