2013-03-30 14:55:18 +01:00
|
|
|
/**
|
|
|
|
* ImportContentPanel.js zarafa calender to ics im/exporter
|
|
|
|
*
|
|
|
|
* Author: Christoph Haas <christoph.h@sprinternet.at>
|
|
|
|
* Copyright (C) 2012-2013 Christoph Haas
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2012-12-29 19:49:24 +01:00
|
|
|
/**
|
|
|
|
* ImportContentPanel
|
|
|
|
*
|
|
|
|
* Container for the importpanel.
|
|
|
|
*/
|
2012-11-11 19:18:23 +01:00
|
|
|
Ext.namespace("Zarafa.plugins.calendarimporter.dialogs");
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @class Zarafa.plugins.calendarimporter.dialogs.ImportContentPanel
|
|
|
|
* @extends Zarafa.core.ui.ContentPanel
|
|
|
|
*
|
|
|
|
* The content panel which shows the hierarchy tree of Owncloud account files.
|
|
|
|
* @xtype calendarimportercontentpanel
|
|
|
|
*/
|
|
|
|
Zarafa.plugins.calendarimporter.dialogs.ImportContentPanel = Ext.extend(Zarafa.core.ui.ContentPanel, {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
* @param config Configuration structure
|
|
|
|
*/
|
2013-03-30 14:55:18 +01:00
|
|
|
constructor : function(config) {
|
2012-11-11 19:18:23 +01:00
|
|
|
config = config || {};
|
2012-12-05 22:31:10 +01:00
|
|
|
var title = _('Import Calendar File');
|
|
|
|
if(container.getSettingsModel().get("zarafa/v1/plugins/calendarimporter/enable_export")){
|
|
|
|
title = _('Import/Export Calendar File');
|
|
|
|
}
|
2012-11-11 19:18:23 +01:00
|
|
|
Ext.applyIf(config, {
|
2013-03-30 14:55:18 +01:00
|
|
|
layout : 'fit',
|
|
|
|
title : title,
|
|
|
|
closeOnSave : true,
|
|
|
|
width : 620,
|
|
|
|
height : 465,
|
2012-11-11 19:18:23 +01:00
|
|
|
//Add panel
|
2013-03-30 14:55:18 +01:00
|
|
|
items : [
|
2012-11-11 19:18:23 +01:00
|
|
|
{
|
2013-03-30 14:55:18 +01:00
|
|
|
xtype : 'calendarimporter.importpanel',
|
|
|
|
filename : config.filename
|
2012-11-12 23:57:50 +01:00
|
|
|
}
|
2012-11-11 19:18:23 +01:00
|
|
|
]
|
|
|
|
});
|
|
|
|
|
|
|
|
Zarafa.plugins.calendarimporter.dialogs.ImportContentPanel.superclass.constructor.call(this, config);
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
2012-11-12 23:57:50 +01:00
|
|
|
Ext.reg('calendarimporter.contentpanel' ,Zarafa.plugins.calendarimporter.dialogs.ImportContentPanel);
|