diff --git a/app/assets/images/check.svg b/app/assets/images/check.svg
new file mode 100644
index 00000000..99e8b78c
--- /dev/null
+++ b/app/assets/images/check.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/app/assets/images/copy.svg b/app/assets/images/copy.svg
new file mode 100644
index 00000000..8dbec183
--- /dev/null
+++ b/app/assets/images/copy.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/app/javascript/packs/edit.js b/app/javascript/packs/edit.js
index aa4643a3..808954a7 100644
--- a/app/javascript/packs/edit.js
+++ b/app/javascript/packs/edit.js
@@ -1,22 +1,47 @@
-/*
+/*
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/.
- *
+ *
* Copyright (c) 2018 BigBlueButton Inc. and by respective authors (see below).
- *
+ *
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later
* version.
- *
+ *
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
- *
+ *
* You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see .
*/
$(document).on('turbolinks:load', function(){
+ $('#copy-icon-group').on('click', function() {
+ let useSharedCodeCheckbox = $('#use_shared_code_checkbox');
+ let inputField = $('#shared_code_field');
+
+ inputField.removeAttr('disabled');
+ inputField.select();
+ document.execCommand('copy');
+ window.getSelection().removeAllRanges();
+ if (!useSharedCodeCheckbox.prop('checked')) {
+ inputField.attr('disabled', 'true');
+ }
+
+ let copyIcon = $('.copy-icon');
+ copyIcon.css('display', 'none');
+ let checkIcon = $('.check-icon');
+ checkIcon.css('display', 'inline-block');
+ let copiedText = $('#copied-text');
+ copiedText.css('display', 'inline');
+
+ setTimeout(function() {
+ checkIcon.css('display', 'none');
+ copyIcon.css('display', 'inline-block');
+ copiedText.css('display', 'none');
+ }, 2000);
+ })
$('#allModerators_checkbox').on('click', function() {
var all_mod_checked = $('#allModerators_checkbox').prop("checked");
@@ -30,7 +55,7 @@ $(document).on('turbolinks:load', function(){
if (wait_mod_checked){
$('#allModerators_checkbox').prop("checked", false);
}
- })
+ })
function check_record_status(){
var record_checked = $('#record_checkbox').prop("checked");
@@ -44,7 +69,7 @@ $(document).on('turbolinks:load', function(){
$('#autoStartRecording_checkbox').prop("disabled", false);
}
}
-
+
check_record_status(); // check status every time page is loaded
$('#record_checkbox').on('click', function() {
@@ -75,4 +100,5 @@ $(document).on('turbolinks:load', function(){
checkSharedCodeCheckboxStatus();
+
});
diff --git a/app/javascript/stylesheets/rooms.scss b/app/javascript/stylesheets/rooms.scss
index 02e53048..f10f7cd4 100644
--- a/app/javascript/stylesheets/rooms.scss
+++ b/app/javascript/stylesheets/rooms.scss
@@ -106,6 +106,14 @@ input.recording-text {
background-color: white;
}
+.input-group-prepend {
+ display: flex;
+}
+.copy-icon {
+ margin-left: 5px;
+ cursor: pointer;
+}
+
/* Safari */
@-webkit-keyframes spin {
0% { -webkit-transform: rotate(0deg); }
diff --git a/app/views/rooms/_form.html.erb b/app/views/rooms/_form.html.erb
index 1baa4d95..f2b93325 100644
--- a/app/views/rooms/_form.html.erb
+++ b/app/views/rooms/_form.html.erb
@@ -128,7 +128,15 @@
<% if @shared_rooms_enabled %>