BBB plugin - Add copy text to clipboard, add warning message

pull/2606/head
Julio Montoya 8 years ago
parent ef84cb0834
commit f7e784db9a
  1. 15
      main/template/default/layout/main.js.tpl
  2. 5
      plugin/bbb/lang/english.php
  3. 5
      plugin/bbb/lang/french.php
  4. 9
      plugin/bbb/listing.php
  5. 11
      plugin/bbb/listing.tpl

@ -585,4 +585,19 @@ function addMainEvent(elm, evType, fn, useCapture) {
} else {
elm['on'+evType] = fn;
}
}
function copyTextToClipBoard(elementId)
{
/* Get the text field */
var copyText = document.getElementById(elementId);
/* Select the text field */
copyText.select();
/* Copy the text inside the text field */
document.execCommand("copy");
/* Alert the copied text */
//alert('Copied');
}

@ -67,8 +67,9 @@ $strings['MaxXUsersReachedManager'] = 'The limit of %s simultaneous users has be
$strings['MaxUsersInConferenceRoom'] = 'Max simultaneous users in a conference room';
$strings['global_conference_allow_roles'] = "Global conference link only visible for this user roles";
$strings['CreatedAt'] = 'Created at';
$strings['interface'] = 'Interface';
$strings['launch_type'] = 'Launch type';
$strings['EnterConferenceFlash'] = 'Enter the videoconference (Flash client)';
$strings['EnterConferenceHTML5'] = 'Enter the videoconference (HTML5 client)';
$strings['EnterConferenceHTML5'] = 'Enter the videoconference (HTML5 client)';
$strings['ParticipantsWillUseSameInterface'] = 'Participants will use the same interface as you';

@ -50,3 +50,8 @@ $strings['MaxXUsersReachedManager'] = 'La limite de %s utilisateurs simultanés
$strings['MaxUsersInConferenceRoom'] = 'Nombre max d\'utilisateurs simultanés dans une salle de conférence';
$strings['global_conference_allow_roles'] = "Visibilité du lien de vidéo conférence global pour les profils suivant";
$strings['CreatedAt'] = "Créé à";
$strings['EnterConferenceFlash'] = 'Entrer dans la salle de conférence (Flash)';
$strings['EnterConferenceHTML5'] = 'Entrer dans la salle de conférence (HTML5)';
$strings['ParticipantsWillUseSameInterface'] = 'Les apprenants utiliseront la même interface que vous';

@ -200,6 +200,7 @@ $url = Display::url(
);
$type = $plugin->get('launch_type');
$warningIntefaceMessage = '';
switch ($type) {
case BBBPlugin::LAUNCH_TYPE_DEFAULT:
@ -212,6 +213,7 @@ switch ($type) {
case BBBPlugin::LAUNCH_TYPE_SET_BY_TEACHER:
if ($conferenceManager) {
$url = $plugin->getUrlInterfaceLinks($conferenceUrl);
$warningIntefaceMessage = Display::return_message($plugin->get_lang('ParticipantsWillUseSameInterface'));
} else {
$meetingInfo = $bbb->getMeetingByName($videoConferenceName);
switch ($meetingInfo['interface']) {
@ -231,7 +233,9 @@ switch ($type) {
if ($meetingExists) {
$meetingInfo = $bbb->getMeetingByName($videoConferenceName);
$meetinUserInfo = $bbb->getMeetingParticipantInfo($meetingInfo['id'], api_get_user_id());
if (empty($meetinUserInfo)) {
$url = $plugin->getUrlInterfaceLinks($conferenceUrl);
/*if (empty($meetinUserInfo)) {
$url = $plugin->getUrlInterfaceLinks($conferenceUrl);
} else {
switch ($meetinUserInfo['interface']) {
@ -242,7 +246,7 @@ switch ($type) {
$url = $plugin->getHtmlUrl($conferenceUrl);
break;
}
}
}*/
}
}
@ -250,6 +254,7 @@ switch ($type) {
}
$tpl->assign('enter_conference_links', $url);
$tpl->assign('warning_inteface_msg', $warningIntefaceMessage);
$listing_tpl = 'bbb/listing.tpl';
$content = $tpl->fetch($listing_tpl);

@ -5,11 +5,11 @@
{% if show_join_button == true %}
<p>
{{ enter_conference_links }}
<span id="users_online" class="label label-warning">
{{ 'XUsersOnLine'| get_plugin_lang('BBBPlugin') | format(users_online) }}
</span>
</p>
{{ warning_inteface_msg }}
{% if max_users_limit > 0 %}
{% if conference_manager == true %}
<p>{{ 'MaxXUsersWarning' | get_plugin_lang('BBBPlugin') | format(max_users_limit) }}</p>
@ -19,7 +19,14 @@
{% endif %}
<div class="well">
<strong>{{ 'UrlMeetingToShare'| get_plugin_lang('BBBPlugin') }}</strong>
<input type="text" class="form-control text-center" readonly value="{{ conference_url }}">
<div class="form-inline">
<div class="form-group">
<input id="share_button" type="text" style="width:600px" class="form-control" readonly value="{{ conference_url }}">
<button onclick="copyTextToClipBoard('share_button');" class="btn btn-default">
<span class="fa fa-copy"></span> {{ 'CopyText' }}
</button>
</div>
</div>
</div>
{% elseif max_users_limit > 0 %}
{% if conference_manager == true %}

Loading…
Cancel
Save