2017-02-21 08:12:13 +01:00
|
|
|
Ext.namespace('Zarafa.plugins.mdm.dialogs');
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @class Zarafa.plugins.mdm.dialogs.MDMDeviceContentPanel
|
2017-04-20 13:49:55 +02:00
|
|
|
* @extends Zarafa.core.ui.RecordContentPanel
|
2017-02-21 08:12:13 +01:00
|
|
|
* @xtype mdmplugin.devicecontentpanel
|
|
|
|
*
|
|
|
|
* The content panel which is use to show device detail panel.
|
|
|
|
*/
|
2017-04-20 13:49:55 +02:00
|
|
|
Zarafa.plugins.mdm.dialogs.MDMDeviceContentPanel = Ext.extend(Zarafa.core.ui.RecordContentPanel, {
|
2017-02-21 08:12:13 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
* @param config Configuration structure
|
|
|
|
*/
|
|
|
|
constructor: function (config)
|
|
|
|
{
|
|
|
|
config = config || {};
|
2017-04-20 13:49:55 +02:00
|
|
|
var isKOE = config.record && config.record.get('koeversion') ? true : false;
|
2017-02-21 08:12:13 +01:00
|
|
|
Ext.applyIf(config, {
|
|
|
|
xtype: 'mdmplugin.devicecontentpanel',
|
|
|
|
modal: true,
|
|
|
|
title: dgettext('plugin_mdm', config.record.get('devicetype')),
|
2017-04-20 13:49:55 +02:00
|
|
|
recordComponentPluginConfig: Ext.applyIf(config.recordComponentPluginConfig || {}, {
|
|
|
|
allowWrite: true,
|
|
|
|
useShadowStore: true
|
|
|
|
}),
|
|
|
|
layout: 'fit',
|
|
|
|
stateful: false,
|
|
|
|
showLoadMask: false,
|
|
|
|
width: isKOE ? 440 : 405,
|
|
|
|
height: isKOE ? 450 : 420,
|
2017-02-21 08:12:13 +01:00
|
|
|
items: [{
|
|
|
|
xtype: 'mdmplugin.mdmdevicepanel',
|
|
|
|
record: config.record,
|
2017-04-20 13:49:55 +02:00
|
|
|
isKoe: isKOE,
|
2017-02-21 08:12:13 +01:00
|
|
|
buttons: [{
|
|
|
|
text: _('Ok'),
|
|
|
|
handler: this.onOk,
|
|
|
|
scope: this
|
|
|
|
}]
|
|
|
|
}]
|
|
|
|
});
|
|
|
|
|
|
|
|
Zarafa.plugins.mdm.dialogs.MDMDeviceContentPanel.superclass.constructor.call(this, config);
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Action handler when the user presses the "Ok" button.
|
|
|
|
* This will close the panel.
|
|
|
|
*/
|
|
|
|
onOk: function ()
|
|
|
|
{
|
|
|
|
this.close();
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
|
|
|
Ext.reg('mdmplugin.devicecontentpanel', Zarafa.plugins.mdm.dialogs.MDMDeviceContentPanel);
|