rename ObjectGroup to ObjectGroupList

This commit is contained in:
Dietmar Maurer 2017-03-02 06:22:16 +01:00
parent 56b0691b19
commit a43acf2e5c
3 changed files with 15 additions and 8 deletions

View File

@ -2,7 +2,7 @@ JSSRC= \
Utils.js \
LoginWindow.js \
ServerAdministration.js \
ObjectGroup.js \
ObjectGroupList.js \
Who.js \
WhoConfiguration.js \
RuleConfiguration.js \

View File

@ -15,17 +15,21 @@ Ext.define('pmg-object-list', {
});
Ext.define('PMG.ObjectGroup', {
Ext.define('PMG.ObjectGroupList', {
extend: 'Ext.grid.GridPanel',
alias: ['widget.pmgObjectGroup'],
alias: ['widget.pmgObjectGroupList'],
ogclass: 'who',
ogclass: undefined, // 'who', 'when', 'what'
subject: 'Object Group List', // please overwrite
subject: gettext('Object Group'),
initComponent : function() {
var me = this;
if (!me.ogclass) {
throw "ogclass not initialized";
}
var baseurl = "/config/ruledb/" + me.ogclass;
var store = new Ext.data.Store({
@ -84,7 +88,7 @@ Ext.define('PMG.ObjectGroup', {
fieldLabel: gettext('Name')
},
{
xtype: 'textfield',
xtype: 'textareafield',
name: 'info',
fieldLabel: gettext("Description")
}
@ -100,6 +104,7 @@ Ext.define('PMG.ObjectGroup', {
url: "/api2/extjs" + baseurl +'/' + rec.data.id + '/config',
method: 'PUT',
subject: me.subject,
width: 400,
items: inputItems
};
@ -125,6 +130,7 @@ Ext.define('PMG.ObjectGroup', {
method: 'POST',
url: "/api2/extjs" + baseurl,
create: true,
width: 400,
subject: me.subject,
items: inputItems
};

View File

@ -12,9 +12,10 @@ Ext.define('PMG.WhoConfiguration', {
initComponent : function() {
var me = this;
var left = Ext.create('PMG.ObjectGroup', {
var left = Ext.create('PMG.ObjectGroupList', {
width: 250,
ogclass: me.ogclass,
subject: me.title,
border: false
});