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
293ca2c7
Commit
293ca2c7
authored
Feb 02, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Let the OTR code for adding a button mirror the spoiler way
parent
7bf157d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
src/converse-otr.js
src/converse-otr.js
+13
-12
No files found.
src/converse-otr.js
View file @
293ca2c7
...
...
@@ -62,7 +62,7 @@
// relevant objects or classes.
//
// New functions which don't exist yet can also be added.
ChatBox
:
{
initialize
()
{
this
.
__super__
.
initialize
.
apply
(
this
,
arguments
);
...
...
@@ -118,7 +118,7 @@
}
return
key
;
},
getSession
(
callback
)
{
const
{
_converse
}
=
this
.
__super__
,
{
__
}
=
_converse
;
...
...
@@ -403,7 +403,7 @@
_
.
partial
(
utils
.
slideToggleElement
,
menu
)
);
},
getOTRTooltip
()
{
const
{
_converse
}
=
this
.
__super__
,
{
__
}
=
_converse
,
...
...
@@ -419,13 +419,10 @@
}
},
renderToolbar
(
toolbar
,
options
)
{
addOTRToolbarButton
(
options
)
{
const
{
_converse
}
=
this
.
__super__
,
{
__
}
=
_converse
;
if
(
!
_converse
.
show_toolbar
)
{
return
;
}
const
data
=
this
.
model
.
toJSON
();
{
__
}
=
_converse
,
data
=
this
.
model
.
toJSON
();
options
=
_
.
extend
(
options
||
{},
{
FINISHED
,
UNENCRYPTED
,
...
...
@@ -443,13 +440,17 @@
otr_tooltip
:
this
.
getOTRTooltip
(),
otr_translated_status
:
OTR_TRANSLATED_MAPPING
[
data
.
otr_status
],
});
this
.
__super__
.
renderToolbar
.
apply
(
this
,
arguments
);
this
.
el
.
querySelector
(
'
.chat-toolbar
'
).
insertAdjacentHTML
(
'
beforeend
'
,
'
beforeend
'
,
tpl_toolbar_otr
(
_
.
extend
(
this
.
model
.
toJSON
(),
options
||
{})
));
return
this
;
},
renderToolbar
(
toolbar
,
options
)
{
const
result
=
this
.
__super__
.
renderToolbar
.
apply
(
this
,
arguments
);
this
.
addOTRToolbarButton
(
options
);
return
result
;
}
}
},
...
...
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