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
ebfd092e
Commit
ebfd092e
authored
Apr 12, 2013
by
JC Brand
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bugfix.
Controlbox didn't auto-appear when a new user made a subscription request.
parent
52bbe024
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
26 deletions
+34
-26
converse.js
converse.js
+34
-26
No files found.
converse.js
View file @
ebfd092e
...
...
@@ -1214,7 +1214,7 @@
}
else
if
(
ask
===
'
request
'
)
{
this
.
$el
.
addClass
(
'
requesting-xmpp-contact
'
);
this
.
$el
.
html
(
this
.
request_template
(
item
.
toJSON
()));
xmppchat
.
chatboxes
.
get
(
'
controlbox
'
).
trigger
(
'
show
'
);
xmppchat
.
showControlBox
(
);
}
else
if
(
subscription
===
'
both
'
||
subscription
===
'
to
'
)
{
this
.
$el
.
addClass
(
'
current-xmpp-contact
'
);
this
.
$el
.
html
(
this
.
template
(
item
.
toJSON
()));
...
...
@@ -1520,6 +1520,9 @@
},
this
);
this
.
model
.
on
(
'
change
'
,
function
(
item
,
changed
)
{
if
((
_
.
size
(
item
.
changed
)
===
1
)
&&
_
.
contains
(
_
.
keys
(
item
.
changed
),
'
sorted
'
))
{
return
;
}
this
.
updateChatBox
(
item
,
changed
);
this
.
render
(
item
);
},
this
);
...
...
@@ -1880,42 +1883,47 @@
}
});
// Event handlers
// --------------
$
(
document
).
ready
(
$
.
proxy
(
function
()
{
var
chatdata
=
$
(
'
div#collective-xmpp-chat-data
'
),
$toggle
=
$
(
'
a#toggle-online-users
'
);
this
.
$feedback
=
$
(
'
.conn-feedback
'
);
this
.
fullname
=
chatdata
.
attr
(
'
fullname
'
);
this
.
prebind
=
chatdata
.
attr
(
'
prebind
'
);
this
.
auto_subscribe
=
chatdata
.
attr
(
'
auto_subscribe
'
)
===
"
True
"
||
false
;
this
.
chatboxes
=
new
this
.
ChatBoxes
();
this
.
chatboxesview
=
new
this
.
ChatBoxesView
({
model
:
this
.
chatboxes
});
$toggle
.
bind
(
'
click
'
,
$
.
proxy
(
function
(
e
)
{
e
.
preventDefault
();
xmppchat
.
showControlBox
=
function
()
{
var
controlbox
=
this
.
chatboxes
.
get
(
'
controlbox
'
);
if
(
$
(
"
div#controlbox
"
).
is
(
'
:visible
'
))
{
if
(
this
.
connection
)
{
controlbox
.
destroy
();
}
else
{
controlbox
.
trigger
(
'
hide
'
);
}
}
else
{
if
(
!
controlbox
)
{
controlbox
=
this
.
chatboxes
.
add
({
this
.
chatboxes
.
add
({
id
:
'
controlbox
'
,
box_id
:
'
controlbox
'
,
visible
:
true
});
if
(
this
.
connection
)
{
controlbox
.
save
();
this
.
chatboxes
.
get
(
'
controlbox
'
)
.
save
();
}
}
else
{
controlbox
.
trigger
(
'
show
'
);
}
}
},
this
));
xmppchat
.
toggleControlBox
=
function
()
{
if
(
$
(
"
div#controlbox
"
).
is
(
'
:visible
'
))
{
var
controlbox
=
this
.
chatboxes
.
get
(
'
controlbox
'
);
if
(
this
.
connection
)
{
controlbox
.
destroy
();
}
else
{
controlbox
.
trigger
(
'
hide
'
);
}
}
else
{
this
.
showControlBox
();
}
};
// Event handlers
// --------------
$
(
document
).
ready
(
$
.
proxy
(
function
()
{
var
chatdata
=
$
(
'
div#collective-xmpp-chat-data
'
),
$toggle
=
$
(
'
a#toggle-online-users
'
);
this
.
$feedback
=
$
(
'
.conn-feedback
'
);
this
.
fullname
=
chatdata
.
attr
(
'
fullname
'
);
this
.
prebind
=
chatdata
.
attr
(
'
prebind
'
);
this
.
auto_subscribe
=
chatdata
.
attr
(
'
auto_subscribe
'
)
===
"
True
"
||
false
;
this
.
chatboxes
=
new
this
.
ChatBoxes
();
this
.
chatboxesview
=
new
this
.
ChatBoxesView
({
model
:
this
.
chatboxes
});
$toggle
.
bind
(
'
click
'
,
$
.
proxy
(
function
(
e
)
{
e
.
preventDefault
();
this
.
toggleControlBox
();
},
this
));
$
(
document
).
bind
(
'
jarnxmpp.connecting
'
,
$
.
proxy
(
function
(
ev
,
conn
)
{
this
.
$feedback
.
text
(
'
Connecting to chat...
'
);
...
...
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