Skip to content

Commit

Permalink
Merge pull request #756 from fnix/turbolinks5
Browse files Browse the repository at this point in the history
Adds turbolinks 5 events
  • Loading branch information
GBH committed Apr 12, 2017
2 parents 7271c80 + a4a9e64 commit cb2b0e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/comfy/admin/cms/base.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ window.CMS ||= {}
window.CMS.code_mirror_instances = [ ]

$ -> window.CMS.init()
$(document).on 'page:load', -> window.CMS.init()
$(document).on 'page:load turbolinks:load', -> window.CMS.init()

window.CMS.init = ->
window.CMS.current_path = window.location.pathname
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/comfy/admin/cms/lib/diff.js.coffee
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#= require comfy/admin/cms/lib/diff/diff_match_patch.min
#= require comfy/admin/cms/lib/diff/pretty_text_diff.min

$(document).on 'page:load ready', ->
$(document).on 'page:load ready turbolinks:load', ->
$("table.diff").prettyTextDiff ->
cleanup: true
originalContainer: 'tr td.original'
Expand Down

0 comments on commit cb2b0e2

Please sign in to comment.