{
	xtype: 'container',
	closable: true,
	layout: 'fit',
	onInitialize: function(i_widget) {

		var i_self = this;

		var i_grid = Ext.widget("folderExplorerGrid", {
			path: '/www/dev/dms/customized/PIM spreadsheets',
			extentions: 'xls',
			columns: [
				{
					xtype: 'themedactioncolumn',
					icon: 'preview',
					width: 25,
					handler: function(view, rowIndex, colIndex) {
						var i_grid = view.up('gridpanel');
						var i_record = i_grid.getStore().getAt(rowIndex);
						window.location = '/ip2-services/ip2services.aspx?action=openExcel&name=' + i_record.get("name")+ '&path=' + i_record.get("path");
					}
				},
				{
					xtype: 'themedactioncolumn',
					icon: 'arrow-down',
					width: 25,
					handler: function(view, rowIndex, colIndex) {
						var i_grid = view.up('grid');
						var i_record = i_grid.getStore().getAt(rowIndex);

						Ext.MessageBox.show({
							title: i_grid.getI18N('confirmImportTitle'),
							msg: i_grid.getI18N('confirmImport') + ' <b>' + i_record.data.name + '</b>',
							buttons: Ext.MessageBox.YESNO,
							fn: function(btn, text) {
								switch (btn) {
									case 'yes':
										i_self.doImport(i_grid, i_record);
										break;
									case 'no':
										break;
									default:
										break;
								}
							},
							icon: Ext.MessageBox.QUESTION
						});
					}
				}
			]
		});

		i_widget.add(i_grid);
	},
	doImport: function(i_grid, i_record) {

		i_grid.setLoading(me.getI18N('please_wait'));
		Ext.Ajax.request({
			url: '/custom-config/services/impPimXls.aspx',
			params: {
				spreadsheet: i_record.get("path")
			},
			success: function(response, request) {
				i_grid.setLoading(me.getI18N(false));
				var o_result = Ext.JSON.decode(response.responseText);
				Ext.MessageBox.show({
					title: i_grid.getI18N('receipt'),
					msg: o_result.message,
					buttons: Ext.MessageBox.OK,
					icon:  o_result.success ? Ext.MessageBox.INFORMATION : Ext.MessageBox.ERROR
				});
			}
		});
	}
}
