mirror of https://github.com/sipwise/ngcp-csc.git
- chat users are now grouped in teams - user can add/remove chat channels and add/remove users with both drag and drop or bulk selection - message textarea now accepts line breaks (enter + shift) - added icons to trigger call/videocalls (will be implemented in separat ticket) Change-Id: Ibc48ff24fbe85c8462ae035970826756d6f56d73changes/16/9316/1
parent
39a2ef8168
commit
6fcfcbfbd7
@ -1,25 +1,17 @@
|
|||||||
Ext.define('NgcpCsc.store.ChatList', {
|
Ext.define('NgcpCsc.store.ChatList', {
|
||||||
extend: 'Ext.data.Store',
|
extend: 'Ext.data.TreeStore',
|
||||||
|
|
||||||
alias: 'store.chatlist',
|
alias: 'store.chatlist',
|
||||||
|
|
||||||
storeId: 'ChatList',
|
storeId: 'ChatList',
|
||||||
|
|
||||||
model: 'NgcpCsc.model.ChatList',
|
|
||||||
|
|
||||||
autoLoad: true,
|
|
||||||
|
|
||||||
proxy: {
|
proxy: {
|
||||||
type: 'ajax',
|
type: 'ajax',
|
||||||
url: '/resources/data/chatlist.json',
|
url: 'resources/data/chatlist.json'
|
||||||
reader: {
|
|
||||||
type: 'json',
|
|
||||||
rootProperty: 'data'
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
sorters: {
|
sorters: [{
|
||||||
direction: 'DESC',
|
property: 'online',
|
||||||
property: 'online'
|
direction: 'DESC'
|
||||||
}
|
}]
|
||||||
});
|
});
|
||||||
|
@ -1,23 +1,91 @@
|
|||||||
Ext.define('NgcpCsc.view.pages.chat.ChatList', {
|
Ext.define('NgcpCsc.view.pages.chat.ChatList', {
|
||||||
extend: 'Ext.menu.Menu',
|
extend: 'Ext.tree.Panel',
|
||||||
|
|
||||||
alias: 'widget.chatlist',
|
alias: 'widget.chatlist',
|
||||||
|
|
||||||
viewModel: {
|
|
||||||
type: 'chatlist'
|
|
||||||
},
|
|
||||||
|
|
||||||
controller: 'chatlist',
|
controller: 'chatlist',
|
||||||
|
|
||||||
|
itemId:'chatlist',
|
||||||
|
|
||||||
title: Ngcp.csc.locales.chat.title[localStorage.getItem('languageSelected')],
|
title: Ngcp.csc.locales.chat.title[localStorage.getItem('languageSelected')],
|
||||||
|
|
||||||
|
hideHeaders: true,
|
||||||
|
|
||||||
cls: 'navigation-email',
|
cls: 'navigation-email',
|
||||||
|
|
||||||
iconCls: 'x-fa fa-group',
|
store: 'ChatList',
|
||||||
|
|
||||||
floating: false,
|
rootVisible: false,
|
||||||
|
|
||||||
|
viewConfig: {
|
||||||
|
plugins: {
|
||||||
|
ptype: 'treeviewdragdrop',
|
||||||
|
sortOnDrop: true,
|
||||||
|
containerScroll: true
|
||||||
|
},
|
||||||
listeners: {
|
listeners: {
|
||||||
click: 'itemListClicked'
|
beforecellclick: 'preventTabOpen'
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
tools: [{
|
||||||
|
type: 'plus',
|
||||||
|
tooltip: Ngcp.csc.locales.chat.new_group[localStorage.getItem('languageSelected')],
|
||||||
|
callback: 'showTabBar'
|
||||||
|
}],
|
||||||
|
|
||||||
|
dockedItems: [{
|
||||||
|
xtype: 'toolbar',
|
||||||
|
dock: 'top',
|
||||||
|
hidden: true,
|
||||||
|
items: [{
|
||||||
|
xtype: 'textfield',
|
||||||
|
name: 'newChatName',
|
||||||
|
width: '80%',
|
||||||
|
emptyText: Ngcp.csc.locales.chat.provide_name[localStorage.getItem('languageSelected')],
|
||||||
|
minLength: 1
|
||||||
|
}, {
|
||||||
|
xtype: 'button',
|
||||||
|
text: Ngcp.csc.locales.common.add[localStorage.getItem('languageSelected')],
|
||||||
|
handler: 'createNewChannel'
|
||||||
|
}]
|
||||||
|
}],
|
||||||
|
listeners: {
|
||||||
|
beforeitemclick: 'nodeClicked',
|
||||||
|
beforedrop: 'onBeforeUserDropped'
|
||||||
|
},
|
||||||
|
|
||||||
|
defaults: {
|
||||||
|
menuDisabled: true
|
||||||
|
},
|
||||||
|
|
||||||
|
columns: [{
|
||||||
|
xtype: 'treecolumn',
|
||||||
|
dataIndex: 'name',
|
||||||
|
renderer: 'renderStatus',
|
||||||
|
flex: 2
|
||||||
|
}, {
|
||||||
|
xtype: 'actioncolumn',
|
||||||
|
text: 'actions',
|
||||||
|
flex: 1,
|
||||||
|
items: [{
|
||||||
|
tooltip: Ngcp.csc.locales.common.call[localStorage.getItem('languageSelected')],
|
||||||
|
getClass: function(value, context) {
|
||||||
|
return (context.record && context.record.get('leaf')) ? 'x-phone-display' : '';
|
||||||
|
},
|
||||||
|
handler: 'startCall'
|
||||||
|
}, {
|
||||||
|
tooltip: Ngcp.csc.locales.common.videocall[localStorage.getItem('languageSelected')],
|
||||||
|
getClass: function(value, context) {
|
||||||
|
return (context.record && context.record.get('leaf')) ? 'x-video-display' : '';
|
||||||
|
},
|
||||||
|
handler: 'startVideoCall'
|
||||||
|
}, {
|
||||||
|
//tooltip: Ngcp.csc.locales.common.delete[localStorage.getItem('languageSelected')],
|
||||||
|
getClass: function(value, context) {
|
||||||
|
return (context.record && !context.record.get('leaf')) ? 'x-drop-display' : '';
|
||||||
|
},
|
||||||
|
handler: 'deleteNode'
|
||||||
|
}]
|
||||||
|
}]
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in new issue