calendarimporter 2.1.0:
- ics sync is now implemented
This commit is contained in:
@@ -16,8 +16,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
|
||||
* @constructor
|
||||
* @param {Object} config Configuration object
|
||||
*/
|
||||
constructor : function(config)
|
||||
{
|
||||
constructor : function(config) {
|
||||
config = config || {};
|
||||
|
||||
var store = new Ext.data.JsonStore({
|
||||
@@ -39,9 +38,8 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
|
||||
|
||||
Ext.applyIf(config, {
|
||||
height : 400,
|
||||
title : _('Calendar Sync settings - Comming soon'),
|
||||
title : _('Calendar Sync settings'),
|
||||
xtype : 'calendarimporter.settingscalsyncwidget',
|
||||
disabled : true,
|
||||
layout : {
|
||||
// override from SettingsWidget
|
||||
type : 'fit'
|
||||
@@ -63,8 +61,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
|
||||
* {@link Zarafa.settings.SettingsModel} into the UI of this category.
|
||||
* @param {Zarafa.settings.SettingsModel} settingsModel The settings to load
|
||||
*/
|
||||
update : function(settingsModel)
|
||||
{
|
||||
update : function(settingsModel) {
|
||||
this.model = settingsModel;
|
||||
|
||||
// Convert the signatures into Store data
|
||||
@@ -85,8 +82,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
|
||||
* This is used to update the settings from the UI into the {@link Zarafa.settings.SettingsModel settings model}.
|
||||
* @param {Zarafa.settings.SettingsModel} settingsModel The settings to update
|
||||
*/
|
||||
updateSettings : function(settingsModel)
|
||||
{
|
||||
updateSettings : function(settingsModel) {
|
||||
settingsModel.beginEdit();
|
||||
|
||||
// Start reading the Grid store and convert the contents back into
|
||||
@@ -111,4 +107,4 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
|
||||
}
|
||||
});
|
||||
|
||||
Ext.reg('calendarimporter.settingscalsyncwidget', Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget);
|
||||
Ext.reg('calendarimporter.settingscalsyncwidget', Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget);
|
@@ -12,20 +12,18 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditContentPanel = Ext.e
|
||||
* @constructor
|
||||
* @param config Configuration structure
|
||||
*/
|
||||
constructor : function(config)
|
||||
{
|
||||
constructor : function(config) {
|
||||
config = config || {};
|
||||
|
||||
// Add in some standard configuration data.
|
||||
Ext.applyIf(config, {
|
||||
// Override from Ext.Component
|
||||
xtype : 'calendarimporter.calsynceditcontentpanel',
|
||||
// Override from Ext.Component
|
||||
layout : 'fit',
|
||||
model : true,
|
||||
autoSave : false,
|
||||
width : 400,
|
||||
height : 100,
|
||||
height : 350,
|
||||
title : _('ICAL Sync'),
|
||||
items : [{
|
||||
xtype : 'calendarimporter.calsynceditpanel',
|
||||
|
@@ -18,8 +18,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
* @constructor
|
||||
* @param config Configuration structure
|
||||
*/
|
||||
constructor : function(config)
|
||||
{
|
||||
constructor : function(config) {
|
||||
config = config || {};
|
||||
|
||||
if(config.item)
|
||||
@@ -28,7 +27,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
Ext.applyIf(config, {
|
||||
// Override from Ext.Component
|
||||
xtype : 'calendarimporter.calsynceditpanel',
|
||||
labelAlign : 'left',
|
||||
labelAlign : 'top',
|
||||
defaultType: 'textfield',
|
||||
items : this.createPanelItems(config),
|
||||
buttons: [{
|
||||
@@ -68,9 +67,9 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
icsurl: this.icsurl.getValue(),
|
||||
intervall: this.intervall.getValue(),
|
||||
user: this.user.getValue(),
|
||||
pass: this.pass.getValue(),
|
||||
pass: Ext.util.base64.encode(this.pass.getValue()),
|
||||
calendar: this.calendar.getValue(),
|
||||
lastsync: 0
|
||||
lastsync: "never"
|
||||
});
|
||||
}
|
||||
|
||||
@@ -81,7 +80,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
this.currentItem.set('icsurl', this.icsurl.getValue());
|
||||
this.currentItem.set('intervall', this.intervall.getValue());
|
||||
this.currentItem.set('user', this.user.getValue());
|
||||
this.currentItem.set('pass', this.pass.getValue());
|
||||
this.currentItem.set('pass', Ext.util.base64.encode(this.pass.getValue()));
|
||||
this.currentItem.set('calendar', this.calendar.getValue());
|
||||
}
|
||||
this.dialog.close();
|
||||
@@ -109,7 +108,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
icsurl = config.item.get('icsurl');
|
||||
intervall = config.item.get('intervall');
|
||||
user = config.item.get('user');
|
||||
pass = config.item.get('pass');
|
||||
pass = Ext.util.base64.decode(config.item.get('pass'));
|
||||
calendar = config.item.get('calendar');
|
||||
}
|
||||
|
||||
@@ -144,16 +143,15 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
return [{
|
||||
xtype: 'fieldset',
|
||||
title: _('ICAL Information'),
|
||||
defaultType: 'textfield',
|
||||
layout: 'anchor',
|
||||
defaultType: 'textfield',
|
||||
layout: 'form',
|
||||
flex: 1,
|
||||
defaults: {
|
||||
anchor: '100%',
|
||||
flex: 1,
|
||||
labelWidth: 120
|
||||
flex: 1
|
||||
},
|
||||
items: [{
|
||||
fieldLabel: _('ICS Url'),
|
||||
fieldLabel: 'ICS Url',
|
||||
name: 'icsurl',
|
||||
ref: '../icsurl',
|
||||
value: icsurl,
|
||||
@@ -176,7 +174,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
},
|
||||
{
|
||||
xtype:'numberfield',
|
||||
fieldLabel: _('Sync Intervall'),
|
||||
fieldLabel: _('Sync Intervall (minutes)'),
|
||||
name: 'intervall',
|
||||
ref: '../intervall',
|
||||
value: intervall,
|
||||
@@ -187,8 +185,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
xtype: 'fieldset',
|
||||
title: _('Authentication (optional)'),
|
||||
defaultType: 'textfield',
|
||||
labelWidth: 120,
|
||||
layout: 'anchor',
|
||||
layout: 'form',
|
||||
defaults: {
|
||||
anchor: '100%'
|
||||
},
|
||||
|
@@ -45,7 +45,7 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncPanel = Ext.extend(Ext.Panel,
|
||||
{
|
||||
return [{
|
||||
xtype : 'displayfield',
|
||||
value : _('Here you can enter .ics files that will be synchronised.'),
|
||||
value : _('Setup calendars you want to subscribe to.'),
|
||||
fieldClass : 'x-form-display-field'
|
||||
}, {
|
||||
xtype : 'container',
|
||||
|
Reference in New Issue
Block a user