File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -76,7 +76,8 @@ define([
7676 } ,
7777
7878 // Create section
79- createSection : function ( section ) {
79+ createSection : function ( e ) {
80+ if ( e ) e . stopPropagation ( ) ;
8081 this . setSection ( _ . uniqueId ( "section" ) ) ;
8182 } ,
8283
@@ -198,6 +199,9 @@ define([
198199 // Complete tabs system
199200 var TabsView = hr . View . extend ( {
200201 className : "component-tabs" ,
202+ events : {
203+ "dblclick .tabs-header" : "openDefaultNew"
204+ } ,
201205
202206 // Constructor
203207 initialize : function ( options ) {
@@ -431,6 +435,11 @@ define([
431435 this . render ( ) ;
432436 return this ;
433437 } ,
438+
439+ // Open default new tab
440+ openDefaultNew : function ( ) {
441+ this . trigger ( "tabs:opennew" ) ;
442+ }
434443 } , {
435444 Panel : TabPanelView
436445 } ) ;
Original file line number Diff line number Diff line change @@ -19,7 +19,9 @@ define([
1919 var that = this ;
2020
2121 this . tabs = new TabsView ( ) ;
22- this . tabs . on ( "tabs:default" , function ( ) {
22+
23+ // Default tab and dbl click to open new
24+ this . tabs . on ( "tabs:default tabs:opennew" , function ( ) {
2325 files . openNew ( ) ;
2426 } , this ) ;
2527
You can’t perform that action at this time.
0 commit comments