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
f0ae8c44
Commit
f0ae8c44
authored
Mar 17, 2018
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show caret for room, bookmark and group toggles
parent
c986634d
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
37 additions
and
28 deletions
+37
-28
css/converse.css
css/converse.css
+2
-2
css/inverse.css
css/inverse.css
+2
-2
sass/_controlbox.scss
sass/_controlbox.scss
+2
-2
src/converse-bookmarks.js
src/converse-bookmarks.js
+6
-5
src/converse-roomslist.js
src/converse-roomslist.js
+9
-8
src/converse-rosterview.js
src/converse-rosterview.js
+6
-5
src/templates/bookmarks_list.html
src/templates/bookmarks_list.html
+3
-1
src/templates/group_header.html
src/templates/group_header.html
+3
-1
src/templates/profile_view.html
src/templates/profile_view.html
+1
-1
src/templates/rooms_list.html
src/templates/rooms_list.html
+3
-1
No files found.
css/converse.css
View file @
f0ae8c44
...
...
@@ -5549,8 +5549,8 @@ body.reset {
margin-left
:
0.5em
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
#conversejs
#controlbox
.controlbox-pane
.userinfo
.
d-flex
{
margin-bottom
:
0.
2
em
;
}
#conversejs
#controlbox
.controlbox-pane
.userinfo
.
profile
{
margin-bottom
:
0.
75
em
;
}
#conversejs
#controlbox
#chatrooms
{
padding
:
0
;
border-bottom
:
1px
solid
#818479
;
}
...
...
css/inverse.css
View file @
f0ae8c44
...
...
@@ -5619,8 +5619,8 @@ body {
margin-left
:
0.5em
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
#conversejs
#controlbox
.controlbox-pane
.userinfo
.
d-flex
{
margin-bottom
:
0.
2
em
;
}
#conversejs
#controlbox
.controlbox-pane
.userinfo
.
profile
{
margin-bottom
:
0.
75
em
;
}
#conversejs
#controlbox
#chatrooms
{
padding
:
0
;
border-bottom
:
1px
solid
#818479
;
}
...
...
sass/_controlbox.scss
View file @
f0ae8c44
...
...
@@ -221,8 +221,8 @@
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.
d-flex
{
margin-bottom
:
0
.
2
em
;
.
profile
{
margin-bottom
:
0
.
75
em
;
}
}
}
...
...
src/converse-bookmarks.js
View file @
f0ae8c44
...
...
@@ -529,14 +529,15 @@
toggleBookmarksList
(
ev
)
{
if
(
ev
&&
ev
.
preventDefault
)
{
ev
.
preventDefault
();
}
if
(
u
.
hasClass
(
'
icon-opened
'
,
ev
.
target
))
{
const
icon_el
=
ev
.
target
.
querySelector
(
'
.fa
'
);
if
(
u
.
hasClass
(
'
fa-caret-down
'
,
icon_el
))
{
u
.
slideIn
(
this
.
el
.
querySelector
(
'
.bookmarks
'
));
this
.
list_model
.
save
({
'
toggle-state
'
:
_converse
.
CLOSED
});
ev
.
target
.
classList
.
remove
(
"
icon-opened
"
);
ev
.
target
.
classList
.
add
(
"
icon-closed
"
);
icon_el
.
classList
.
remove
(
"
fa-caret-down
"
);
icon_el
.
classList
.
add
(
"
fa-caret-right
"
);
}
else
{
ev
.
target
.
classList
.
remove
(
"
icon-closed
"
);
ev
.
target
.
classList
.
add
(
"
icon-opened
"
);
icon_el
.
classList
.
remove
(
"
fa-caret-right
"
);
icon_el
.
classList
.
add
(
"
fa-caret-down
"
);
u
.
slideOut
(
this
.
el
.
querySelector
(
'
.bookmarks
'
));
this
.
list_model
.
save
({
'
toggle-state
'
:
_converse
.
OPENED
});
}
...
...
src/converse-roomslist.js
View file @
f0ae8c44
...
...
@@ -139,7 +139,7 @@
events
:
{
'
click .add-bookmark
'
:
'
addBookmark
'
,
'
click .close-room
'
:
'
closeRoom
'
,
'
click .
open-
rooms-toggle
'
:
'
toggleRoomsList
'
,
'
click .rooms-toggle
'
:
'
toggleRoomsList
'
,
'
click .remove-bookmark
'
:
'
removeBookmark
'
,
'
click .open-room
'
:
'
openRoom
'
,
},
...
...
@@ -168,7 +168,8 @@
this
.
el
.
innerHTML
=
tpl_rooms_list
({
'
toggle_state
'
:
this
.
list_model
.
get
(
'
toggle-state
'
),
'
desc_rooms
'
:
__
(
'
Click to toggle the rooms list
'
),
'
label_rooms
'
:
__
(
'
Open Rooms
'
)
'
label_rooms
'
:
__
(
'
Open Rooms
'
),
'
_converse
'
:
_converse
});
if
(
this
.
list_model
.
get
(
'
toggle-state
'
)
!==
_converse
.
OPENED
)
{
this
.
el
.
querySelector
(
'
.open-rooms-list
'
).
classList
.
add
(
'
collapsed
'
);
...
...
@@ -229,18 +230,18 @@
toggleRoomsList
(
ev
)
{
if
(
ev
&&
ev
.
preventDefault
)
{
ev
.
preventDefault
();
}
const
el
=
ev
.
target
;
if
(
el
.
classList
.
contains
(
"
icon-opened
"
))
{
const
icon_el
=
ev
.
target
.
querySelector
(
'
.fa
'
)
;
if
(
icon_el
.
classList
.
contains
(
"
fa-caret-down
"
))
{
utils
.
slideIn
(
this
.
el
.
querySelector
(
'
.open-rooms-list
'
)).
then
(()
=>
{
this
.
list_model
.
save
({
'
toggle-state
'
:
_converse
.
CLOSED
});
el
.
classList
.
remove
(
"
icon-opened
"
);
el
.
classList
.
add
(
"
icon-closed
"
);
icon_el
.
classList
.
remove
(
"
fa-caret-down
"
);
icon_el
.
classList
.
add
(
"
fa-caret-right
"
);
});
}
else
{
utils
.
slideOut
(
this
.
el
.
querySelector
(
'
.open-rooms-list
'
)).
then
(()
=>
{
this
.
list_model
.
save
({
'
toggle-state
'
:
_converse
.
OPENED
});
el
.
classList
.
remove
(
"
icon-closed
"
);
el
.
classList
.
add
(
"
icon-opened
"
);
icon_el
.
classList
.
remove
(
"
fa-caret-right
"
);
icon_el
.
classList
.
add
(
"
fa-caret-down
"
);
});
}
}
...
...
src/converse-rosterview.js
View file @
f0ae8c44
...
...
@@ -603,15 +603,16 @@
toggle
(
ev
)
{
if
(
ev
&&
ev
.
preventDefault
)
{
ev
.
preventDefault
();
}
if
(
_
.
includes
(
ev
.
target
.
classList
,
"
icon-opened
"
))
{
const
icon_el
=
ev
.
target
.
querySelector
(
'
.fa
'
);
if
(
_
.
includes
(
icon_el
.
classList
,
"
fa-caret-down
"
))
{
this
.
model
.
save
({
state
:
_converse
.
CLOSED
});
this
.
collapse
().
then
(()
=>
{
ev
.
target
.
classList
.
remove
(
"
icon-opened
"
);
ev
.
target
.
classList
.
add
(
"
icon-closed
"
);
icon_el
.
classList
.
remove
(
"
fa-caret-down
"
);
icon_el
.
classList
.
add
(
"
fa-caret-right
"
);
});
}
else
{
ev
.
target
.
classList
.
remove
(
"
icon-closed
"
);
ev
.
target
.
classList
.
add
(
"
icon-opened
"
);
icon_el
.
classList
.
remove
(
"
fa-caret-right
"
);
icon_el
.
classList
.
add
(
"
fa-caret-down
"
);
this
.
model
.
save
({
state
:
_converse
.
OPENED
});
this
.
filter
();
u
.
showElement
(
this
.
el
);
...
...
src/templates/bookmarks_list.html
View file @
f0ae8c44
<a
href=
"#"
class=
"rooms-toggle bookmarks-toggle icon-{{{o.toggle_state}}}"
title=
"{{{o.desc_bookmarks}}}"
>
{{{o.label_bookmarks}}}
</a>
<a
href=
"#"
class=
"rooms-toggle bookmarks-toggle"
title=
"{{{o.desc_bookmarks}}}"
>
<span
class=
"fa {[ if (o.toggle_state === o._converse.OPENED) { ]} fa-caret-down {[ } else { ]} fa-caret-right {[ } ]}"
>
</span>
{{{o.label_bookmarks}}}
</a>
<div
class=
"bookmarks rooms-list {[ if (o.toggle_state !== o._converse.OPENED) { ]} hidden {[ } ]}"
></div>
src/templates/group_header.html
View file @
f0ae8c44
<a
href=
"#"
class=
"group-toggle icon-{{{o.toggle_state}}}"
title=
"{{{o.desc_group_toggle}}}"
>
{{{o.label_group}}}
</a>
<a
href=
"#"
class=
"group-toggle"
title=
"{{{o.desc_group_toggle}}}"
>
<span
class=
"fa {[ if (o.toggle_state === o._converse.OPENED) { ]} fa-caret-down {[ } else { ]} fa-caret-right {[ } ]}"
>
</span>
{{{o.label_group}}}
</a>
<ul
class=
"roster-group-contacts {[ if (o.toggle_state === o._converse.CLOSED) { ]} collapsed {[ } ]}"
></ul>
src/templates/profile_view.html
View file @
f0ae8c44
<div
class=
"userinfo"
>
<div
class=
"d-flex"
>
<div
class=
"
profile
d-flex"
>
{[ if (o.image) { ]}
<a
class=
"show-profile"
href=
"#"
>
<img
alt=
"User Avatar"
class=
"avatar align-self-center"
height=
"40px"
width=
"40px"
src=
"data:{{{o.image_type}}};base64,{{{o.image}}}"
/>
...
...
src/templates/rooms_list.html
View file @
f0ae8c44
<a
href=
"#"
class=
"rooms-toggle open-rooms-toggle icon-{{{o.toggle_state}}}"
title=
"{{{o.desc_rooms}}}"
>
{{{o.label_rooms}}}
</a>
<a
href=
"#"
class=
"rooms-toggle open-rooms-toggle"
title=
"{{{o.desc_rooms}}}"
>
<span
class=
"fa {[ if (o.toggle_state === o._converse.OPENED) { ]} fa-caret-down {[ } else { ]} fa-caret-right {[ } ]}"
>
</span>
{{{o.label_rooms}}}
</a>
<div
class=
"rooms-list open-rooms-list"
></div>
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