Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
4ea50de9
Commit
4ea50de9
authored
Jul 15, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use `emoji` instead of `emoticon`
parent
a65b319d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
90 additions
and
90 deletions
+90
-90
spec/chatbox.js
spec/chatbox.js
+77
-77
spec/utils.js
spec/utils.js
+3
-3
src/converse-chatview.js
src/converse-chatview.js
+6
-6
src/converse-muc.js
src/converse-muc.js
+2
-2
src/templates/emojis.html
src/templates/emojis.html
+2
-2
No files found.
spec/chatbox.js
View file @
4ea50de9
This diff is collapsed.
Click to expand it.
spec/utils.js
View file @
4ea50de9
...
...
@@ -14,7 +14,7 @@
chatview_avatar_height
:
32
,
auto_join_rooms
:
[],
visible_toolbar_buttons
:
{
'
emo
ticon
s
'
:
true
,
'
emo
ji
s
'
:
true
,
'
call
'
:
false
,
'
clear
'
:
true
,
'
toggle_occupants
'
:
true
...
...
@@ -31,7 +31,7 @@
'
anonymous@conference.nomnom.im
'
,
],
visible_toolbar_buttons
:
{
'
emo
ticon
s
'
:
false
,
'
emo
ji
s
'
:
false
,
'
call
'
:
false
,
'
toggle_occupants
'
:
false
,
'
invalid
'
:
false
...
...
@@ -44,7 +44,7 @@
expect
(
context
.
chatview_avatar_width
).
toBe
(
32
);
expect
(
context
.
chatview_avatar_height
).
toBe
(
48
);
expect
(
_
.
keys
(
context
.
visible_toolbar_buttons
)).
toEqual
(
_
.
keys
(
settings
.
visible_toolbar_buttons
));
expect
(
context
.
visible_toolbar_buttons
.
emo
ticon
s
).
toBeFalsy
();
expect
(
context
.
visible_toolbar_buttons
.
emo
ji
s
).
toBeFalsy
();
expect
(
context
.
visible_toolbar_buttons
.
call
).
toBeFalsy
();
expect
(
context
.
visible_toolbar_buttons
.
toggle_occupants
).
toBeFalsy
();
expect
(
context
.
visible_toolbar_buttons
.
invalid
).
toBeFalsy
();
...
...
src/converse-chatview.js
View file @
4ea50de9
...
...
@@ -153,8 +153,8 @@
'
click .close-chatbox-button
'
:
'
close
'
,
'
keypress .chat-textarea
'
:
'
keyPressed
'
,
'
click .send-button
'
:
'
onSendButtonClicked
'
,
'
click .toggle-smiley
'
:
'
toggleEmo
ticon
Menu
'
,
'
click .toggle-smiley ul.emoji-picker li
'
:
'
insertEmo
ticon
'
,
'
click .toggle-smiley
'
:
'
toggleEmo
ji
Menu
'
,
'
click .toggle-smiley ul.emoji-picker li
'
:
'
insertEmo
ji
'
,
'
click .toggle-clear
'
:
'
clearMessages
'
,
'
click .toggle-call
'
:
'
toggleCall
'
,
'
click .new-msgs-indicator
'
:
'
viewUnreadMessages
'
...
...
@@ -689,19 +689,19 @@
$textbox
.
focus
().
val
(
existing
+
value
+
'
'
);
},
insertEmo
ticon
(
ev
)
{
insertEmo
ji
(
ev
)
{
ev
.
stopPropagation
();
this
.
toggleEmo
ticon
Menu
();
this
.
toggleEmo
ji
Menu
();
const
target
=
ev
.
target
.
nodeName
===
'
IMG
'
?
ev
.
target
.
parentElement
:
ev
.
target
;
var
shortname
=
target
.
getAttribute
(
'
data-emo
ticon
'
);
var
shortname
=
target
.
getAttribute
(
'
data-emo
ji
'
);
this
.
insertIntoTextArea
(
emojione
.
shortnameToUnicode
(
shortname
)
);
},
toggleEmo
ticon
Menu
(
ev
)
{
toggleEmo
ji
Menu
(
ev
)
{
if
(
!
_
.
isUndefined
(
ev
))
{
ev
.
stopPropagation
();
if
(
ev
.
target
.
classList
.
contains
(
'
emoji-category-picker
'
)
||
...
...
src/converse-muc.js
View file @
4ea50de9
...
...
@@ -422,8 +422,8 @@
events
:
{
'
click .close-chatbox-button
'
:
'
close
'
,
'
click .configure-chatroom-button
'
:
'
getAndRenderConfigurationForm
'
,
'
click .toggle-smiley
'
:
'
toggleEmo
ticon
Menu
'
,
'
click .toggle-smiley ul.emoji-picker li
'
:
'
insertEmo
ticon
'
,
'
click .toggle-smiley
'
:
'
toggleEmo
ji
Menu
'
,
'
click .toggle-smiley ul.emoji-picker li
'
:
'
insertEmo
ji
'
,
'
click .toggle-clear
'
:
'
clearChatRoomMessages
'
,
'
click .toggle-call
'
:
'
toggleCall
'
,
'
click .toggle-occupants a
'
:
'
toggleOccupants
'
,
...
...
src/templates/emojis.html
View file @
4ea50de9
{[ _.forEach(emojis_by_category, function (obj, category) { ]}
<ul
class=
"emoji-picker emoji-picker-{{{category}}} {[ if (current_category !== category) { ]} hidden {[ } ]}"
>
{[ _.forEach(emojis_by_category[category], function (emoji) { ]}
<li
class=
"emoji"
data-emo
ticon
=
"{{{emoji._shortname}}}"
>
<a
href=
"#"
data-emo
ticon
=
"{{{emoji._shortname}}}"
>
{{ emojione.shortnameToUnicode(emoji._shortname) }}
</a>
<li
class=
"emoji"
data-emo
ji
=
"{{{emoji._shortname}}}"
>
<a
href=
"#"
data-emo
ji
=
"{{{emoji._shortname}}}"
>
{{ emojione.shortnameToUnicode(emoji._shortname) }}
</a>
</li>
{[ }); ]}
</ul>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment