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
eb67f103
Commit
eb67f103
authored
Apr 05, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Handle case where there isn't a MUC close button
parent
e9872145
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
src/converse-bookmarks.js
src/converse-bookmarks.js
+8
-2
src/converse-minimize.js
src/converse-minimize.js
+8
-6
No files found.
src/converse-bookmarks.js
View file @
eb67f103
...
...
@@ -67,8 +67,14 @@ converse.plugins.add('converse-bookmarks', {
__
(
'
Bookmark this groupchat
'
),
'
bookmarked
'
:
this
.
model
.
get
(
'
bookmarked
'
)
}));
const
close_button
=
this
.
el
.
querySelector
(
'
.close-chatbox-button
'
);
close_button
.
insertAdjacentHTML
(
'
afterend
'
,
bookmark_button
);
const
buttons_row
=
this
.
el
.
querySelector
(
'
.chatbox-buttons
'
)
const
close_button
=
buttons_row
.
querySelector
(
'
.close-chatbox-button
'
);
if
(
close_button
)
{
close_button
.
insertAdjacentHTML
(
'
afterend
'
,
bookmark_button
);
}
else
{
buttons_row
.
insertAdjacentHTML
(
'
beforeEnd
'
,
bookmark_button
);
}
},
async
renderHeading
()
{
...
...
src/converse-minimize.js
View file @
eb67f103
...
...
@@ -207,12 +207,14 @@ converse.plugins.add('converse-minimize', {
const
html
=
this
.
__super__
.
generateHeadingHTML
.
apply
(
this
,
arguments
);
const
div
=
document
.
createElement
(
'
div
'
);
div
.
innerHTML
=
html
;
const
button
=
div
.
querySelector
(
'
.close-chatbox-button
'
);
button
.
insertAdjacentHTML
(
'
afterend
'
,
tpl_chatbox_minimize
({
'
info_minimize
'
:
__
(
'
Minimize this chat box
'
)
})
);
const
buttons_row
=
div
.
querySelector
(
'
.chatbox-buttons
'
)
const
button
=
buttons_row
.
querySelector
(
'
.close-chatbox-button
'
);
const
minimize_el
=
tpl_chatbox_minimize
({
'
info_minimize
'
:
__
(
'
Minimize this chat box
'
)})
if
(
button
)
{
button
.
insertAdjacentHTML
(
'
afterend
'
,
minimize_el
);
}
else
{
buttons_row
.
insertAdjacentHTML
(
'
beforeEnd
'
,
minimize_el
);
}
return
div
.
innerHTML
;
}
},
...
...
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