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
00e05c02
Commit
00e05c02
authored
Aug 07, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Style the live filter and make sure that it...
only shows when the roster is overflowing. updates #212
parent
1441f4ab
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
21 deletions
+60
-21
converse.js
converse.js
+11
-1
css/converse.css
css/converse.css
+15
-6
less/converse.less
less/converse.less
+17
-6
mockup/controlbox.html
mockup/controlbox.html
+1
-1
src/jquery.fastLiveFilter.js
src/jquery.fastLiveFilter.js
+16
-7
No files found.
converse.js
View file @
00e05c02
...
@@ -3377,6 +3377,16 @@
...
@@ -3377,6 +3377,16 @@
return
this
;
return
this
;
},
},
showHideFilter
:
function
()
{
var
$filter
=
this
.
$
(
'
.roster-filter
'
);
if
(
this
.
$
(
'
.roster-contacts
'
).
hasScrollBar
())
{
$filter
.
show
();
}
else
{
$filter
.
hide
();
}
return
this
;
},
update
:
function
()
{
update
:
function
()
{
// XXX: Is this still being used/valid?
// XXX: Is this still being used/valid?
var
$count
=
$
(
'
#online-count
'
);
var
$count
=
$
(
'
#online-count
'
);
...
@@ -3384,7 +3394,7 @@
...
@@ -3384,7 +3394,7 @@
if
(
!
$count
.
is
(
'
:visible
'
))
{
if
(
!
$count
.
is
(
'
:visible
'
))
{
$count
.
show
();
$count
.
show
();
}
}
return
this
;
return
this
.
showHideFilter
()
;
},
},
reset
:
function
()
{
reset
:
function
()
{
...
...
css/converse.css
View file @
00e05c02
...
@@ -817,7 +817,7 @@ dl.add-converse-contact {
...
@@ -817,7 +817,7 @@ dl.add-converse-contact {
top
:
1px
;
top
:
1px
;
}
}
#conversejs
.controlbox-pane
dt
{
#conversejs
.controlbox-pane
dt
{
padding
:
3px
;
padding
-bottom
:
3px
;
}
}
#conversejs
.chatroom-form-container
{
#conversejs
.chatroom-form-container
{
height
:
100%
;
height
:
100%
;
...
@@ -883,13 +883,22 @@ dl.add-converse-contact {
...
@@ -883,13 +883,22 @@ dl.add-converse-contact {
padding
:
0
5px
0
0
;
padding
:
0
5px
0
0
;
}
}
#converse-roster
{
#converse-roster
{
overflow-y
:
auto
;
overflow-x
:
hidden
;
width
:
100%
;
width
:
100%
;
position
:
relative
;
position
:
relative
;
margin
:
0.5em
0
0
0
;
margin
:
0.5em
0
0
0
;
height
:
254px
;
max-height
:
194px
;
height
:
calc
(
100%
-
70px
);
max-height
:
calc
(
100%
-
25px
);
}
#converse-roster
.roster-filter
{
margin
:
0
0.5em
;
width
:
182px
;
}
#converse-roster
.roster-contacts
{
margin
:
0
;
overflow-y
:
auto
;
overflow-x
:
hidden
;
height
:
195px
;
height
:
calc
(
100%
-
67px
);
}
}
#converse-roster
.group-toggle
{
#converse-roster
.group-toggle
{
color
:
#666
;
color
:
#666
;
...
@@ -952,7 +961,7 @@ dl.add-converse-contact {
...
@@ -952,7 +961,7 @@ dl.add-converse-contact {
font-size
:
15px
;
font-size
:
15px
;
}
}
#conversejs
dd
.available-chatroom
,
#conversejs
dd
.available-chatroom
,
#converse-roster
dd
{
#converse
js
#converse
-roster
dd
{
font-weight
:
bold
;
font-weight
:
bold
;
border
:
none
;
border
:
none
;
display
:
block
;
display
:
block
;
...
...
less/converse.less
View file @
00e05c02
...
@@ -902,7 +902,7 @@ dl.add-converse-contact {
...
@@ -902,7 +902,7 @@ dl.add-converse-contact {
}
}
#conversejs .controlbox-pane dt {
#conversejs .controlbox-pane dt {
padding: 3px;
padding
-bottom
: 3px;
}
}
#conversejs .chatroom-form-container {
#conversejs .chatroom-form-container {
...
@@ -981,13 +981,24 @@ dl.add-converse-contact {
...
@@ -981,13 +981,24 @@ dl.add-converse-contact {
}
}
#converse-roster {
#converse-roster {
overflow-y: auto;
overflow-x: hidden;
width: 100%;
width: 100%;
position: relative;
position: relative;
margin: 0.5em 0 0 0;
margin: 0.5em 0 0 0;
height: 254px;
max-height: 194px;
height: ~"calc(100% - 70px)";
max-height: ~"calc(100% - 25px)";
}
#converse-roster .roster-filter {
margin: 0 0.5em;
width: 182px;
}
#converse-roster .roster-contacts {
margin: 0;
overflow-y: auto;
overflow-x: hidden;
height: 195px;
height: ~"calc(100% - 67px)";
}
}
#converse-roster .group-toggle {
#converse-roster .group-toggle {
...
@@ -1063,7 +1074,7 @@ dl.add-converse-contact {
...
@@ -1063,7 +1074,7 @@ dl.add-converse-contact {
}
}
#conversejs dd.available-chatroom,
#conversejs dd.available-chatroom,
#converse-roster dd {
#converse
js #converse
-roster dd {
font-weight: bold;
font-weight: bold;
border: none;
border: none;
display: block;
display: block;
...
...
mockup/controlbox.html
View file @
00e05c02
...
@@ -115,7 +115,7 @@
...
@@ -115,7 +115,7 @@
</dd>
</dd>
</dl>
</dl>
<div
id=
"converse-roster"
>
<div
id=
"converse-roster"
>
<input
id=
"search_input
"
placeholder=
"Type to filter"
>
<input
class=
"roster-filter
"
placeholder=
"Type to filter"
>
<dl
class=
"roster-contacts"
style=
"display: block;"
>
<dl
class=
"roster-contacts"
style=
"display: block;"
>
<dt
class=
"roster-group"
style=
"display: block;"
>
<dt
class=
"roster-group"
style=
"display: block;"
>
<a
href=
"#"
data-group=
"Colleagues"
class=
"group-toggle icon-opened"
title=
"Click to hide these contacts"
>
Colleagues
</a>
<a
href=
"#"
data-group=
"Colleagues"
class=
"group-toggle icon-opened"
title=
"Click to hide these contacts"
>
Colleagues
</a>
...
...
src/jquery.fastLiveFilter.js
View file @
00e05c02
/**
jQuery
.
fn
.
hasScrollBar
=
function
()
{
var
el
=
this
.
get
(
0
);
if
(
el
.
offsetHeight
<
el
.
scrollHeight
)
{
return
true
;
}
else
{
return
false
;
}
};
jQuery
.
fn
.
liveFilter
=
function
(
list
,
options
)
{
/**
* fastLiveFilter jQuery plugin 1.0.3
* fastLiveFilter jQuery plugin 1.0.3
*
*
* Copyright (c) 2011, Anthony Bush
* Copyright (c) 2011, Anthony Bush
* License: <http://www.opensource.org/licenses/bsd-license.php>
* License: <http://www.opensource.org/licenses/bsd-license.php>
* Project Website: http://anthonybush.com/projects/jquery_fast_live_filter/
* Project Website: http://anthonybush.com/projects/jquery_fast_live_filter/
**/
**/
jQuery
.
fn
.
liveFilter
=
function
(
list
,
options
)
{
// Options: input, list, timeout, callback
// Options: input, list, timeout, callback
options
=
options
||
{};
options
=
options
||
{};
var
input
=
this
;
var
input
=
this
;
...
...
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