Changed HTML Element for rendering
This commit is contained in:
parent
cdf612f0c5
commit
361d082c4e
@ -23,8 +23,10 @@ Zarafa.plugins.origrcv.OrigRcvPlugin = Ext.extend(Zarafa.core.Plugin, {
|
|||||||
*/
|
*/
|
||||||
showOriginalReceiver: function() {
|
showOriginalReceiver: function() {
|
||||||
return {
|
return {
|
||||||
xtype: 'label',
|
xtype: 'container',
|
||||||
style: 'width: 99%;',
|
autoEl: 'div',
|
||||||
|
style: 'margin-top: 6px;',
|
||||||
|
cls: 'preview-header-recipientbox',
|
||||||
plugins: ['zarafa.recordcomponentupdaterplugin'],
|
plugins: ['zarafa.recordcomponentupdaterplugin'],
|
||||||
scope: this,
|
scope: this,
|
||||||
update: this.onMailDataOpen,
|
update: this.onMailDataOpen,
|
||||||
@ -38,9 +40,10 @@ Zarafa.plugins.origrcv.OrigRcvPlugin = Ext.extend(Zarafa.core.Plugin, {
|
|||||||
* @param {Boolean} contentReset force the component to perform a full update of the data.
|
* @param {Boolean} contentReset force the component to perform a full update of the data.
|
||||||
*/
|
*/
|
||||||
onMailDataOpen: function(record, resetContent) {
|
onMailDataOpen: function(record, resetContent) {
|
||||||
|
var label = this.getEl();
|
||||||
// Set label to empty value by default, to override previous S/MIME message text
|
// Set label to empty value by default, to override previous S/MIME message text
|
||||||
this.setText("");
|
label.update(""); // empty div
|
||||||
this.hide();
|
label.hide();
|
||||||
|
|
||||||
if (record.opened) {
|
if (record.opened) {
|
||||||
var toRegex = /^To\s*:\s*(.*)$/igm; // parse "to" header
|
var toRegex = /^To\s*:\s*(.*)$/igm; // parse "to" header
|
||||||
@ -60,16 +63,16 @@ Zarafa.plugins.origrcv.OrigRcvPlugin = Ext.extend(Zarafa.core.Plugin, {
|
|||||||
|
|
||||||
// only display if receiver addresses differ
|
// only display if receiver addresses differ
|
||||||
if (emailAddresses.length == 1 && !(emailAddresses[0] == record.get('display_to') || emailAddresses[0] == record.get('received_by_email_address'))) {
|
if (emailAddresses.length == 1 && !(emailAddresses[0] == record.get('display_to') || emailAddresses[0] == record.get('received_by_email_address'))) {
|
||||||
this.setText("Original To: " + emailAddresses[0]);
|
label.update("Original To: " + emailAddresses[0]);
|
||||||
this.show();
|
label.show();
|
||||||
} else if (emailAddresses.length > 1) {
|
} else if (emailAddresses.length > 1) {
|
||||||
var addressList = "";
|
var addressList = "";
|
||||||
for (var i = 0; i < emailAddresses.length; i++) {
|
for (var i = 0; i < emailAddresses.length; i++) {
|
||||||
if (i != 0) addressList += ", ";
|
if (i != 0) addressList += ", ";
|
||||||
addressList += emailAddresses[i];
|
addressList += emailAddresses[i];
|
||||||
}
|
}
|
||||||
this.setText("Original To: " + addressList);
|
label.update("Original To: " + addressList);
|
||||||
this.show();
|
label.show();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user