Button With Buffered Clicks

2. April 2008 – 19:56

My users are used to double-clicks to such a degree that they double-click everything, also buttons. This has created the problem with buttons that add records to grid as always two records were added. Here is handling:

1
2
3
4
5
6
7
8
9
10
11
this.toolbar.add({
   id:this.id + '-btn-add-record'
  ,text:this.addText
  ,tooltip:this.addRecordText
  ,iconCls:'icon-plus'
  ,disabled:true
  ,listeners:{
     scope:this
    ,click:{fn:this.onTbarClick.createDelegate(this, ['add']), buffer:200}
  }
});

StumbleUpon Toolbar

Post a Comment