Skip to content

Commit

Permalink
Merge branch '2024.11'
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Feb 26, 2025
2 parents 33d85e8 + 6ba7828 commit d17762b
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 43 deletions.
3 changes: 2 additions & 1 deletion tine20/Courses/js/CourseEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ Tine.Courses.CourseEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
disabled: true,
text: this.app.i18n._('Add new member'),
scope: this,
handler: this.onAddNewMember
handler: this.onAddNewMember,
hidden: true
});

this.tbarItems = [
Expand Down
6 changes: 5 additions & 1 deletion tine20/Felamimail/css/Felamimail.css
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,11 @@
.preview-panel-felamimail-filelocations,
.felamimail-compose-info .x-panel-body {
background-color: #ffffaa;
padding: 3px 5px 3px 5px;
}

.felamimail-compose-info .x-form-item {
padding: 5px;
display: block;
}

.felamimail-location {
Expand Down
32 changes: 9 additions & 23 deletions tine20/Felamimail/js/GridPanelHook.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,46 +302,32 @@ Ext.apply(Tine.Felamimail.GridPanelHook.prototype, {
*/
onComposeEmail: async function (btn, to) {
const sm = this.getGridPanel().grid ? this.getGridPanel().grid.getSelectionModel() : null;
const records = (sm && sm.isFilterSelect) ? sm.getSelections(): this.records;

const records = sm?.isFilterSelect ? sm.getSelections(): this.records;
this.massMailingFlag = to === 'mass';
if (this.massMailingFlag) to = 'BCC';

var popupWindow = Tine.Felamimail.MessageEditDialog.openWindow({
massMailingPlugins: records?.[0]?.data?.poll_id ? ['poll'] : ['all'],
contentPanelConstructorInterceptor: async (config) => {
const waitingText = this.app.i18n._('Loading Recipients...');
const mask = await config.setWaitText(waitingText);
const mailAddresses = await this.getMailAddresses(records);

const record = new Tine.Felamimail.Model.Message({
config.record = new Tine.Felamimail.Model.Message({
subject: (this.subject) ? this.subject : '',
body: this.body,
massMailingFlag: this.massMailingFlag
massMailingFlag: this.massMailingFlag,
[to.toLowerCase()]: mailAddresses
}, 0);

switch (to) {
case "TO":
record.set('to', mailAddresses);
break;
case "CC":
record.set('cc', mailAddresses);
break;
case "BCC":
record.set('bcc', mailAddresses);
break;
case "mass":
to = 'bcc';
record.set('massMailingFlag', true);
record.set('bcc', mailAddresses);
break;
}
config.record = record;

config.listeners = {
single: true,
load: function() {
mask.hide();
}
};
},
selectionFilter: sm && sm.isFilterSelect ? Ext.encode({
selectionFilter: sm?.isFilterSelect ? Ext.encode({
to: to,
filter: sm.getSelectionFilter()
}) : null,
Expand Down
32 changes: 14 additions & 18 deletions tine20/Felamimail/js/MessageEditDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ Tine.Felamimail.MessageEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
this.recordDefaults.to = Ext.decode(this.mailAddresses);
} else if (this.selectionFilter) {
// put filter into to, cc or bcc of record and the loading be handled by resolveRecipientFilter
var filterAndTo = Ext.decode(this.selectionFilter);
const filterAndTo = Ext.decode(this.selectionFilter);
this.record.set(filterAndTo.to.toLowerCase(), filterAndTo.filter);
}

Expand Down Expand Up @@ -860,7 +860,6 @@ Tine.Felamimail.MessageEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
delete this[field];

this.resolveRecipientFilter(field);

}, this);
},

Expand Down Expand Up @@ -1732,20 +1731,6 @@ Tine.Felamimail.MessageEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
return '';
}
});

const infoItems = [
{
// message file info text
ref: '../../messageFileInfoText',
style: 'display: block;',
},
{
// mass mailing info text
html: this.app.i18n._('NOTE: This is mail will be sent as a mass mail, i.e. each recipient will get his or her own copy.'),
ref: '../../massMailingInfoText',
style: 'padding: 5px 0px; display: block;',
}
]

const activeAccount = Tine.Tinebase.appMgr.get('Felamimail').getActiveAccount();
return {
Expand All @@ -1757,7 +1742,6 @@ Tine.Felamimail.MessageEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
ref: '../messageInfoFormPanel',
layout: 'form',
region: 'north',
padding: '5px',
border: false,
autoHeight: true,
align: 'left',
Expand All @@ -1768,7 +1752,19 @@ Tine.Felamimail.MessageEditDialog = Ext.extend(Tine.widgets.dialog.EditDialog, {
hidden: true,
xtype: 'label',
},
items: infoItems
items: [
{
// message file info text
ref: '../../messageFileInfoText',
style: 'padding: 5px; display: block;',
},
{
// mass mailing info text
html: this.app.i18n._('NOTE: This is mail will be sent as a mass mail, i.e. each recipient will get his or her own copy.'),
ref: '../../massMailingInfoText',
style: 'padding: 5px; display: block;',
}
]
},
{
region: 'center',
Expand Down
1 change: 1 addition & 0 deletions tine20/GDPR/js/Felamimail/MessageEditDialogPlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Tine.GDPR.Felamimail.MessageEditDialogPlugin.prototype = {
name: 'dataIntendedPurposes',
width: 300,
allowBlank: true,
cls: 'felamimail-compose-info',
recordClass: Tine.GDPR.Model.DataIntendedPurpose,
recordProxy: Tine.GDPR.dataintendedpurposeBackend,
listeners: {
Expand Down

0 comments on commit d17762b

Please sign in to comment.