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
9a8d3b69
Commit
9a8d3b69
authored
Aug 14, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Generic message which works for both single and groupchats
parent
b7b0a5de
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
src/converse-chatview.js
src/converse-chatview.js
+2
-3
src/templates/chatbox_message_form.html
src/templates/chatbox_message_form.html
+1
-3
No files found.
src/converse-chatview.js
View file @
9a8d3b69
...
...
@@ -392,13 +392,13 @@
if
(
this
.
model
.
get
(
'
composing_spoiler
'
))
{
placeholder
=
__
(
'
Hidden message
'
);
}
else
{
placeholder
=
__
(
'
Personal m
essage
'
);
placeholder
=
__
(
'
M
essage
'
);
}
const
form_container
=
this
.
el
.
querySelector
(
'
.message-form-container
'
);
form_container
.
innerHTML
=
tpl_chatbox_message_form
(
_
.
extend
(
this
.
model
.
toJSON
(),
{
'
hint_value
'
:
_
.
get
(
this
.
el
.
querySelector
(
'
.spoiler-hint
'
),
'
value
'
),
'
label_
personal_
message
'
:
placeholder
,
'
label_message
'
:
placeholder
,
'
label_send
'
:
__
(
'
Send
'
),
'
label_spoiler_hint
'
:
__
(
'
Optional hint
'
),
'
message_value
'
:
_
.
get
(
this
.
el
.
querySelector
(
'
.chat-textarea
'
),
'
value
'
),
...
...
@@ -909,7 +909,6 @@
keyPressed
(
ev
)
{
/* Event handler for when a key is pressed in a chat box textarea.
*/
console
.
log
(
'
keypressed in chatview
'
);
if
(
ev
.
ctrlKey
)
{
// When ctrl is pressed, no chars are entered into the textarea.
return
;
...
...
src/templates/chatbox_message_form.html
View file @
9a8d3b69
...
...
@@ -14,11 +14,9 @@
class=
"chat-textarea suggestion-box__input
{[ if (o.show_send_button) { ]} chat-textarea-send-button {[ } ]}
{[ if (o.composing_spoiler) { ]} spoiler {[ } ]}"
placeholder=
"{{{o.label_
personal_
message}}}"
>
{{ o.message_value }}
</textarea>
placeholder=
"{{{o.label_message}}}"
>
{{ o.message_value }}
</textarea>
<span
class=
"suggestion-box__additions visually-hidden"
role=
"status"
aria-live=
"assertive"
aria-relevant=
"additions"
></span>
{[ if (o.show_send_button) { ]}
<button
type=
"submit"
class=
"pure-button send-button"
>
{{{ o.label_send }}}
</button>
{[ } ]}
...
...
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