VC/Vidyo: Added functionality to timetable objs

"Make me moderator" was only available at the top level.
This commit is contained in:
Pedro Ferreira 2015-03-02 18:12:17 +01:00
parent 484a4f2e9e
commit eaf87e2dfe
3 changed files with 16 additions and 4 deletions

View File

@ -1,11 +1,11 @@
$(function() {
$('.event-service-row').dropdown({
$('.vc-toolbar').dropdown({
positioning: {
level1: {my: 'right top', at: 'right bottom', offset: '0px 0px'}
}
});
$('.event-service-row .action-make-moderator').click(function() {
$('.vc-toolbar .action-make-moderator').click(function() {
var $this = $(this);
$.ajax({

View File

@ -1,4 +1,4 @@
<div class="event-service-toolbar toolbar right">
<div class="event-service-toolbar vc-toolbar toolbar right">
<div class="group">
<a class="i-button i-button-small event-service-right-button highlight join-button" href="{{ vc_room.data.url }}"><strong>{% trans %}Join{% endtrans %}</strong></a>
{% if event.canUserModify(session.user) and session.user.id != vc_room.data['owner'][1] %}

View File

@ -1,8 +1,20 @@
{% set vc_room = event_vc_room.vc_room %}
<div class="toolbar right">
<div class="toolbar right vc-toolbar">
<div class="group">
<span class="i-button i-button-small label vc-room-info" id="vc-room-{{ vc_room.id }}"><img src="{{ vc_room.plugin.icon_url }}" style="width: 18px;"></span>
<a class="i-button i-button-small event-service-right-button highlight join-button" href="{{ vc_room.data.url }}"><strong>{% trans %}Join{% endtrans %}</strong></a>
{% if event.canUserModify(session.user) and session.user.id != vc_room.data['owner'][1] %}
<a class="i-button i-button-small highlight arrow" data-toggle="dropdown"></a>
<ul class="dropdown" data-level="level1">
<li>
<a href="#"
title="{% trans name=vc_room.data.owner_identity %}You will be the moderator of this Vidyo room, replacing {{name}}.{% endtrans %}"
class="action-make-moderator" data-href="{{ url_for('vc.vc_room_modify', event_vc_room) }}">
{% trans %}Make me moderator{% endtrans %}
</a>
</li>
</ul>
{% endif %}
</div>
{{ template_hook('vidyo-event-timetable-buttons', event_vc_room=event_vc_room) }}
</div>