EXTJS 더블 클릭 닫기 태그 코드

6763 단어 ExtJs

  
1 Ext.override(Ext.TabPanel, {
2 initEvents : function (){
3 Ext.TabPanel.superclass.initEvents.call( this );
4 this .on( ' add ' , this .onAdd, this );
5 this .on( ' remove ' , this .onRemove, this );
6
7 this .strip.on( ' mousedown ' , this .onStripMouseDown, this );
8 this .strip.on( ' contextmenu ' , this .onStripContextMenu, this );
9 this .strip.on( ' dblclick ' , this .onTitleDbClick, this );
10 if ( this .enableTabScroll){
11 this .strip.on( ' mousewheel ' , this .onWheel, this );
12 }
13 },
14 onTitleDbClick: function (e,target,o){
15 var t = this .findTargets(e);
16 if (t.item.fireEvent( ' beforeclose ' , t.item) !== false && t.item.closable !== false ) {
17 t.item.fireEvent( ' close ' , t.item);
18 this .remove(t.item);
19 }
20 }
21 });

좋은 웹페이지 즐겨찾기