Skip to content
Snippets Groups Projects
Commit b0316c9e authored by Pierre-Yves Dufays's avatar Pierre-Yves Dufays Committed by Thibault Delavallée
Browse files

[FIX] note: support link in note created from the systray


The URLs in notes created from the systray were not transformed into links.
This solves the problem.

Task-3052952

closes odoo/odoo#108146

X-original-commit: 34b35c56
Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent e32a2942
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ import ActivityMenu from '@mail/js/systray/systray_activity_menu';
import { _t } from 'web.core';
import datepicker from 'web.datepicker';
const urlRegExp = /http(s)?:\/\/(www\.)?[a-zA-Z0-9@:%_+~#=~#?&/=\-;!.]{3,2000}/g;
ActivityMenu.include({
events: _.extend({}, ActivityMenu.prototype.events, {
......@@ -38,7 +39,7 @@ ActivityMenu.include({
* @private
*/
_saveNote: function () {
var note = this.$('.o_note_input').val().trim();
var note = this.$('.o_note_input').val().replace(urlRegExp, '<a href="$&">$&</a>').trim();
if (! note) {
return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment