]>
git.proxmox.com Git - pmg-gui.git/blob - js/ObjectGroupConfiguration.js
1 Ext
.define('PMG.ObjectGroupConfiguration', {
2 extend
: 'Ext.panel.Panel',
4 ogclass
: undefined, // who, when, what
7 layout
: { type
: 'hbox', align
: 'stretch' },
10 initComponent : function() {
13 if (me
.ogclass
=== undefined) {
14 throw "undefined object group class"
17 if (!(me
.title
= PMG
.Utils
.oclass_text
[me
.ogclass
])) {
18 throw "unknown object group class";
21 var left
= Ext
.create('PMG.ObjectGroupList', {
28 var right
= Ext
.create('PMG.ObjectGroup', {
29 otype_list
: me
.otype_list
,
33 dblclickOGInfo: function(w
, e
, t
, ogdata
) {
34 // test if the correct groups is selected (just to be sure)
35 var rec
= left
.selModel
.getSelection()[0];
36 if (rec
&& rec
.data
&& rec
.data
.id
=== ogdata
.id
) {
44 me
.mon(left
.selModel
, "selectionchange", function() {
45 var rec
= left
.selModel
.getSelection()[0];
46 if (!(rec
&& rec
.data
&& rec
.data
.id
)) {
49 right
.setObjectInfo(rec
.data
);
50 var baseurl
= '/config/ruledb/' + me
.ogclass
+ '/' + rec
.data
.id
;
51 right
.setBaseUrl(baseurl
);
54 me
.items
= [ left
, { xtype
: 'splitter' }, right
];
60 Ext
.define('PMG.WhoConfiguration', {
61 extend
: 'PMG.ObjectGroupConfiguration',
62 alias
: 'widget.pmgWhoConfiguration',
65 otype_list
: [1000, 1001, 1002, 1003, 1004]
68 Ext
.define('PMG.WhenConfiguration', {
69 extend
: 'PMG.ObjectGroupConfiguration',
70 alias
: 'widget.pmgWhenConfiguration',
76 Ext
.define('PMG.WhatConfiguration', {
77 extend
: 'PMG.ObjectGroupConfiguration',
78 alias
: 'widget.pmgWhatConfiguration',
84 Ext
.define('PMG.ActionConfiguration', {
85 extend
: 'PMG.ObjectGroupConfiguration',
86 alias
: 'widget.pmgActionConfiguration',