From b49fdbbd28ac0e24d3bbf01c4b8c823464527d8f Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Wed, 11 Feb 2015 15:46:08 +0100 Subject: [PATCH] Chat: Use new dropdown on /chat page Not very pretty due to the button being higher than normal text lines, but it'll eventually be adapted to the style for videoconference rooms. --- chat/indico_chat/static/js/chat.js | 28 ---------------------- chat/indico_chat/templates/event_page.html | 13 ++++++++-- 2 files changed, 11 insertions(+), 30 deletions(-) diff --git a/chat/indico_chat/static/js/chat.js b/chat/indico_chat/static/js/chat.js index 31759cf..e074758 100644 --- a/chat/indico_chat/static/js/chat.js +++ b/chat/indico_chat/static/js/chat.js @@ -18,34 +18,6 @@ (function(global) { 'use strict'; - global.eventChatInfo = function eventChatInfo() { - var menu = null; - var links = $('#chat-info-container').data('chatLinks'); - - $('.js-chat-join').on('click', function(e) { - e.preventDefault(); - var $this = $(this); - var menuItems = {}; - $.each(links, function(i, link) { - var action = link.link; - action = action.replace(/\{server\}/g, $this.data('server')); - action = action.replace(/\{room\}/g, $this.data('room')); - menuItems[i] = {display: link.title, action: action}; - }); - - if (menu && menu.isOpen()) { - menu.close(); - if (menu._link == this) { - return; - } - } - menu = new PopupMenu(menuItems, [$E(this)], 'categoryDisplayPopupList', true, false, null, null, true); - menu._link = this; - var pos = $this.offset(); - menu.open(pos.left - 3, pos.top + $this.height()); - }); - }; - global.eventManageChat = function eventManageChat() { $('.toggle-details').on('click', function(e) { diff --git a/chat/indico_chat/templates/event_page.html b/chat/indico_chat/templates/event_page.html index 866c96f..f7c5bcf 100644 --- a/chat/indico_chat/templates/event_page.html +++ b/chat/indico_chat/templates/event_page.html @@ -44,7 +44,16 @@ {% endif %} {% if chat_links %} - {% trans %}Join now!{% endtrans %} + {% endif %} @@ -52,5 +61,5 @@