temp commit
This commit is contained in:
parent
4065607f40
commit
ad23a09802
@ -27,6 +27,7 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
|
||||
{ name : 'user' },
|
||||
{ name : 'pass' },
|
||||
{ name : 'intervall', type : 'int' },
|
||||
{ name : 'calendar' },
|
||||
{ name : 'lastsync' }
|
||||
],
|
||||
sortInfo : {
|
||||
@ -99,7 +100,8 @@ Zarafa.plugins.calendarimporter.settings.SettingsCalSyncWidget = Ext.extend(Zara
|
||||
'intervall' : icslink.get('intervall'),
|
||||
'user' : icslink.get('user'),
|
||||
'pass' : icslink.get('pass'),
|
||||
'lastsync' : icslink.get('lastsync')
|
||||
'lastsync' : icslink.get('lastsync'),
|
||||
'calendar' : icslink.get('calendar')
|
||||
};
|
||||
}
|
||||
settingsModel.set('zarafa/v1/contexts/calendar/icssync', icslinkData);
|
||||
|
@ -69,6 +69,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
intervall: this.intervall.getValue(),
|
||||
user: this.user.getValue(),
|
||||
pass: this.pass.getValue(),
|
||||
calendar: this.calendar.getValue(),
|
||||
lastsync: 0
|
||||
});
|
||||
}
|
||||
@ -81,6 +82,7 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
this.currentItem.set('intervall', this.intervall.getValue());
|
||||
this.currentItem.set('user', this.user.getValue());
|
||||
this.currentItem.set('pass', this.pass.getValue());
|
||||
this.currentItem.set('calendar', this.calendar.getValue());
|
||||
}
|
||||
this.dialog.close();
|
||||
}
|
||||
@ -97,22 +99,58 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
var intervall = "";
|
||||
var user = "";
|
||||
var pass = "";
|
||||
var calendar = "";
|
||||
|
||||
var defaultFolder = container.getHierarchyStore().getDefaultFolder('calendar'); // @type: Zarafa.hierarchy.data.MAPIFolderRecord
|
||||
var subFolders = defaultFolder.getChildren();
|
||||
var myStore = [];
|
||||
|
||||
if(config.item){
|
||||
icsurl = config.item.get('icsurl');
|
||||
intervall = config.item.get('intervall');
|
||||
user = config.item.get('user');
|
||||
pass = config.item.get('pass');
|
||||
calendar = config.item.get('calendar');
|
||||
}
|
||||
|
||||
/* add all local calendar folders */
|
||||
var i = 0;
|
||||
myStore.push(new Array(defaultFolder.getDefaultFolderKey(), defaultFolder.getDisplayName()));
|
||||
for(i = 0; i < subFolders.length; i++) {
|
||||
/* Store all subfolders */
|
||||
myStore.push(new Array(subFolders[i].getDisplayName(), subFolders[i].getDisplayName(), false)); // 3rd field = isPublicfolder
|
||||
}
|
||||
|
||||
/* add all shared calendar folders */
|
||||
var pubStore = container.getHierarchyStore().getPublicStore();
|
||||
|
||||
if(typeof pubStore !== "undefined") {
|
||||
try {
|
||||
var pubFolder = pubStore.getDefaultFolder("publicfolders");
|
||||
var pubSubFolders = pubFolder.getChildren();
|
||||
|
||||
for(i = 0; i < pubSubFolders.length; i++) {
|
||||
if(pubSubFolders[i].isContainerClass("IPF.Appointment")){
|
||||
myStore.push(new Array(pubSubFolders[i].getDisplayName(), pubSubFolders[i].getDisplayName() + " [Shared]", true)); // 3rd field = isPublicfolder
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.log("Error opening the shared folder...");
|
||||
console.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return [{
|
||||
xtype: 'fieldset',
|
||||
title: _('ICAL Information'),
|
||||
defaultType: 'textfield',
|
||||
labelWidth: 120,
|
||||
layout: 'anchor',
|
||||
flex: 1,
|
||||
defaults: {
|
||||
anchor: '100%'
|
||||
anchor: '100%',
|
||||
flex: 1,
|
||||
labelWidth: 120
|
||||
},
|
||||
items: [{
|
||||
fieldLabel: _('ICS Url'),
|
||||
@ -121,6 +159,21 @@ Zarafa.plugins.calendarimporter.settings.dialogs.CalSyncEditPanel = Ext.extend(E
|
||||
value: icsurl,
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype:'selectbox',
|
||||
fieldLabel: _('Destination Calendar'),
|
||||
name: 'calendar',
|
||||
ref: '../calendar',
|
||||
value: calendar,
|
||||
editable: false,
|
||||
store: myStore,
|
||||
mode: 'local',
|
||||
labelSeperator: ":",
|
||||
border: false,
|
||||
anchor: "100%",
|
||||
scope: this,
|
||||
allowBlank: false
|
||||
},
|
||||
{
|
||||
xtype:'numberfield',
|
||||
fieldLabel: _('Sync Intervall'),
|
||||
|
@ -70,6 +70,11 @@ Zarafa.plugins.calendarimporter.settings.ui.CalSyncGrid = Ext.extend(Ext.grid.Gr
|
||||
header : _('ICS File'),
|
||||
renderer : Zarafa.common.ui.grid.Renderers.text
|
||||
},
|
||||
{
|
||||
dataIndex : 'calendar',
|
||||
header : _('Destination Calender'),
|
||||
renderer : Zarafa.common.ui.grid.Renderers.text
|
||||
},
|
||||
{
|
||||
dataIndex : 'user',
|
||||
header : _('Authentication'),
|
||||
|
Loading…
Reference in New Issue
Block a user