|
@@ -137,6 +137,7 @@
|
|
|
this.prebind = false;
|
|
|
this.show_controlbox_by_default = false;
|
|
|
this.show_only_online_users = false;
|
|
|
+ this.show_call_button = false;
|
|
|
this.show_emoticons = true;
|
|
|
this.show_toolbar = true;
|
|
|
this.use_vcards = true;
|
|
@@ -166,6 +167,7 @@
|
|
|
'show_emoticons',
|
|
|
'show_only_online_users',
|
|
|
'show_toolbar',
|
|
|
+ 'show_call_button',
|
|
|
'sid',
|
|
|
'use_vcards',
|
|
|
'xhr_custom_status',
|
|
@@ -725,7 +727,8 @@
|
|
|
'click .toggle-otr': 'toggleOTRMenu',
|
|
|
'click .start-otr': 'startOTRFromToolbar',
|
|
|
'click .end-otr': 'endOTR',
|
|
|
- 'click .auth-otr': 'authOTR'
|
|
|
+ 'click .auth-otr': 'authOTR',
|
|
|
+ 'click .toggle-call': 'toggleCall'
|
|
|
},
|
|
|
|
|
|
template: _.template(
|
|
@@ -769,6 +772,9 @@
|
|
|
'</ul>' +
|
|
|
'</li>' +
|
|
|
'{[ } ]}' +
|
|
|
+ '{[ if (' + converse.show_call_button + ') { ]}' +
|
|
|
+ '<li><a class="toggle-call icon-phone" title="Start a call"></a></li>' +
|
|
|
+ '{[ } ]}' +
|
|
|
'{[ if (allow_otr) { ]}' +
|
|
|
'<li class="toggle-otr {{otr_status_class}}" title="{{otr_tooltip}}">'+
|
|
|
'<span class="chat-toolbar-text">{{otr_translated_status}}</span>'+
|
|
@@ -1162,6 +1168,14 @@
|
|
|
}
|
|
|
},
|
|
|
|
|
|
+ toggleCall: function (ev) {
|
|
|
+ ev.stopPropagation();
|
|
|
+
|
|
|
+ $('#conversejs').trigger('converse:callButtonClicked', {
|
|
|
+ connection: converse.connection
|
|
|
+ });
|
|
|
+ },
|
|
|
+
|
|
|
onChange: function (item, changed) {
|
|
|
if (_.has(item.changed, 'chat_status')) {
|
|
|
var chat_status = item.get('chat_status'),
|