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
08dce556
Commit
08dce556
authored
Aug 07, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When correcting a message, also highlight the textarea.
parent
27bc33ba
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
13 deletions
+29
-13
css/converse.css
css/converse.css
+6
-1
sass/_chatbox.scss
sass/_chatbox.scss
+3
-0
sass/_chatrooms.scss
sass/_chatrooms.scss
+3
-0
sass/_messages.scss
sass/_messages.scss
+1
-1
src/converse-chatview.js
src/converse-chatview.js
+12
-7
src/converse-muc-views.js
src/converse-muc-views.js
+4
-4
No files found.
css/converse.css
View file @
08dce556
...
...
@@ -7490,6 +7490,8 @@ body.reset {
margin-bottom
:
-4px
;
}
#conversejs
.chatbox
.sendXMPPMessage
.chat-textarea.spoiler
{
height
:
42px
;
}
#conversejs
.chatbox
.sendXMPPMessage
.chat-textarea.correcting
{
background-color
:
#e7f7ee
;
}
#conversejs
.chatbox
.sendXMPPMessage
.send-button
{
position
:
absolute
;
left
:
3px
;
...
...
@@ -8676,6 +8678,9 @@ body.reset {
#conversejs
.converse-embedded
.chatroom
.sendXMPPMessage
.chat-textarea
,
#conversejs
.chatroom
.sendXMPPMessage
.chat-textarea
{
border-bottom-right-radius
:
0
;
}
#conversejs
.converse-embedded
.chatroom
.sendXMPPMessage
.chat-textarea.correcting
,
#conversejs
.chatroom
.sendXMPPMessage
.chat-textarea.correcting
{
background-color
:
#fadfd7
;
}
#conversejs
.converse-embedded
.chatroom
.sendXMPPMessage
.send-button
,
#conversejs
.chatroom
.sendXMPPMessage
.send-button
{
background-color
:
#E77051
;
}
...
...
@@ -8840,7 +8845,7 @@ body.reset {
#conversejs
.message.chat-msg
:hover
.chat-msg__actions
.chat-msg__action
{
opacity
:
1
;
}
#conversejs
.message.chat-msg.correcting.groupchat
{
background-color
:
#f
df1ee
;
}
background-color
:
#f
adfd7
;
}
#conversejs
.message.chat-msg.correcting
:not
(
.groupchat
)
{
background-color
:
#e7f7ee
;
}
#conversejs
.message.chat-msg
.spoiler
{
...
...
sass/_chatbox.scss
View file @
08dce556
...
...
@@ -251,6 +251,9 @@
&
.spoiler
{
height
:
42px
;
}
&
.correcting
{
background-color
:
lighten
(
$chat-head-color
,
50%
);
}
}
.send-button
{
...
...
sass/_chatrooms.scss
View file @
08dce556
...
...
@@ -271,6 +271,9 @@
}
.chat-textarea
{
border-bottom-right-radius
:
0
;
&
.correcting
{
background-color
:
lighten
(
$chatroom-head-color
,
30%
);
}
}
.send-button
{
background-color
:
$chatroom-head-color
;
...
...
sass/_messages.scss
View file @
08dce556
...
...
@@ -80,7 +80,7 @@
}
&
.correcting
{
&
.groupchat
{
background-color
:
lighten
(
$chatroom-head-color
,
3
5
%
);
background-color
:
lighten
(
$chatroom-head-color
,
3
0
%
);
}
&
:not
(
.groupchat
)
{
background-color
:
lighten
(
$chat-head-color
,
50%
);
...
...
src/converse-chatview.js
View file @
08dce556
...
...
@@ -803,7 +803,7 @@
*/
this
.
showMessage
(
message
);
if
(
message
.
get
(
'
correcting
'
))
{
this
.
insertIntoTextArea
(
message
.
get
(
'
message
'
),
true
);
this
.
insertIntoTextArea
(
message
.
get
(
'
message
'
),
true
,
true
);
}
_converse
.
emit
(
'
messageAdded
'
,
{
'
message
'
:
message
,
...
...
@@ -944,10 +944,10 @@
currently_correcting
.
save
(
'
correcting
'
,
false
);
}
message
.
save
(
'
correcting
'
,
true
);
this
.
insertIntoTextArea
(
message
.
get
(
'
message
'
),
true
);
this
.
insertIntoTextArea
(
message
.
get
(
'
message
'
),
true
,
true
);
}
else
{
message
.
save
(
'
correcting
'
,
false
);
this
.
insertIntoTextArea
(
''
,
true
);
this
.
insertIntoTextArea
(
''
,
true
,
false
);
}
},
...
...
@@ -966,10 +966,10 @@
}
}
if
(
message
)
{
this
.
insertIntoTextArea
(
message
.
get
(
'
message
'
),
true
);
this
.
insertIntoTextArea
(
message
.
get
(
'
message
'
),
true
,
true
);
message
.
save
(
'
correcting
'
,
true
);
}
else
{
this
.
insertIntoTextArea
(
''
,
true
);
this
.
insertIntoTextArea
(
''
,
true
,
false
);
}
},
...
...
@@ -989,7 +989,7 @@
}
message
=
message
||
this
.
getOwnMessages
().
findLast
((
msg
)
=>
msg
.
get
(
'
message
'
));
if
(
message
)
{
this
.
insertIntoTextArea
(
message
.
get
(
'
message
'
),
true
);
this
.
insertIntoTextArea
(
message
.
get
(
'
message
'
),
true
,
true
);
message
.
save
(
'
correcting
'
,
true
);
}
},
...
...
@@ -1010,7 +1010,7 @@
return
this
;
},
insertIntoTextArea
(
value
,
replace
=
false
)
{
insertIntoTextArea
(
value
,
replace
=
false
,
correcting
=
false
)
{
const
textarea
=
this
.
el
.
querySelector
(
'
.chat-textarea
'
);
if
(
replace
)
{
textarea
.
value
=
value
;
...
...
@@ -1021,6 +1021,11 @@
}
textarea
.
value
=
existing
+
value
+
'
'
;
}
if
(
correcting
)
{
u
.
addClass
(
'
correcting
'
,
textarea
);
}
else
{
u
.
removeClass
(
'
correcting
'
,
textarea
);
}
textarea
.
focus
()
},
...
...
src/converse-muc-views.js
View file @
08dce556
...
...
@@ -154,10 +154,10 @@
// Refer to docs/source/configuration.rst for explanations of these
// configuration settings.
_converse
.
api
.
settings
.
update
({
auto_list_rooms
:
false
,
hide_muc_server
:
false
,
// TODO: no longer implemented...
muc_disable_moderator_commands
:
false
,
visible_toolbar_buttons
:
{
'
auto_list_rooms
'
:
false
,
'
hide_muc_server
'
:
false
,
// TODO: no longer implemented...
'
muc_disable_moderator_commands
'
:
false
,
'
visible_toolbar_buttons
'
:
{
'
toggle_occupants
'
:
true
}
});
...
...
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