mirror of https://github.com/sipwise/ngcp-csc.git
Split Ngcp-csc call forward module into three submodules based on timesource (always/after hours/company hours). Plus implement the following changes: * not bold text * new placement/implementation of timeset grid * add cursor pointer to sourceset/timeset grid * autofocus on bottom list A/B row when add new * remove bulletpoints * change to tabpanel for sourcesets * implement clickable icons in tabs * adjust layout of "first ring" and "then ring" fields and labels * implement 'big-820'/'small-100' layout to be consistent with other views * implement onEnterPressed ability * change structure of views (mainform/tabpanel, etc) and affected controllers to use new ids * ability to change List A/List B name * refactor controller where needed * implement validity check for controllers for saving "then ring" destinations to store * correct styling after restructuring views Change-Id: Ied00dd73f2044c0af2fb82a0be17c66c3c597663changes/38/12138/17
parent
32e28adf37
commit
bef4aed9e5
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,71 @@
|
||||
Ext.define('NgcpCsc.view.pages.callforward.afterhours.Afterhours', {
|
||||
extend: 'NgcpCsc.view.pages.callforward.CallForward',
|
||||
|
||||
xtype: 'afterhours',
|
||||
|
||||
ui: 'cf-mainform',
|
||||
|
||||
initComponent: function () {
|
||||
var callForwardAfterGrid = Ext.create('NgcpCsc.view.pages.callforward.CallForwardTimesetGrid', {
|
||||
id: 'cf-timeset-after-grid',
|
||||
store: Ext.create('NgcpCsc.store.CallForwardTimeset', {
|
||||
proxy: {
|
||||
type: 'ajax',
|
||||
url: '/resources/data/callForwardAfter.json',
|
||||
reader: {
|
||||
type: 'json',
|
||||
rootProperty: 'data'
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
this.items = [{
|
||||
userCls: Ext.os.is.Desktop ? 'big-820' : 'small-100',
|
||||
xtype: 'core-container',
|
||||
items: [{
|
||||
layout: 'responsivecolumn',
|
||||
xtype: 'container',
|
||||
items: [{
|
||||
xtype: 'panel',
|
||||
userCls: 'big-33 small-100 cf-calls-curing-section',
|
||||
items: [{
|
||||
layout: 'hbox',
|
||||
items: [{
|
||||
xtype: 'container',
|
||||
userCls: 'cf-calls-during',
|
||||
html: Ngcp.csc.locales.callforward.for_calls_during_after_hours[localStorage.getItem('languageSelected')],
|
||||
margin: '10 0 0 0'
|
||||
}, {
|
||||
xtype: 'button',
|
||||
userCls: 'cf-calendar-button',
|
||||
iconCls: Ngcp.csc.icons.calendar2x,
|
||||
handler: 'toggleAfterTimesetGrid'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
xtype: 'panel',
|
||||
userCls: 'big-66 small-100',
|
||||
bind: {
|
||||
hidden: '{after_hours}'
|
||||
},
|
||||
items: [
|
||||
callForwardAfterGrid
|
||||
]
|
||||
}]
|
||||
}, {
|
||||
xtype: 'container',
|
||||
userCls: 'cf-text',
|
||||
html: Ngcp.csc.locales.callforward.for_calling_parties[localStorage.getItem('languageSelected')],
|
||||
margin: '10 0 10 0'
|
||||
}, {
|
||||
xtype: 'statusbar',
|
||||
reference: 'loadingBar'
|
||||
}, {
|
||||
xtype: 'afterhourstabs'
|
||||
}]
|
||||
}];
|
||||
this.callParent();
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,71 @@
|
||||
Ext.define('NgcpCsc.view.pages.callforward.afterhours.AfterHoursTabs', {
|
||||
extend: 'Ext.tab.Panel',
|
||||
|
||||
xtype: 'afterhourstabs',
|
||||
|
||||
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: 'afterhours-tab-everybody',
|
||||
items: [
|
||||
Ext.create('NgcpCsc.view.pages.callforward.CallForwardMainForm', {
|
||||
_firstprefix: 'everybody-',
|
||||
_secondprefix: 'afterHours-'
|
||||
|
||||
})
|
||||
],
|
||||
listeners: {
|
||||
activate: 'onTabClicked'
|
||||
}
|
||||
}, {
|
||||
bind: {
|
||||
title: '{source_lista_title}'
|
||||
},
|
||||
id: 'afterhours-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-'
|
||||
})
|
||||
],
|
||||
listeners: {
|
||||
activate: 'onTabClicked'
|
||||
}
|
||||
}, {
|
||||
bind: {
|
||||
title: '{source_listb_title}'
|
||||
},
|
||||
id: 'afterhours-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-'
|
||||
})
|
||||
],
|
||||
listeners: {
|
||||
activate: 'onTabClicked'
|
||||
}
|
||||
}]
|
||||
|
||||
this.callParent();
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,44 @@
|
||||
Ext.define('NgcpCsc.view.pages.callforward.always.Always', {
|
||||
extend: 'NgcpCsc.view.pages.callforward.CallForward',
|
||||
|
||||
xtype: 'always',
|
||||
|
||||
ui: 'cf-mainform',
|
||||
|
||||
initComponent: function () {
|
||||
|
||||
this.items = [{
|
||||
userCls: Ext.os.is.Desktop ? 'big-820' : 'small-100',
|
||||
xtype: 'core-container',
|
||||
items: [{
|
||||
layout: 'responsivecolumn',
|
||||
xtype: 'container',
|
||||
items: [{
|
||||
xtype: 'panel',
|
||||
userCls: 'big-33 small-100 cf-calls-curing-section',
|
||||
items: [{
|
||||
layout: 'hbox',
|
||||
items: [{
|
||||
xtype: 'container',
|
||||
userCls: 'cf-calls-during',
|
||||
html: Ngcp.csc.locales.callforward.for_calls_during_always[localStorage.getItem('languageSelected')],
|
||||
margin: '10 0 0 0'
|
||||
}]
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
xtype: 'container',
|
||||
userCls: 'cf-text',
|
||||
html: Ngcp.csc.locales.callforward.for_calling_parties[localStorage.getItem('languageSelected')],
|
||||
margin: '10 0 10 0'
|
||||
}, {
|
||||
xtype: 'statusbar',
|
||||
reference: 'loadingBar'
|
||||
}, {
|
||||
xtype: 'alwaystabs'
|
||||
}]
|
||||
}];
|
||||
this.callParent();
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,70 @@
|
||||
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();
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,72 @@
|
||||
Ext.define('NgcpCsc.view.pages.callforward.companyhours.Companyhours', {
|
||||
extend: 'NgcpCsc.view.pages.callforward.CallForward',
|
||||
|
||||
xtype: 'companyhours',
|
||||
|
||||
ui: 'cf-mainform',
|
||||
|
||||
initComponent: function () {
|
||||
var callForwardCompanyGrid = Ext.create('NgcpCsc.view.pages.callforward.CallForwardTimesetGrid', {
|
||||
id: 'cf-timeset-company-grid',
|
||||
store: Ext.create('NgcpCsc.store.CallForwardTimeset', {
|
||||
proxy: {
|
||||
type: 'ajax',
|
||||
url: '/resources/data/callForwardCompany.json',
|
||||
reader: {
|
||||
type: 'json',
|
||||
rootProperty: 'data'
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
this.items = [{
|
||||
userCls: Ext.os.is.Desktop ? 'big-820' : 'small-100',
|
||||
xtype: 'core-container',
|
||||
items: [{
|
||||
layout: 'responsivecolumn',
|
||||
xtype: 'container',
|
||||
items: [{
|
||||
xtype: 'panel',
|
||||
userCls: 'big-33 small-100 cf-calls-curing-section',
|
||||
items: [{
|
||||
layout: 'hbox',
|
||||
items: [{
|
||||
xtype: 'container',
|
||||
userCls: 'cf-calls-during',
|
||||
html: Ngcp.csc.locales.callforward.for_calls_during_company_hours[localStorage.getItem('languageSelected')],
|
||||
margin: '10 0 0 0'
|
||||
}, {
|
||||
xtype: 'button',
|
||||
userCls: 'cf-calendar-button',
|
||||
iconCls: Ngcp.csc.icons.calendar2x,
|
||||
handler: 'toggleCompanyTimesetGrid'
|
||||
}]
|
||||
}]
|
||||
}, {
|
||||
xtype: 'panel',
|
||||
userCls: 'big-66 small-100',
|
||||
bind: {
|
||||
hidden: '{company_hours}'
|
||||
},
|
||||
items: [
|
||||
callForwardCompanyGrid
|
||||
]
|
||||
}]
|
||||
},
|
||||
{
|
||||
xtype: 'container',
|
||||
userCls: 'cf-text',
|
||||
html: Ngcp.csc.locales.callforward.for_calling_parties[localStorage.getItem('languageSelected')],
|
||||
margin: '10 0 10 0'
|
||||
}, {
|
||||
xtype: 'statusbar',
|
||||
reference: 'loadingBar'
|
||||
}, {
|
||||
xtype: 'companyhourstabs'
|
||||
}]
|
||||
}];
|
||||
this.callParent();
|
||||
}
|
||||
|
||||
});
|
@ -0,0 +1,70 @@
|
||||
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…
Reference in new issue