Ext.define('Ext.ux.folderExplorer.LogWindow', {
	extend: 'Ext.window.Window',
	alias: ['widget.ip2FolderExplorerLogWindow'],
	height: 240,
	width: 440,
	autoScroll: true,
	collapsible: true,
	layout: {
		type: 'fit'
	},
	initComponent: function() {
		var me = this;

		me.title = me.getI18N('logWindowTitle') + ' ' + me.record.data.name;

		me.grid = Ext.create('Ext.ux.folderExplorer.LogGrid', {
			record: me.record,
			border: false
		});

		me.items = [
			me.grid
		];

		me.buttons = [{
			xtype: 'button',
			iconCls: 'pf-close',
			text: 'OK',
			handler: function() {
				me.close();
			}
		}];

		me.callParent();
	},

	/* ----------------------------------------------------------------------------------------------------
		get I18N by key
	---------------------------------------------------------------------------------------------------- */
	getI18N: function(key) {
		return ip2.i18n(ip2.folderExplorer.getTextValue(key));
	}
});
