From b492bde6a121be1c15ed90ce0827fcfd72a12f5c Mon Sep 17 00:00:00 2001 From: Pratima Gupta Date: Tue, 16 Jul 2019 12:03:11 +0000 Subject: [IMP] account, portal, web, website: move chatter below invoice MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit No more modal because it's not visible and less handy. Use same behavior as sales order portal. Adapt the invoice style to properly adapt and align with the chatter block. Part of task-37264 closes odoo/odoo#34360 Signed-off-by: Quentin Smetz (qsm) Co-authored-by: Pratima Gupta Co-authored-by: Sébastien Theys --- addons/web/static/src/js/core/utils.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'addons/web/static/src/js/core/utils.js') diff --git a/addons/web/static/src/js/core/utils.js b/addons/web/static/src/js/core/utils.js index 44e17324b85..e3911752aaa 100644 --- a/addons/web/static/src/js/core/utils.js +++ b/addons/web/static/src/js/core/utils.js @@ -439,6 +439,18 @@ var utils = { is_bin_size: function (v) { return (/^\d+(\.\d*)? [^0-9]+$/).test(v); }, + /** + * Returns whether the given anchor is valid. + * + * This test is useful to prevent a crash that would happen if using an invalid + * anchor as a selector. + * + * @param {string} anchor + * @returns {boolean} + */ + isValidAnchor: function (anchor) { + return /^#[\w-]+$/.test(anchor); + }, /** * @param {any} node * @param {any} human_readable -- cgit v1.2.3