diff --git a/js/Makefile b/js/Makefile index 503aea2..37664e4 100644 --- a/js/Makefile +++ b/js/Makefile @@ -2,7 +2,7 @@ JSSRC= \ Utils.js \ LoginWindow.js \ ServerAdministration.js \ - ObjectGroup.js \ + ObjectGroupList.js \ Who.js \ WhoConfiguration.js \ RuleConfiguration.js \ diff --git a/js/ObjectGroup.js b/js/ObjectGroupList.js similarity index 91% rename from js/ObjectGroup.js rename to js/ObjectGroupList.js index d940a4c..9e24c6b 100644 --- a/js/ObjectGroup.js +++ b/js/ObjectGroupList.js @@ -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 }; diff --git a/js/WhoConfiguration.js b/js/WhoConfiguration.js index bd2bd10..28b10e0 100644 --- a/js/WhoConfiguration.js +++ b/js/WhoConfiguration.js @@ -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 });