fix javascript error for missing toolbaractions

This commit is contained in:
Klaus Leithoff 2014-01-10 13:33:28 +00:00
parent b0f50abd78
commit 5f85d2a592

View File

@ -624,8 +624,8 @@ app.classes.mail = AppJS.extend(
//console.log("mail_preview",dataElem);
this.mail_selectedMails.push(_id);
this.mail_disablePreviewArea(false);
var toolbaractions = JSON.parse(dataElem.data.toolbaractions);
this.et2.getWidgetById('toolbar').set_actions(toolbaractions);
var toolbaractions = ((typeof dataElem != 'undefined' && typeof dataElem.data != 'undefined' && typeof dataElem.data.toolbaractions != 'undefined')?JSON.parse(dataElem.data.toolbaractions):undefined);
if (toolbaractions) this.et2.getWidgetById('toolbar').set_actions(toolbaractions);
var IframeHandle = this.et2.getWidgetById('messageIFRAME');
//console.log(IframeHandle);
IframeHandle.set_src(egw.link('/index.php',{menuaction:'mail.mail_ui.loadEmailBody',_messageID:_id}));