[IMP] mail: turn 'ChatWindow/newMessageFormInputPlaceholder' into field
Task-2793280 closes odoo/odoo#86373 Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
This commit is contained in:
@@ -38,16 +38,6 @@ export class ChatWindow extends Component {
|
||||
return this.messaging && this.messaging.models['ChatWindow'].get(this.props.localId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the content of placeholder for the autocomplete input of
|
||||
* 'new_message' chat window.
|
||||
*
|
||||
* @returns {string}
|
||||
*/
|
||||
get newMessageFormInputPlaceholder() {
|
||||
return this.env._t("Search user...");
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// Private
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</span>
|
||||
<AutocompleteInput
|
||||
className="'o_ChatWindow_newMessageFormInput'"
|
||||
placeholder="newMessageFormInputPlaceholder"
|
||||
placeholder="chatWindow.newMessageFormInputPlaceholder"
|
||||
select="_onAutocompleteSelect"
|
||||
source="_onAutocompleteSource"
|
||||
onFocusin="chatWindow.onFocusInNewMessageFormInput"
|
||||
|
||||
@@ -286,6 +286,13 @@ registerModel({
|
||||
}
|
||||
return this.env._t("New message");
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @returns {string}
|
||||
*/
|
||||
_computeNewMessageFormInputPlaceholder() {
|
||||
return this.env._t("Search user...");
|
||||
},
|
||||
/**
|
||||
* @private
|
||||
* @returns {ThreadViewer}
|
||||
@@ -462,6 +469,13 @@ registerModel({
|
||||
name: attr({
|
||||
compute: '_computeName',
|
||||
}),
|
||||
/**
|
||||
* The content of placeholder for the autocomplete input of
|
||||
* 'new_message' chat window.
|
||||
*/
|
||||
newMessageFormInputPlaceholder: attr({
|
||||
compute: '_computeNewMessageFormInputPlaceholder',
|
||||
}),
|
||||
/**
|
||||
* Determines the `Thread` that should be displayed by `this`.
|
||||
* If no `Thread` is linked, `this` is considered "new message".
|
||||
|
||||
Reference in New Issue
Block a user