[FIX] mail: fix tour to allow public or private channel selection

task-2313321

closes odoo/odoo#58838

X-original-commit: 07ef748c542cb20fdab4f0d9c02a87fb07bede3c
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
Sébastien Theys
2020-09-29 14:55:17 +00:00
parent 55fdd74587
commit 45818cc1aa
7 changed files with 27 additions and 9 deletions
+7
View File
@@ -202,6 +202,13 @@ msgstr ""
msgid "<p>Create a channel here.</p>"
msgstr ""
#. module: mail
#. openerp-web
#: code:addons/mail/static/src/js/tours/mail.js:0
#, python-format
msgid "<p>Create a public or private channel.</p>"
msgstr ""
#. module: mail
#: model_terms:ir.ui.view,arch_db:mail.email_compose_message_wizard_form
msgid ""
@@ -89,7 +89,6 @@ class AutocompleteInput extends Component {
* @param {Object} ui
*/
_onAutocompleteSelect(ev, ui) {
ev.stopPropagation();
if (this.props.select) {
this.props.select(ev, ui);
}
@@ -54,6 +54,13 @@ class DiscussSidebar extends Component {
return this.env.messaging && this.env.messaging.discuss;
}
/**
* @returns {string}
*/
get FIND_OR_CREATE_CHANNEL() {
return this.env._t("Find or create a channel...");
}
/**
* @returns {mail.thread[]}
*/
@@ -28,9 +28,10 @@
<div class="o_DiscussSidebar_item o_DiscussSidebar_itemNew">
<AutocompleteInput
class="o_DiscussSidebar_itemNewInput"
customClass="'o_DiscussSidebar_newChannelAutocompleteSuggestions'"
isFocusOnMount="true"
isHtml="true"
placeholder="'Find or create a channel...'"
placeholder="FIND_OR_CREATE_CHANNEL"
select="_onAddChannelAutocompleteSelect"
source="_onAddChannelAutocompleteSource"
t-on-o-hide="_onHideAddingItem"
@@ -42,11 +42,11 @@
}
.o_Message_content {
flex: 1 1 auto;
min-width: 0;
max-width: 100%;
word-wrap: break-word;
word-break: break-word;
// Message content can contain arbitrary HTML that might overflow and break
// the style without this rule.
overflow: auto;
> p:last-of-type {
margin-bottom: 0;
@@ -54,8 +54,8 @@
}
.o_Message_core {
min-width: 0; // allows this flex child to shrink more than its content
margin-inline-end: map-get($spacers, 3);
overflow: auto;
}
.o_Message_footer {
+6 -3
View File
@@ -22,9 +22,12 @@ tour.register('mail_tour', {
actions.text("SomeChannel_" + t, this.$anchor);
},
}, {
trigger: ".ui-autocomplete .ui-menu-item > a:contains(Create):has(.fa-lock)",
content: _t("<p> Create a private channel.</p>"),
position: 'bottom',
trigger: ".o_DiscussSidebar_newChannelAutocompleteSuggestions",
content: _t("<p>Create a public or private channel.</p>"),
position: 'right',
run() {
this.$consumeEventAnchors.find('li:first').click();
},
}, {
trigger: '.o_Discuss_thread .o_ComposerTextInput_textarea',
content: _t("<p><b>Write a message</b> to the members of the channel here.</p> <p>You can notify someone with <i>'@'</i> or link another channel with <i>'#'</i>. Start your message with <i>'/'</i> to get the list of possible commands.</p>"),
+1
View File
@@ -15,3 +15,4 @@ from . import test_message_management
from . import test_message_post
from . import test_message_track
from . import test_performance
from . import test_ui