<commit_before>// Disable toolbar items after grid rendered for some cases (eg: eagerLoading is false)

WulinMaster.behaviors.disableToolbarInitially = $.extend({}, WulinMaster.behaviors.BaseBehavior, {
  event: "onRendered",

  subscribe: function(target) {
    this.grid = target;
    var self = this;
    target[this.event].subscribe(function(){ self.handler(); });
  },

  unsubscribe: function() {

  },

  handler: function() {
    var $toolbar_items = this.grid.container.find(".toolbar_item a");
    $toolbar_items.addClass("toolbar_icon_disabled");
  }

});

WulinMaster.BehaviorManager.register("disable_toolbar_initially", WulinMaster.behaviors.disableToolbarInitially);
<commit_msg>BUG #39 - Fix the switch feature when no rows seleted in master grid<commit_after>// Disable toolbar items after grid rendered for some cases (eg: eagerLoading is false)

WulinMaster.behaviors.disableToolbarInitially = $.extend({}, WulinMaster.behaviors.BaseBehavior, {
  event: "onRendered",

  subscribe: function(target) {
    this.grid = target;
    var self = this;
    target[this.event].subscribe(function(){ self.handler(); });
  },

  unsubscribe: function() {

  },

  handler: function() {
    var $toolbar_items = this.grid.container.find(".toolbar_item a").not('.switch_action');
    $toolbar_items.addClass("toolbar_icon_disabled");
  }

});

WulinMaster.BehaviorManager.register("disable_toolbar_initially", WulinMaster.behaviors.disableToolbarInitially);

{'fraction_non_alphanumeric': 0.13242320819112627, 'fraction_numerical': 0.0013651877133105802, 'mean_word_length': 5.032921810699588, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1089063', 'n_tokens_mistral': 441, 'n_tokens_neox': 431, 'n_words': 90}