53 lines
1.3 KiB
JavaScript
53 lines
1.3 KiB
JavaScript
|
Ext.namespace('Zarafa.plugins.mdm.dialogs');
|
||
|
|
||
|
/**
|
||
|
* @class Zarafa.plugins.mdm.dialogs.MDMDeviceContentPanel
|
||
|
* @extends Zarafa.core.ui.ContentPanel
|
||
|
* @xtype mdmplugin.devicecontentpanel
|
||
|
*
|
||
|
* The content panel which is use to show device detail panel.
|
||
|
*/
|
||
|
Zarafa.plugins.mdm.dialogs.MDMDeviceContentPanel = Ext.extend(Zarafa.core.ui.ContentPanel, {
|
||
|
|
||
|
/**
|
||
|
* @constructor
|
||
|
* @param config Configuration structure
|
||
|
*/
|
||
|
constructor: function (config)
|
||
|
{
|
||
|
config = config || {};
|
||
|
var isKOE = config.record && config.record.get('koeversion') ? true : false;
|
||
|
Ext.applyIf(config, {
|
||
|
xtype: 'mdmplugin.devicecontentpanel',
|
||
|
modal: true,
|
||
|
title: dgettext('plugin_mdm', config.record.get('devicetype')),
|
||
|
layout : 'fit',
|
||
|
stateful : false,
|
||
|
width : isKOE ? 440 : 405,
|
||
|
height : isKOE ? 395 : 360,
|
||
|
items: [{
|
||
|
xtype: 'mdmplugin.mdmdevicepanel',
|
||
|
record: config.record,
|
||
|
isKoe : isKOE,
|
||
|
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);
|