Skip to content

Commit

Permalink
Merge branch 'dwp-24.7' into dwp
Browse files Browse the repository at this point in the history
  • Loading branch information
tpayen committed Oct 3, 2024
2 parents efa25a5 + 7f16c5c commit 7b68370
Show file tree
Hide file tree
Showing 761 changed files with 73,356 additions and 67,302 deletions.
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ yarn.lock
.prettierc.json
jsdoc-tutorials
*/jsdoc-tutorials/*
**/.vscode/*
**/launch.json
*/launch.json

aide/config.php
aide/custom.css
Expand All @@ -22,5 +25,7 @@ aide/config_search.php
plugins/mel_portail/modules/fluxrss/rss
plugins/mel_portail/config
plugins/mel_help/public/*
plugins/mel_useful_link/config/*
plugins/mel_news/files/*
plugins/mel_nextcloud/nextcloud/apps/*.tar.gz
plugins/mel_nextcloud/nextcloud/apps/*.tar.gz
.vscode/launch.json
5 changes: 4 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
**/jsdoc-tutorials/**.html
**/jsdoc-tutorials/**.html
**/js_template/**.js
**/barup.html
**/user.html
50 changes: 25 additions & 25 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9000,
"xdebugSettings": {
"max_children": 99999,
"max_data": -1,
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9000
}
]
}
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003,
"xdebugSettings": {
"max_children": 99999,
"max_data": -1
}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9003
}
]
}
4 changes: 2 additions & 2 deletions aide/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<html lang="fr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="custom.css" />
<link rel="stylesheet" href="style.css?s=4987593847" />
<link rel="stylesheet" href="custom.css?s=4987593847" />
<link rel="icon" type="image/png" href="images/favicon_help.png" />
<title><?= $config['title'] ?></title>
</head>
Expand Down
3 changes: 0 additions & 3 deletions jsdoc.definitions.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
/**
* @namespace Plugins
* @property {Plugin.MelMetapage} MelMetapage
* @property {Plugin.Tchap} Tchap
* @property {Plugin.Workspace} Tchap
*/

/**
Expand Down
12 changes: 12 additions & 0 deletions plugins/annuaire/annuaire.js
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,18 @@ rcube_webmail.prototype.annuaire_list_fill_list = function(parent_id, elements)
if (parent_id) {
$('#rcmrow' + parent_id).find('> ul > li.child').remove();
}
rcmail.annuaire_list.container.find('div.treetoggle, .object').each((i,e) => {
if(!$(e).hasClass('already')) {
$(e).attr('tabindex', 0).addClass('already mel-focus');
if($(e).hasClass('object')) {
$(e).on('keydown', function(node) {
if(node.originalEvent.key === 'Enter'){
$(node.currentTarget).click();
}
});
}
}
});
};

// Filter list with annuaireSelector
Expand Down
7 changes: 6 additions & 1 deletion plugins/annuaire/skins/mel_elastic/annuaire.css
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
text-overflow: ellipsis;
}

#annuaire-list li > .description {
color: var(--listbox-text-color);
}

#annuaire-list li.selected > .name {
font-weight: bold;
}
Expand Down Expand Up @@ -96,7 +100,8 @@
background: url(images/carnet.png?v=e784.5000) 17px 14px no-repeat;
}

html.dark-mode #annuaire-list .folder.addressbook {
html.dark-mode #annuaire-list .folder.addressbook,
html.dark-mode-custom #annuaire-list .folder.addressbook {
background: url(images/carnet-dark.png) 17px 14px no-repeat;
}

Expand Down
189 changes: 106 additions & 83 deletions plugins/calendar/calendar_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,102 +28,125 @@
*/

