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
d27c69d7
Commit
d27c69d7
authored
Mar 24, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set up the roster earlier
and do the fetching and sorting when the view is initialized
parent
d985b7ae
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
converse.js
converse.js
+10
-11
No files found.
converse.js
View file @
d27c69d7
...
@@ -717,7 +717,7 @@
...
@@ -717,7 +717,7 @@
// Override the one in ChatBoxView
// Override the one in ChatBoxView
this
.
model
.
on
(
'
change
'
,
$
.
proxy
(
function
(
item
,
changed
)
{
this
.
model
.
on
(
'
change
'
,
$
.
proxy
(
function
(
item
,
changed
)
{
if
(
_
.
has
(
item
.
changed
,
'
connected
'
))
{
if
(
_
.
has
(
item
.
changed
,
'
connected
'
))
{
this
.
render
().
setUp
Roster
();
this
.
render
().
append
Roster
();
}
}
if
(
_
.
has
(
item
.
changed
,
'
visible
'
))
{
if
(
_
.
has
(
item
.
changed
,
'
visible
'
))
{
if
(
item
.
changed
.
visible
===
true
)
{
if
(
item
.
changed
.
visible
===
true
)
{
...
@@ -737,17 +737,8 @@
...
@@ -737,17 +737,8 @@
}
}
},
},
setUpRoster
:
function
()
{
appendRoster
:
function
()
{
if
(
xmppchat
.
roster
)
{
return
;
}
xmppchat
.
roster
=
new
xmppchat
.
RosterItems
();
xmppchat
.
roster
.
localStorage
=
new
Backbone
.
LocalStorage
(
hex_sha1
(
'
converse.rosteritems-
'
+
xmppchat
.
connection
.
bare_jid
));
xmppchat
.
rosterview
=
new
xmppchat
.
RosterView
({
'
model
'
:
xmppchat
.
roster
});
xmppchat
.
rosterview
.
$el
.
appendTo
(
this
.
contactspanel
.
$el
);
xmppchat
.
rosterview
.
$el
.
appendTo
(
this
.
contactspanel
.
$el
);
xmppchat
.
roster
.
fetch
({
add
:
true
});
// Get the cached roster items from localstorage
xmppchat
.
rosterview
.
initialSort
();
},
},
template
:
_
.
template
(
template
:
_
.
template
(
...
@@ -1635,6 +1626,8 @@
...
@@ -1635,6 +1626,8 @@
},
this
);
},
this
);
this
.
$el
.
hide
().
html
(
this
.
template
());
this
.
$el
.
hide
().
html
(
this
.
template
());
this
.
model
.
fetch
({
add
:
true
});
// Get the cached roster items from localstorage
this
.
initialSort
();
},
},
template
:
_
.
template
(
'
<dt id="xmpp-contact-requests">Contact requests</dt>
'
+
template
:
_
.
template
(
'
<dt id="xmpp-contact-requests">Contact requests</dt>
'
+
...
@@ -2016,6 +2009,12 @@
...
@@ -2016,6 +2009,12 @@
this
.
connection
.
domain
=
Strophe
.
getDomainFromJid
(
this
.
connection
.
jid
);
this
.
connection
.
domain
=
Strophe
.
getDomainFromJid
(
this
.
connection
.
jid
);
this
.
connection
.
muc_domain
=
'
conference.
'
+
this
.
connection
.
domain
;
this
.
connection
.
muc_domain
=
'
conference.
'
+
this
.
connection
.
domain
;
// Set up the roster
this
.
roster
=
new
this
.
RosterItems
();
this
.
roster
.
localStorage
=
new
Backbone
.
LocalStorage
(
hex_sha1
(
'
converse.rosteritems-
'
+
this
.
connection
.
bare_jid
));
this
.
rosterview
=
new
this
.
RosterView
({
'
model
'
:
this
.
roster
});
this
.
xmppstatus
=
new
this
.
XMPPStatus
();
this
.
xmppstatus
=
new
this
.
XMPPStatus
();
this
.
chatboxes
.
onConnected
();
this
.
chatboxes
.
onConnected
();
...
...
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