TT#14000 Ngcp CSC CallForwarding tabs view consolidation

Change-Id: I014c168cea8cbc0bec9b1f2c7f52b953d8688129
changes/62/13162/3
Carlo 8 years ago
parent b001d932ae
commit 7d971239c0

@ -1,7 +1,7 @@
Ext.define('NgcpCsc.view.pages.callforward.afterhours.AfterHoursTabs', {
Ext.define('NgcpCsc.view.pages.callforward.CallForwardTab', {
extend: 'Ext.tab.Panel',
xtype: 'afterhourstabs',
xtype: 'cftab',
listeners: {
click: {
@ -16,15 +16,21 @@ Ext.define('NgcpCsc.view.pages.callforward.afterhours.AfterHoursTabs', {
scrollable: true
},
_tabId: null,
_secondprefix: null,
_firstPrefixes: [],
initComponent: function () {
this.items = [{
title: Ngcp.csc.locales.callforward.source_one[localStorage.getItem('languageSelected')],
id: 'afterhours-tab-everybody',
id: this._tabId + '-tab-everybody',
items: [
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
_firstprefix: 'everybody-',
_secondprefix: 'afterHours-'
_firstprefix: this._firstPrefixes[0],
_secondprefix: this._secondprefix
})
],
@ -35,13 +41,13 @@ Ext.define('NgcpCsc.view.pages.callforward.afterhours.AfterHoursTabs', {
bind: {
title: '{source_lista_title}'
},
id: 'afterhours-tab-listA',
id: this._tabId + '-tab-listA',
iconCls: Ngcp.csc.icons.pencil + ' cf-edit edit-listA',
iconAlign: 'right',
items: [
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
_firstprefix: 'listA-',
_secondprefix: 'afterHours-'
_firstprefix: this._firstPrefixes[1],
_secondprefix: this._secondprefix
})
],
listeners: {
@ -51,13 +57,13 @@ Ext.define('NgcpCsc.view.pages.callforward.afterhours.AfterHoursTabs', {
bind: {
title: '{source_listb_title}'
},
id: 'afterhours-tab-listB',
id: this._tabId + '-tab-listB',
iconCls: Ngcp.csc.icons.pencil + ' cf-edit edit-listB',
iconAlign: 'right',
items: [
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
_firstprefix: 'listB-',
_secondprefix: 'afterHours-'
_firstprefix: this._firstPrefixes[2],
_secondprefix: this._secondprefix
})
],
listeners: {

@ -63,7 +63,10 @@ Ext.define('NgcpCsc.view.pages.callforward.afterhours.Afterhours', {
width: '100%',
title: Ngcp.csc.locales.callforward.for_calling_parties[localStorage.getItem('languageSelected')]
}, {
xtype: 'afterhourstabs'
xtype: 'cftab',
_tabId: 'afterhours',
_firstPrefixes: ['everybody-', 'listA-', 'listB-'],
_secondprefix: 'afterHours-'
}]
}];
this.callParent();

@ -20,7 +20,10 @@ Ext.define('NgcpCsc.view.pages.callforward.always.Always', {
width: '100%',
title: Ngcp.csc.locales.callforward.for_calling_parties[localStorage.getItem('languageSelected')]
}, {
xtype: 'alwaystabs'
xtype: 'cftab',
_tabId: 'always',
_firstPrefixes: ['everybody-', 'listA-', 'listB-'],
_secondprefix: 'always-'
}]
}];
this.callParent();

@ -1,70 +0,0 @@
Ext.define('NgcpCsc.view.pages.callforward.always.AlwaysTabs', {
extend: 'Ext.tab.Panel',
xtype: 'alwaystabs',
listeners: {
click: {
fn: 'onEditClicked',
element: 'el',
delegate: '.cf-edit'
}
},
defaults: {
bodyPadding: 10,
scrollable: true
},
initComponent: function () {
this.items = [{
title: Ngcp.csc.locales.callforward.source_one[localStorage.getItem('languageSelected')],
id: 'always-tab-everybody',
items: [
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
_firstprefix: 'everybody-',
_secondprefix: 'always-'
})
],
listeners: {
activate: 'onTabClicked'
}
}, {
bind: {
title: '{source_lista_title}'
},
id: 'always-tab-listA',
iconCls: Ngcp.csc.icons.pencil + ' cf-edit edit-listA',
iconAlign: 'right',
items: [
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
_firstprefix: 'listA-',
_secondprefix: 'always-'
})
],
listeners: {
activate: 'onTabClicked'
}
}, {
bind: {
title: '{source_listb_title}'
},
id: 'always-tab-listB',
iconCls: Ngcp.csc.icons.pencil + ' cf-edit edit-listB',
iconAlign: 'right',
items: [
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
_firstprefix: 'listB-',
_secondprefix: 'always-'
})
],
listeners: {
activate: 'onTabClicked'
}
}]
this.callParent();
}
});

@ -63,7 +63,10 @@ Ext.define('NgcpCsc.view.pages.callforward.companyhours.Companyhours', {
width: '100%',
title: Ngcp.csc.locales.callforward.for_calling_parties[localStorage.getItem('languageSelected')]
}, {
xtype: 'companyhourstabs'
xtype: 'cftab',
_tabId: 'companyhours',
_firstPrefixes: ['everybody-', 'listA-', 'listB-'],
_secondprefix: 'companyHours-'
}]
}];
this.callParent();

@ -1,70 +0,0 @@
Ext.define('NgcpCsc.view.pages.callforward.companyhours.CompanyHoursTabs', {
extend: 'Ext.tab.Panel',
xtype: 'companyhourstabs',
listeners: {
click: {
fn: 'onEditClicked',
element: 'el',
delegate: '.cf-edit'
}
},
defaults: {
bodyPadding: 10,
scrollable: true
},
initComponent: function () {
this.items = [{
title: Ngcp.csc.locales.callforward.source_one[localStorage.getItem('languageSelected')],
id: 'companyhours-tab-everybody',
items: [
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
_firstprefix: 'everybody-',
_secondprefix: 'companyHours-'
})
],
listeners: {
activate: 'onTabClicked'
}
}, {
bind: {
title: '{source_lista_title}'
},
id: 'companyhours-tab-listA',
iconCls: Ngcp.csc.icons.pencil + ' cf-edit edit-listA',
iconAlign: 'right',
items: [
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
_firstprefix: 'listA-',
_secondprefix: 'companyHours-'
})
],
listeners: {
activate: 'onTabClicked'
}
}, {
bind: {
title: '{source_listb_title}'
},
id: 'companyhours-tab-listB',
iconCls: Ngcp.csc.icons.pencil + ' cf-edit edit-listB',
iconAlign: 'right',
items: [
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
_firstprefix: 'listB-',
_secondprefix: 'companyHours-'
})
],
listeners: {
activate: 'onTabClicked'
}
}]
this.callParent();
}
});
Loading…
Cancel
Save