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
250b0647
Commit
250b0647
authored
Nov 17, 2017
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix. Disappearing contacts filter when changing the type
parent
d5e2aa59
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
src/converse-rosterview.js
src/converse-rosterview.js
+14
-9
src/templates/roster_filter.html
src/templates/roster_filter.html
+1
-1
No files found.
src/converse-rosterview.js
View file @
250b0647
...
...
@@ -148,6 +148,7 @@
renderHTML
()
{
return
tpl_roster_filter
(
_
.
extend
(
this
.
model
.
toJSON
(),
{
visible
:
this
.
shouldBeVisible
(),
placeholder
:
__
(
'
Filter
'
),
label_contacts
:
LABEL_CONTACTS
,
label_groups
:
LABEL_GROUPS
,
...
...
@@ -232,6 +233,18 @@
return
false
;
},
shouldBeVisible
()
{
return
_converse
.
roster
.
length
>=
7
||
this
.
isActive
();
},
showOrHide
()
{
if
(
this
.
shouldBeVisible
)
{
this
.
show
();
}
else
{
this
.
hide
();
}
},
show
()
{
if
(
utils
.
isVisible
(
this
.
el
))
{
return
this
;
}
this
.
el
.
classList
.
add
(
'
fade-in
'
);
...
...
@@ -241,10 +254,6 @@
hide
()
{
if
(
!
utils
.
isVisible
(
this
.
el
))
{
return
this
;
}
if
(
this
.
el
.
querySelector
(
'
.roster-filter
'
).
value
.
length
>
0
)
{
// Don't hide if user is currently filtering.
return
;
}
this
.
model
.
save
({
'
filter_text
'
:
''
,
'
chat_state
'
:
''
...
...
@@ -335,11 +344,7 @@
if
(
!
utils
.
isVisible
(
this
.
el
))
{
return
;
}
if
(
_converse
.
roster
.
length
>=
10
)
{
this
.
filter_view
.
show
();
}
else
if
(
!
this
.
filter_view
.
isActive
())
{
this
.
filter_view
.
hide
();
}
this
.
filter_view
.
showOrHide
();
return
this
;
},
...
...
src/templates/roster_filter.html
View file @
250b0647
<span
class=
"hidden"
>
<span
{[
if
(!
o
.
visible
)
{
]}
class=
"hidden"
{[
}
]}
>
<form
class=
"pure-form roster-filter-form input-button-group"
>
<input
value=
"{{{o.filter_text}}}"
class=
"roster-filter roster-filter-{{{o.filter_type}}}"
...
...
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