Commit 96905454 authored by Dietmar Maurer's avatar Dietmar Maurer

copy dc/RoleView.js from manager to manager5

parent ca379160
Ext.define('PVE.dc.RoleView', {
extend: 'Ext.grid.GridPanel',
alias: ['widget.pveRoleView'],
initComponent : function() {
var me = this;
var store = new Ext.data.Store({
model: 'pve-roles',
sorters: {
property: 'roleid',
order: 'DESC'
}
});
var render_privs = function(value, metaData) {
if (!value) {
return '-';
}
// allow word wrap
metaData.style = 'white-space:normal;';
return value.replace(/\,/g, ' ');
};
PVE.Utils.monStoreErrors(me, store);
Ext.apply(me, {
store: store,
stateful: false,
viewConfig: {
trackOver: false
},
columns: [
{
header: gettext('Name'),
width: 150,
sortable: true,
dataIndex: 'roleid'
},
{
id: 'privs',
header: gettext('Privileges'),
sortable: false,
renderer: render_privs,
dataIndex: 'privs',
flex: 1
}
],
listeners: {
show: function() {
store.load();
}
}
});
me.callParent();
}
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment