<commit_before>/*   RSence
 *   Copyright 2010 Riassence Inc.
 *   http://riassence.com/
 *
 *   You should have received a copy of the GNU General Public License along
 *   with this software package. If not, contact <EMAIL>
 */


/*** = Description
  ** Menu item for the HMiniMenu component.
  ***/
var//RSence.Menus
HMiniMenuItem = HRadioButton.extend({
  
  componentName: 'minimenuitem',
  
  defaultEvents: {
    click: true,
    mouseUp: true,
    mouseDown: true
  },
  
  _activateParentParent: function(){
    var _parentParent = this.parent.parent;
    EVENT.changeActiveControl(_parentParent);
  },

  click: function(){
    this.base();
    this._activateParentParent();
    return true;
  },
  
  mouseDown: function(){
    this.base();
    this.click();
    return true;
  },
  
  mouseUp: function(){
    this.base();
    this.click();
    return true;
  }
  
});<commit_msg>Menu items no longer trigger multiple clicks<commit_after>/*   RSence
 *   Copyright 2010 Riassence Inc.
 *   http://riassence.com/
 *
 *   You should have received a copy of the GNU General Public License along
 *   with this software package. If not, contact <EMAIL>
 */


/*** = Description
  ** Menu item for the HMiniMenu component.
  ***/
var//RSence.Menus
HMiniMenuItem = HRadioButton.extend({
  
  componentName: 'minimenuitem',
  
  defaultEvents: {
    click: true,
    mouseUp: true,
    mouseDown: true
  },
  
  _activateParentParent: function(){
    var _parentParent = this.parent.parent;
    EVENT.changeActiveControl(_parentParent);
  },

  _parentLastActivation: 0,
  click: function(){
    var _now = new Date().getTime();
    if( _now - this._parentLastActivation > 200 ){
      this.base();
      this._parentLastActivation = _now;
      this._activateParentParent();
    }
    return true;
  },
  
  mouseDown: function(){
    this.base();
    this.click();
    return true;
  },
  
  mouseUp: function(){
    this.base();
    this.click();
    return true;
  }
  
});
{'fraction_non_alphanumeric': 0.12563067608476286, 'fraction_numerical': 0.006054490413723511, 'mean_word_length': 2.8355899419729207, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 6, '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': '5200596', 'n_tokens_mistral': 647, 'n_tokens_neox': 623, 'n_words': 160}