mirror of https://github.com/sipwise/ngcp-csc.git
Implement ngcp-csc sourceset widget with functionality for editing and adding sources in the form of numbers or buddies. Only contains a generic row named "Phone" for now. Also refactored some code in controller. Change-Id: I5c7167dbdc92ade2aa2d9a2f471c66473afc8609changes/31/10731/3
parent
f6101e9b79
commit
73ec230971
@ -0,0 +1,9 @@
|
||||
Ext.define('NgcpCsc.model.CallForwardSourceset', {
|
||||
extend: 'Ext.data.Model',
|
||||
|
||||
fields: [{
|
||||
name: 'phone',
|
||||
type: 'string'
|
||||
}]
|
||||
|
||||
});
|
||||
@ -0,0 +1,10 @@
|
||||
Ext.define('NgcpCsc.store.CallForwardSourceset', {
|
||||
extend: 'Ext.data.Store',
|
||||
|
||||
storeId: 'CallForwardSourceset',
|
||||
|
||||
model: 'NgcpCsc.model.CallForwardSourceset',
|
||||
|
||||
autoLoad: true
|
||||
|
||||
});
|
||||
@ -0,0 +1,42 @@
|
||||
Ext.define('NgcpCsc.view.pages.callforward.CallForwardSourcesetGrid', {
|
||||
extend: 'Ext.grid.Panel',
|
||||
|
||||
xtype: 'callforwardsourcesetgrid',
|
||||
|
||||
viewConfig: {
|
||||
markDirty: false
|
||||
},
|
||||
|
||||
plugins: {
|
||||
ptype: 'cellediting',
|
||||
clicksToEdit: 1
|
||||
},
|
||||
|
||||
hideHeaders: true,
|
||||
|
||||
initComponent: function() {
|
||||
this.columns = {
|
||||
defaults: {
|
||||
menuDisabled: true,
|
||||
resizable: false
|
||||
},
|
||||
items: [{
|
||||
text: Ngcp.csc.locales.callforward.phone[localStorage.getItem('languageSelected')],
|
||||
dataIndex: 'phone',
|
||||
editor: 'textfield',
|
||||
flex: 1
|
||||
}, {
|
||||
text: Ngcp.csc.locales.common.delete[localStorage.getItem('languageSelected')],
|
||||
xtype: 'actioncolumn',
|
||||
width: 30,
|
||||
align: 'right',
|
||||
items: [{
|
||||
glyph: 'xf1f8@FontAwesome',
|
||||
handler: 'removeSourcelistRecord'
|
||||
}]
|
||||
}]
|
||||
};
|
||||
this.callParent();
|
||||
}
|
||||
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
{
|
||||
"data": [{
|
||||
"phone": "43775600",
|
||||
}, {
|
||||
"phone": "John Smith",
|
||||
}, {
|
||||
"phone": "43770061",
|
||||
}, {
|
||||
"phone": "43806402",
|
||||
}, {
|
||||
"phone": "Bob Jones",
|
||||
}, {
|
||||
"phone": "43806402",
|
||||
}]
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
{
|
||||
"data": [{
|
||||
"phone": "King Cole",
|
||||
}, {
|
||||
"phone": "11656143",
|
||||
}, {
|
||||
"phone": "Carla James",
|
||||
}, {
|
||||
"phone": "43806401",
|
||||
}, {
|
||||
"phone": "11656142",
|
||||
}]
|
||||
}
|
||||
Loading…
Reference in new issue