[IMP] mail, knowledge: mark Emoji(List) component as Legacy
This commit duplicates the components Emoji and EmojiList into other components called "LegacyEmoji" "LegacyEmojiList". We do this so that we can implement the new EmojiPicker in Discuss code, without affecting the code of `knowledge` during development. When the Emoji Picker is in a good state with just the scope of feature of Discuss, then we can integrate this new Emoji Picker in other modules, like `knowledge`. Task-2890268 closes odoo/odoo#94254 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<templates xml:space="preserve">
|
||||
<t t-name="knowledge.EmojiList" t-inherit="mail.EmojiList" t-inherit-mode="primary" owl="1">
|
||||
<xpath expr="//div[hasclass('o_EmojiList')]" position="before">
|
||||
<t t-name="knowledge.LegacyEmojiList" t-inherit="mail.LegacyEmojiList" t-inherit-mode="primary" owl="1">
|
||||
<xpath expr="//div[hasclass('o_LegacyEmojiList')]" position="before">
|
||||
<div class="d-flex justify-content-end p-2">
|
||||
<button class="btn btn-outline-danger w-100" t-on-click="onRemoveEmoji" title="Remove Icon">
|
||||
<i class="fa fa-times-circle"/> Remove Icon
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import emojis from '@mail/js/emojis';
|
||||
const { Component } = owl;
|
||||
|
||||
class Emoji extends Component {
|
||||
class LegacyEmoji extends Component {
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
@@ -14,8 +14,8 @@ class Emoji extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
Emoji.template = 'mail.Emoji';
|
||||
Emoji.props = {
|
||||
LegacyEmoji.template = 'mail.LegacyEmoji';
|
||||
LegacyEmoji.props = {
|
||||
emojiView: Object
|
||||
};
|
||||
|
||||
@@ -53,8 +53,8 @@ class EmojiPicker extends Component {
|
||||
}
|
||||
}
|
||||
|
||||
EmojiPicker.template = 'knowledge.EmojiList';
|
||||
EmojiPicker.template = 'knowledge.LegacyEmojiList';
|
||||
EmojiPicker.props = ['onClickEmoji'];
|
||||
EmojiPicker.components = { Emoji };
|
||||
EmojiPicker.components = { LegacyEmoji };
|
||||
|
||||
export default EmojiPicker;
|
||||
|
||||
Reference in New Issue
Block a user