GRN2-195: Fixed issues with turbolinks caching (#626)

* Fixed issues with turbolinks caching

* Updated string for twitter flash
This commit is contained in:
farhatahmad 2019-07-11 08:54:52 -04:00 committed by Jesus Federico
parent 355bee8059
commit ea759d551c
5 changed files with 11 additions and 27 deletions

View File

@ -14,26 +14,6 @@
// You should have received a copy of the GNU Lesser General Public License along
// with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
// Handle changing of settings tabs.
$(document).on('turbolinks:load', function(){
var controller = $("body").data('controller');
var action = $("body").data('action');
// Only run on the main page.
if (controller == "main" && action == "index"){
var cycleImages = function(){
var images = $('.img-cycle img');
var now = images.filter(':visible');
var next = now.next().length ? now.next() : images.first();
var speed = 1500;
now.fadeOut(speed);
next.fadeIn(speed);
}
$(function() {
setInterval(cycleImages, 5000);
});
}
});
document.addEventListener("turbolinks:before-cache", function() {
$(".alert").remove()
})

View File

@ -127,6 +127,8 @@ module SessionsHelper
old_user.destroy!
session["old_twitter_user_id"] = nil
flash[:success] = I18n.t("registration.deprecated.merge_success")
end
end
end

View File

@ -13,10 +13,6 @@
# with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
%>
<% # Only load the color picker on the Admins page %>
<%= stylesheet_link_tag "https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css" %>
<%= javascript_include_tag "https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js" %>
<div class="container pt-6">
<%= render "shared/components/subtitle", subtitle: t("administrator.title"), search: false %>

View File

@ -33,6 +33,11 @@
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
<!-- Because of turbolinks, this will only load once -->
<%= stylesheet_link_tag "https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css" %>
<%= javascript_include_tag "https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js" %>
<!-- Primary color styling -->
<%= stylesheet_link_tag themes_primary_path %>

View File

@ -337,6 +337,7 @@ en:
new_signin: Select a new login method for you account. All your rooms from your old account will be migrated to the new account
twitter_signin: Signing in via Twitter has been deprecated and will be removed in the next release. Click <a href="%{link}"> here </a> to move your account to a new authentication method
twitter_signup: Sign up via Twitter has been deprecated. Please use a different sign up method
merge_success: Successfuly merged your twitter account with your new account. Your old twitter account has been deleted
invite:
fail: Your token is either invalid or has expired. If you believe this is a mistake, please contact your administrator.
no_invite: You do not have an invitation to join. Please contact your administrator to receive one.