put live js code into application layout

This commit is contained in:
Stella Rouzi 2014-11-14 15:20:56 +02:00
parent b43b68ac4f
commit 40fc1a32d4
3 changed files with 9 additions and 8 deletions

View file

@ -30,7 +30,6 @@
//= require osem-datepickers
//= require osem-datatables
//= require osem-tickets
//= require transifex-live
$(document).ready(function() {
$('a[disabled=disabled]').click(function(event){

View file

@ -1,6 +0,0 @@
window.liveSettings = {
api_key: CONFIG['transifex_live_api_key'],
picker: "bottom-right",
detectlang: true,
autocollect: true
};

View file

@ -8,14 +8,22 @@
= stylesheet_link_tag "application", :media => "all"
= stylesheet_link_tag "splash" if content_for :splash
= javascript_include_tag "application"
= javascript_include_tag "//cdn.transifex.com/live.js"
= csrf_meta_tags
:javascript
window.liveSettings = {
api_key: "<%= CONFIG['transifex_live_api_key'] %>",
picker: "bottom-right",
detectlang: true,
autocollect: true
};
$(function() {
$('.dropdown input, .dropdown label').click(function(e) {
e.stopPropagation();
});
});
= javascript_include_tag "//cdn.transifex.com/live.js"
= yield(:head)
%body{ data: (content_for?(:splash_nav) ? {spy: 'scroll', offset: 0, target: 'splash-nav'} : {} ) }
= render 'layouts/navigation'