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()
})