// Basic setup for Roundcube calendar client class
function rcube_calendar(settings)
{
// extend base class
rcube_libcalendaring.call(this, settings);
function rcube_calendar(settings) {
// extend base class
rcube_libcalendaring.call(this, settings);

// create new event from current mail message
this.create_from_mail = function(uid)
{
if (!uid && !(uid = rcmail.get_single_uid())) {
return;
}

var url = {_mbox: rcmail.env.mailbox, _uid: uid, _framed: 1},
buttons = {},
button_classes = ['mainaction save', 'cancel'],
title = rcmail.gettext('calendar.createfrommail'),
dialog = $('<iframe>').attr({
id: 'kolabcalendarinlinegui',
name: 'kolabcalendardialog',
src: rcmail.url('calendar/dialog-ui', url)
});

// dialog buttons
buttons[rcmail.gettext('save')] = function() {
var frame = rcmail.get_frame_window('kolabcalendarinlinegui');
frame.rcmail.command('event-save');
};

buttons[rcmail.gettext('cancel')] = function() {
dialog.dialog('destroy');
};
// create new event from current mail message
this.create_from_mail = function (uid) {
if (!uid && !(uid = rcmail.get_single_uid())) {
return;
}

// open jquery UI dialog
window.kolab_event_dialog_element = dialog = rcmail.show_popup_dialog(dialog, title, buttons, {
button_classes: button_classes,
minWidth: 500,
width: 600,
height: 600
var url = { _mbox: rcmail.env.mailbox, _uid: uid, _framed: 1 },
buttons = {},
button_classes = ['mainaction save', 'cancel'],
title = rcmail.gettext('calendar.createfrommail'),
dialog = $('<iframe>').attr({
id: 'kolabcalendarinlinegui',
name: 'kolabcalendardialog',
src: rcmail.url('calendar/dialog-ui', url),
});

// dialog buttons
buttons[rcmail.gettext('save')] = function () {
var frame = rcmail.get_frame_window('kolabcalendarinlinegui');
frame.rcmail.command('event-save');
};

// handler for attachment-save-calendar commands
this.save_to_calendar = function(id)
{
// TODO: show dialog to select the calendar for importing
if ((this.selected_attachment || id) && window.rcube_libcalendaring) {
rcmail.http_post('calendar/mailimportattach', {
_uid: rcmail.env.uid,
_mbox: rcmail.env.mailbox,
_part: id || this.selected_attachment,
// _calendar: $('#calendar-attachment-saveto').val(),
}, rcmail.set_busy(true, 'itip.savingdata'));
}
buttons[rcmail.gettext('cancel')] = function () {
dialog.dialog('destroy');
};
}

// open jquery UI dialog
window.kolab_event_dialog_element = dialog = rcmail.show_popup_dialog(
dialog,
title,
buttons,
{
button_classes: button_classes,
minWidth: 500,
width: 600,
height: 600,
},
);
};

/* calendar plugin initialization (for non-calendar tasks) */
window.rcmail && rcmail.addEventListener('init', function(evt) {
if (rcmail.task != 'calendar') {
var cal = new rcube_calendar($.extend(rcmail.env.calendar_settings, rcmail.env.libcal_settings));
window.cal = cal;
//PAMELA - Add custom events
rcmail.register_command("add-event-from-shortcut", function() { cal.create_event_from_somewhere(); });
rcmail.enable_command('add-event-from-shortcut', true);
// register create-from-mail command to message_commands array
if (rcmail.env.task == 'mail') {
rcmail.register_command('calendar-create-from-mail', function() { cal.create_from_mail(); });
rcmail.register_command('attachment-save-calendar', function(p) { cal.save_to_calendar(p); });
// handler for attachment-save-calendar commands
this.save_to_calendar = function (id) {
// TODO: show dialog to select the calendar for importing
if ((this.selected_attachment || id) && window.rcube_libcalendaring) {
rcmail.http_post(
'calendar/mailimportattach',
{
_uid: rcmail.env.uid,
_mbox: rcmail.env.mailbox,
_part: id || this.selected_attachment,
// _calendar: $('#calendar-attachment-saveto').val(),
},
rcmail.set_busy(true, 'itip.savingdata'),
);
}
};
}

if (rcmail.env.action != 'show') {
rcmail.env.message_commands.push('calendar-create-from-mail');
}
else {
rcmail.enable_command('calendar-create-from-mail', true);
}
/* calendar plugin initialization (for non-calendar tasks) */
window.rcmail &&
rcmail.addEventListener('init', function (evt) {
if (rcmail.task != 'calendar') {
var cal = new rcube_calendar(
$.extend(rcmail.env.calendar_settings, rcmail.env.libcal_settings),
);
window.cal = cal;
//PAMELA - Add custom events
rcmail.register_command('add-event-from-shortcut', function () {
cal.create_event_from_somewhere();
});
rcmail.enable_command('add-event-from-shortcut', true);
// register create-from-mail command to message_commands array
if (rcmail.env.task == 'mail') {
rcmail.register_command('calendar-create-from-mail', function () {
cal.create_from_mail();
});
rcmail.register_command('attachment-save-calendar', function (p) {
cal.save_to_calendar(p);
});

rcmail.addEventListener('beforemenu-open', function(p) {
if (p.menu == 'attachmentmenu') {
cal.selected_attachment = p.id;
var mimetype = rcmail.env.attachments[p.id];
rcmail.enable_command('attachment-save-calendar', mimetype == 'text/calendar' || mimetype == 'text/x-vcalendar' || mimetype == 'application/ics');
if (rcmail.env.action != 'show') {
rcmail.env.message_commands.push('calendar-create-from-mail');
} else {
rcmail.enable_command('calendar-create-from-mail', true);
}
});
}

//PAMELA - add custom actions after init
rcmail.triggerEvent("plugin.calendar.initialized", cal);
rcmail.addEventListener('beforemenu-open', function (p) {
if (p.menu == 'attachmentmenu') {
cal.selected_attachment = p.id;
var mimetype = rcmail.env.attachments[p.id];
rcmail.enable_command(
'attachment-save-calendar',
mimetype == 'text/calendar' ||
mimetype == 'text/x-vcalendar' ||
mimetype == 'application/ics',
);
}
});
}

}
//PAMELA - add custom actions after init
rcmail.triggerEvent('plugin.calendar.initialized', cal);
}

rcmail.register_command('plugin.calendar', function() { rcmail.switch_task('calendar'); }, true);
rcmail.register_command(
'plugin.calendar',
function () {
rcmail.switch_task('calendar');
},
true,
);

rcmail.addEventListener('plugin.ping_url', function(p) {
var action = p.action;
p.action = p.event = null;
new Image().src = rcmail.url(action, p);
rcmail.addEventListener('plugin.ping_url', function (p) {
var action = p.action;
p.action = p.event = null;
new Image().src = rcmail.url(action, p);
});
});
});
Loading

0 comments on commit 7b68370

Please sign in to comment.