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
ce617f1f
Commit
ce617f1f
authored
Jul 20, 2014
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some refactoring of RosterView and skeleton for groups test
parent
0f6d1f9e
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
57 additions
and
30 deletions
+57
-30
converse.js
converse.js
+9
-9
spec/controlbox.js
spec/controlbox.js
+48
-21
No files found.
converse.js
View file @
ce617f1f
...
...
@@ -3221,7 +3221,7 @@
initialize
:
function
()
{
this
.
model
.
on
(
"
add
"
,
function
(
item
)
{
this
.
addRosterItemView
(
item
).
rend
er
(
item
);
this
.
addRosterItemView
(
item
).
updateRost
er
(
item
);
if
(
item
.
get
(
'
is_last
'
))
{
this
.
sortRoster
().
showRoster
();
}
...
...
@@ -3235,19 +3235,19 @@
if
((
_
.
size
(
item
.
changed
)
===
1
)
&&
_
.
contains
(
_
.
keys
(
item
.
changed
),
'
sorted
'
))
{
return
;
}
this
.
updateChatBox
(
item
).
rend
er
(
item
);
this
.
updateChatBox
(
item
).
updateRost
er
(
item
);
if
(
item
.
changed
.
chat_status
)
{
// A changed chat status implies a new sort order
this
.
sortRoster
();
}
},
this
);
this
.
model
.
on
(
"
remove
"
,
function
(
item
)
{
this
.
removeRosterItemView
(
item
);
},
this
);
this
.
model
.
on
(
"
destroy
"
,
function
(
item
)
{
this
.
removeRosterItemView
(
item
);
},
this
);
this
.
model
.
on
(
"
reset
"
,
function
()
{
this
.
removeAllRosterItemViews
s
();
},
this
);
this
.
initR
ender
();
this
.
model
.
on
(
"
reset
"
,
function
()
{
this
.
removeAllRosterItemViews
();
},
this
);
this
.
r
ender
();
this
.
model
.
fetch
({
add
:
true
});
// Get the cached roster items from localstorage
},
initR
ender
:
function
()
{
r
ender
:
function
()
{
var
desc_group_toggle
=
__
(
'
Click to hide these contacts
'
),
toggle_state
=
'
opened
'
,
roster_markup
=
converse
.
templates
.
group_header
({
...
...
@@ -3292,16 +3292,16 @@
return
this
;
},
removeAllRosterItemViews
s
:
function
()
{
removeAllRosterItemViews
:
function
()
{
var
views
=
this
.
removeAll
();
this
.
rend
er
();
this
.
updateRost
er
();
return
this
;
},
removeRosterItemView
:
function
(
item
)
{
if
(
this
.
get
(
item
.
id
))
{
this
.
get
(
item
.
id
).
remove
();
this
.
rend
er
();
this
.
updateRost
er
();
}
return
this
;
},
...
...
@@ -3320,7 +3320,7 @@
}
},
rend
er
:
function
(
item
)
{
updateRost
er
:
function
(
item
)
{
var
$contact_requests
=
this
.
$el
.
find
(
'
#xmpp-contact-requests
'
),
$pending_contacts
=
this
.
$el
.
find
(
'
#pending-xmpp-contacts
'
);
if
(
item
)
{
...
...
spec/controlbox.js
View file @
ce617f1f
This diff is collapsed.
Click to expand it.
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