Commit 7366bb70 authored by thierrytiti's avatar thierrytiti

MUC: missing toggle Call handler and function

the Call button is visible but no action is done
parent 0e47e72c
...@@ -2358,6 +2358,7 @@ ...@@ -2358,6 +2358,7 @@
'click .toggle-smiley': 'toggleEmoticonMenu', 'click .toggle-smiley': 'toggleEmoticonMenu',
'click .toggle-smiley ul li': 'insertEmoticon', 'click .toggle-smiley ul li': 'insertEmoticon',
'click .toggle-clear': 'clearChatRoomMessages', 'click .toggle-clear': 'clearChatRoomMessages',
'click .toggle-call': 'toggleCall',
'click .toggle-participants a': 'toggleOccupants', 'click .toggle-participants a': 'toggleOccupants',
'keypress textarea.chat-textarea': 'keyPressed', 'keypress textarea.chat-textarea': 'keyPressed',
'mousedown .dragresize-tm': 'onDragResizeStart' 'mousedown .dragresize-tm': 'onDragResizeStart'
...@@ -2428,6 +2429,14 @@ ...@@ -2428,6 +2429,14 @@
return this; return this;
}, },
toggleCall: function (ev) {
ev.stopPropagation();
converse.emit('callButtonClicked', {
connection: converse.connection,
model: this.model
});
},
toggleOccupants: function (ev) { toggleOccupants: function (ev) {
if (ev) { if (ev) {
ev.preventDefault(); ev.preventDefault();
......
...@@ -15,6 +15,8 @@ Changelog ...@@ -15,6 +15,8 @@ Changelog
* CSS fix: room-info bug on hover after room description loaded [thierrytiti] * CSS fix: room-info bug on hover after room description loaded [thierrytiti]
* I18N: Autodetection of User Locale if no i18n setting is set. [thierrytiti] * I18N: Autodetection of User Locale if no i18n setting is set. [thierrytiti]
* CSS: Fonts Path: editabable $font-path via sass/variables.scss [thierrytiti] * CSS: Fonts Path: editabable $font-path via sass/variables.scss [thierrytiti]
* MUC: missing toggle Call handler and function [thierrytiti]
* Updated documentation about call [thierrytiti]
0.9.3 (2015-05-01) 0.9.3 (2015-05-01)
------------------ ------------------
......
...@@ -528,7 +528,7 @@ Allows you to show or hide buttons on the chat boxes' toolbars. ...@@ -528,7 +528,7 @@ Allows you to show or hide buttons on the chat boxes' toolbars.
Provides a button with a picture of a telephone on it. Provides a button with a picture of a telephone on it.
When the call button is pressed, it will emit an event that can be used by a third-party library to initiate a call.:: When the call button is pressed, it will emit an event that can be used by a third-party library to initiate a call.::
converse.on('callButtonClicked', function(event, data) { converse.listen.on('callButtonClicked', function(event, data) {
console.log('Strophe connection is', data.connection); console.log('Strophe connection is', data.connection);
console.log('Bare buddy JID is', data.model.get('jid')); console.log('Bare buddy JID is', data.model.get('jid'));
// ... Third-party library code ... // ... Third-party library code ...
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment