{
if (window.confirm(DIMP.text_compose.cancel)) {
if ((this.is_popup || DIMP.conf_compose.popup) &&
- DIMP.baseWindow.DimpBase &&
+ DimpCore.base &&
!DIMP.conf_compose.qreply) {
- DIMP.baseWindow.focus();
+ DimpCore.base.focus();
}
DimpCore.doAction(DIMP.conf_compose.auto_save_interval_val ? 'deleteDraft' : 'cancelCompose', { imp_compose: $F('composeCache') }, { ajaxopts: { asynchronous: DIMP.conf_compose.qreply } });
this.updateDraftsMailbox();
updateDraftsMailbox: function()
{
if (this.is_popup &&
- DIMP.baseWindow.DimpBase &&
- DIMP.baseWindow.DimpBase.folder == DIMP.conf_compose.drafts_mbox) {
- DIMP.baseWindow.DimpBase.poll();
+ DimpCore.base &&
+ DimpCore.base.DimpBase.folder == DIMP.conf_compose.drafts_mbox) {
+ DimpCore.base.DimpBase.poll();
}
},
if (d.action == 'saveDraft') {
if (this.is_popup &&
- DIMP.baseWindow.DimpBase &&
+ DimpCore.base &&
!DIMP.conf_compose.qreply) {
- DIMP.baseWindow.DimpCore.showNotifications(r.msgs);
+ DimpCore.base.DimpCore.showNotifications(r.msgs);
r.msgs = [];
}
if (DIMP.conf_compose.close_draft) {
break;
case 'sendMessage':
- if (this.is_popup && DIMP.baseWindow.DimpBase) {
+ if (this.is_popup && DimpCore.base) {
if (d.reply_type) {
- DIMP.baseWindow.DimpBase.flag(d.reply_type == 'forward' ? '$forwarded' : '\\answered', true, { uid: d.uid, mailbox: d.reply_folder, noserver: true });
+ DimpCore.base.DimpBase.flag(d.reply_type == 'forward' ? '$forwarded' : '\\answered', true, { uid: d.uid, mailbox: d.reply_folder, noserver: true });
}
if (d.mailbox) {
- DIMP.baseWindow.DimpBase.mailboxCallback(r);
+ DimpCore.base.DimpBase.mailboxCallback(r);
}
if (d.draft_delete) {
- DIMP.baseWindow.DimpBase.poll();
+ DimpCore.base.DimpBase.poll();
}
if (d.log) {
- DIMP.baseWindow.DimpBase.updateMsgLog(d.log, { uid: d.uid, mailbox: d.reply_folder });
+ DimpCore.base.DimpBase.updateMsgLog(d.log, { uid: d.uid, mailbox: d.reply_folder });
}
if (!DIMP.conf_compose.qreply) {
- DIMP.baseWindow.DimpCore.showNotifications(r.msgs);
+ DimpCore.base.DimpCore.showNotifications(r.msgs);
r.msgs = [];
}
}
return this.closeCompose();
case 'redirectMessage':
- if (this.is_popup && DIMP.baseWindow.DimpBase) {
+ if (this.is_popup && DimpCore.base) {
if (d.log) {
- DIMP.baseWindow.DimpBase.updateMsgLog(d.log, { uid: d.uid, mailbox: d.mbox });
+ DimpCore.base.DimpBase.updateMsgLog(d.log, { uid: d.uid, mailbox: d.mbox });
}
if (!DIMP.conf_compose.qreply) {
- DIMP.baseWindow.DimpCore.showNotifications(r.msgs);
+ DimpCore.base.DimpCore.showNotifications(r.msgs);
r.msgs = [];
}
}
DimpCore.growler_log = false;
DimpCore.init();
- this.is_popup = DIMP.baseWindow.DimpBase;
+ this.is_popup = DimpCore.base;
/* Initialize redirect elements (always needed). */
$('redirect').observe('submit', Event.stop);
// DMenu, Growler, inAjaxCallback, is_init, is_logout
// onDoActionComplete
alarms: {},
+ base: null,
growler_log: true,
server_error: 0,
/* Determine base window. Need a try/catch block here since, if the
* page was loaded by an opener out of this current domain, this will
* throw an exception. */
- DIMP.baseWindow = {};
try {
if (parent.opener &&
parent.opener.location.host == window.location.host &&
parent.opener.DimpCore) {
- DIMP.baseWindow = parent.opener.DIMP.baseWindow || parent.opener;
+ this.base = parent.opener.DimpCore.base || parent.opener;
}
} catch (e) {}
}
case 'button_deleted':
case 'button_ham':
case 'button_spam':
- if (DIMP.baseWindow.DimpBase) {
- DIMP.baseWindow.focus();
+ if (DimpCore.base) {
+ DimpCore.base.focus();
if (id == 'button_deleted') {
- DIMP.baseWindow.DimpBase.deleteMsg({ uid: this.uid, mailbox: this.mailbox });
+ DimpCore.base.DimpBase.deleteMsg({ uid: this.uid, mailbox: this.mailbox });
} else {
- DIMP.baseWindow.DimpBase.reportSpam(id == 'button_spam', { uid: this.uid, mailbox: this.mailbox });
+ DimpCore.base.DimpBase.reportSpam(id == 'button_spam', { uid: this.uid, mailbox: this.mailbox });
}
window.close();
}
DimpCore.updateMsgLog(this.log);
}
- if (this.strip && DIMP.baseWindow.DimpBase) {
- DIMP.baseWindow.DimpBase.poll();
+ if (this.strip && DimpCore.base) {
+ DimpCore.base.DimpBase.poll();
}
$('dimpLoading').hide();