diff --git a/app/assets/javascripts/channels/recording_update.js b/app/assets/javascripts/channels/recording_update.js index 23c8a387..f27bf7ea 100644 --- a/app/assets/javascripts/channels/recording_update.js +++ b/app/assets/javascripts/channels/recording_update.js @@ -11,6 +11,14 @@ var rowData = table.row("#"+data.record_id).data(); rowData.published = data.published table.row("#"+data.record_id).data(rowData).draw(); + var publish = (data.published) ? 'publish' : 'unpublish'; + + // show alert success alert + $('.alert-template .alert-message').html($('.'+publish+'-alert').html()); + $('#alerts').html($('.alert-template').html()); + setTimeout(function() { + $('#alerts > .alert').alert('close'); + }, 4000); } }); }; diff --git a/app/assets/stylesheets/shared.scss b/app/assets/stylesheets/shared.scss index 378788d6..ac8845a5 100644 --- a/app/assets/stylesheets/shared.scss +++ b/app/assets/stylesheets/shared.scss @@ -13,6 +13,15 @@ html, body { background: linear-gradient(0, white 65%, #4DC0A2 35%); } +#alerts { + position: absolute; + top: 10px; + left: 50%; + margin-left: -250px; + width: 500px; + z-index: 999; +} + .header { padding: 20px 40px; diff --git a/app/views/landing/rooms.html.erb b/app/views/landing/rooms.html.erb index 3ebb6fab..5dd7f122 100644 --- a/app/views/landing/rooms.html.erb +++ b/app/views/landing/rooms.html.erb @@ -63,4 +63,18 @@ <%= t('no') %> +