@ -4,29 +4,29 @@ define(
'marionette' ,
'backbone' ,
'backgrid' ,
' History/Table/ HistoryTable Layout',
' Histor y/Blacklist/BlacklistLayout',
' Histor y/Queue/QueueLayout'
] , function ( Marionette , Backbone , Backgrid , History Table Layout, BlacklistLayout , QueueLayout ) {
' Activity/ History/HistoryLayout',
' Activit y/Blacklist/BlacklistLayout',
' Activit y/Queue/QueueLayout'
] , function ( Marionette , Backbone , Backgrid , History Layout, BlacklistLayout , QueueLayout ) {
return Marionette . Layout . extend ( {
template : ' History/Histor yLayoutTemplate',
template : ' Activity/Activit yLayoutTemplate',
regions : {
history : '#history ',
blacklist : '#blacklist ',
queueRegion: '#queue '
queueRegion : '#queue ',
history : '#history ',
blacklist : '#blacklist '
} ,
ui : {
historyTab: '.x-history -tab',
blacklistTab: '.x-blacklist -tab',
queueTab : '.x-queue -tab'
queueTab : '.x-queue -tab',
historyTab : '.x-history -tab',
blacklistTab : '.x-blacklist -tab'
} ,
events : {
'click .x-queue-tab' : '_showQueue' ,
'click .x-history-tab' : '_showHistory' ,
'click .x-blacklist-tab' : '_showBlacklist' ,
'click .x-queue-tab' : '_showQueue'
'click .x-blacklist-tab' : '_showBlacklist'
} ,
initialize : function ( options ) {
@ -37,11 +37,14 @@ define(
onShow : function ( ) {
switch ( this . action ) {
case 'queue' :
this . _showQueue ( ) ;
case 'history' :
this . _showHistory ( ) ;
break ;
case 'blacklist' :
this . _showBlacklist ( ) ;
break ;
default :
this . _showHistory ( ) ;
this . _show Queue ( ) ;
}
} ,
@ -54,9 +57,9 @@ define(
e . preventDefault ( ) ;
}
this . history . show ( new History Table Layout( ) ) ;
this . history . show ( new History Layout( ) ) ;
this . ui . historyTab . tab ( 'show' ) ;
this . _navigate ( '/ history') ;
this . _navigate ( '/ activity/ history') ;
} ,
_showBlacklist : function ( e ) {
@ -66,7 +69,7 @@ define(
this . blacklist . show ( new BlacklistLayout ( ) ) ;
this . ui . blacklistTab . tab ( 'show' ) ;
this . _navigate ( '/ histor y/blacklist') ;
this . _navigate ( '/ activit y/blacklist') ;
} ,
_showQueue : function ( e ) {
@ -76,7 +79,7 @@ define(
this . queueRegion . show ( new QueueLayout ( ) ) ;
this . ui . queueTab . tab ( 'show' ) ;
this . _navigate ( '/ histor y/queue') ;
this . _navigate ( '/ activit y/queue') ;
}
} ) ;
} ) ;