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
519bd54a
Commit
519bd54a
authored
Feb 26, 2019
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #1457. Wrong tooltip shown for "unbookmark" icon
parent
d3a45551
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
+14
-7
CHANGES.md
CHANGES.md
+1
-0
spec/bookmarks.js
spec/bookmarks.js
+9
-5
src/converse-bookmarks.js
src/converse-bookmarks.js
+4
-2
No files found.
CHANGES.md
View file @
519bd54a
...
...
@@ -5,6 +5,7 @@
-
New config setting
[
locked_muc_domain
](
https://conversejs.org/docs/html/configuration.html#locked-muc-domain
)
-
#1373: Re-add support for the
[
muc_domain
](
https://conversejs.org/docs/html/configuration.html#muc-domain
)
setting
-
#1437: List of groupchats in modal doesn't scroll
-
#1457: Wrong tooltip shown for "unbookmark" icon
## 4.1.2 (2019-02-22)
...
...
spec/bookmarks.js
View file @
519bd54a
...
...
@@ -42,15 +42,17 @@
spyOn
(
view
,
'
renderBookmarkForm
'
).
and
.
callThrough
();
spyOn
(
view
,
'
closeForm
'
).
and
.
callThrough
();
await
test_utils
.
waitUntil
(()
=>
!
_
.
isNull
(
view
.
el
.
querySelector
(
'
.toggle-bookmark
'
)));
const
bookmark
=
view
.
el
.
querySelector
(
'
.toggle-bookmark
'
);
bookmark
.
click
();
let
toggle
=
view
.
el
.
querySelector
(
'
.toggle-bookmark
'
);
expect
(
toggle
.
title
).
toBe
(
'
Bookmark this groupchat
'
);
toggle
.
click
();
expect
(
view
.
renderBookmarkForm
).
toHaveBeenCalled
();
view
.
el
.
querySelector
(
'
.button-cancel
'
).
click
();
expect
(
view
.
closeForm
).
toHaveBeenCalled
();
expect
(
u
.
hasClass
(
'
on-button
'
,
bookmark
),
false
);
expect
(
u
.
hasClass
(
'
on-button
'
,
toggle
),
false
);
expect
(
toggle
.
title
).
toBe
(
'
Bookmark this groupchat
'
);
bookmark
.
click
();
toggle
.
click
();
expect
(
view
.
renderBookmarkForm
).
toHaveBeenCalled
();
/* Client uploads data:
...
...
@@ -133,8 +135,10 @@
});
_converse
.
connection
.
_dataRecv
(
test_utils
.
createRequest
(
stanza
));
await
test_utils
.
waitUntil
(()
=>
view
.
model
.
get
(
'
bookmarked
'
));
toggle
=
view
.
el
.
querySelector
(
'
.toggle-bookmark
'
);
expect
(
view
.
model
.
get
(
'
bookmarked
'
)).
toBeTruthy
();
expect
(
u
.
hasClass
(
'
on-button
'
,
bookmark
),
true
);
expect
(
toggle
.
title
).
toBe
(
'
Unbookmark this groupchat
'
);
expect
(
u
.
hasClass
(
'
on-button
'
,
toggle
),
true
);
// We ignore this IQ stanza... (unless it's an error stanza), so
// nothing to test for here.
done
();
...
...
src/converse-bookmarks.js
View file @
519bd54a
...
...
@@ -62,8 +62,10 @@ converse.plugins.add('converse-bookmarks', {
const
bookmark_button
=
tpl_chatroom_bookmark_toggle
(
_
.
assignIn
(
this
.
model
.
toJSON
(),
{
info_toggle_bookmark
:
__
(
'
Bookmark this groupchat
'
),
bookmarked
:
this
.
model
.
get
(
'
bookmarked
'
)
'
info_toggle_bookmark
'
:
this
.
model
.
get
(
'
bookmarked
'
)
?
__
(
'
Unbookmark this groupchat
'
)
:
__
(
'
Bookmark this groupchat
'
),
'
bookmarked
'
:
this
.
model
.
get
(
'
bookmarked
'
)
}));
const
close_button
=
this
.
el
.
querySelector
(
'
.close-chatbox-button
'
);
close_button
.
insertAdjacentHTML
(
'
afterend
'
,
bookmark_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