changed the way to download ics files
This commit is contained in:
parent
2e228b57da
commit
5af208a20f
@ -20,6 +20,14 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
|
|||||||
|
|
||||||
/* keep the parsed result here, for timezone changes... */
|
/* keep the parsed result here, for timezone changes... */
|
||||||
parsedresult: null,
|
parsedresult: null,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The internal 'iframe' which is hidden from the user, which is used for downloading
|
||||||
|
* attachments. See {@link #doOpen}.
|
||||||
|
* @property
|
||||||
|
* @type Ext.Element
|
||||||
|
*/
|
||||||
|
downloadFrame : undefined,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @constructor
|
* @constructor
|
||||||
@ -575,9 +583,15 @@ Zarafa.plugins.calendarimporter.dialogs.ImportPanel = Ext.extend(Ext.Panel, {
|
|||||||
*/
|
*/
|
||||||
downLoadICS : function(response) {
|
downLoadICS : function(response) {
|
||||||
Zarafa.common.dialogs.MessageBox.hide();
|
Zarafa.common.dialogs.MessageBox.hide();
|
||||||
if(response.status === true) {
|
if(response.status === true) {
|
||||||
// needs to be window.open, document.location.href kills the extjs response handler...
|
if(!this.downloadFrame){
|
||||||
window.open('plugins/calendarimporter/php/download.php?fileid='+response.fileid+'&basedir='+response.basedir+'&secid='+response.secid+'&realname='+response.realname,"Download");
|
this.downloadFrame = Ext.getBody().createChild({
|
||||||
|
tag: 'iframe',
|
||||||
|
cls: 'x-hidden'
|
||||||
|
});
|
||||||
|
}
|
||||||
|
var url = 'plugins/calendarimporter/php/download.php?fileid='+response.fileid+'&basedir='+response.basedir+'&secid='+response.secid+'&realname='+response.realname;
|
||||||
|
this.downloadFrame.dom.contentWindow.location = url;
|
||||||
} else {
|
} else {
|
||||||
container.getNotifier().notify('error', 'Export Failed', 'ICal File creation failed!');
|
container.getNotifier().notify('error', 'Export Failed', 'ICal File creation failed!');
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user