From b624870f9b45e94f5473b1434bbff72135f930bb Mon Sep 17 00:00:00 2001 From: Philipp Fischbeck Date: Thu, 23 Nov 2017 15:04:21 +0100 Subject: [PATCH 1/2] Change turbolinks progress bar color --- app/assets/stylesheets/application.css.scss | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/stylesheets/application.css.scss b/app/assets/stylesheets/application.css.scss index eb4e8dc..d086c64 100644 --- a/app/assets/stylesheets/application.css.scss +++ b/app/assets/stylesheets/application.css.scss @@ -18,3 +18,7 @@ @import "bootstrap-sprockets"; @import "bootstrap"; + +.turbolinks-progress-bar { + background-color: $brand-primary; +} \ No newline at end of file From ab93f90eaeb7ccf9f90ef30f3a6081c8999d012d Mon Sep 17 00:00:00 2001 From: Philipp Fischbeck Date: Thu, 23 Nov 2017 15:06:56 +0100 Subject: [PATCH 2/2] Make CodeMirror and MathJax work with turbolinks --- app/assets/javascripts/mathjax.js.coffee | 4 ++-- app/assets/javascripts/translations.js.coffee | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/assets/javascripts/mathjax.js.coffee b/app/assets/javascripts/mathjax.js.coffee index a55a1be..0f4a889 100644 --- a/app/assets/javascripts/mathjax.js.coffee +++ b/app/assets/javascripts/mathjax.js.coffee @@ -1,2 +1,2 @@ -$(document).on 'page:load', -> - window.MathJax.Hub.Queue(["Typeset",MathJax.Hub]); \ No newline at end of file +$(document).on 'turbolinks:load', -> + MathJax.Hub.Queue(["Typeset",MathJax.Hub]); \ No newline at end of file diff --git a/app/assets/javascripts/translations.js.coffee b/app/assets/javascripts/translations.js.coffee index 387cc75..2c1c09c 100644 --- a/app/assets/javascripts/translations.js.coffee +++ b/app/assets/javascripts/translations.js.coffee @@ -13,8 +13,8 @@ loadCodeMirror = -> mode: "text/html" }) -$(document).ready loadCodeMirror -$(document).on "page:load", loadCodeMirror +$(document).on "turbolinks:load", loadCodeMirror + $(document).on "click", '#translationNav a[href="#preview"]', -> $('#preview .problem-content').html(cm.getValue()) \ No newline at end of file