put translation javascript code in separate file
This commit is contained in:
parent
bca62e6204
commit
10001c5383
4 changed files with 8 additions and 10 deletions
|
|
@ -34,6 +34,7 @@
|
|||
//= require osem-datepickers
|
||||
//= require osem-datatables
|
||||
//= require osem-tickets
|
||||
//= require osem-translation
|
||||
|
||||
$(document).ready(function() {
|
||||
$('a[disabled=disabled]').click(function(event){
|
||||
|
|
|
|||
6
app/assets/javascripts/osem-translation.js
Normal file
6
app/assets/javascripts/osem-translation.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
window.liveSettings = {
|
||||
api_key: '',
|
||||
picker: "bottom-right",
|
||||
detectlang: true,
|
||||
autocollect: true
|
||||
};
|
||||
|
|
@ -8,15 +8,8 @@
|
|||
= stylesheet_link_tag "application", :media => "all"
|
||||
= javascript_include_tag "application"
|
||||
= csrf_meta_tags
|
||||
:javascript
|
||||
window.liveSettings = {
|
||||
api_key: "<%= CONFIG['transifex_live_api_key'] %>",
|
||||
picker: "bottom-right",
|
||||
detectlang: true,
|
||||
autocollect: true
|
||||
};
|
||||
= content_for(:script_head)
|
||||
=# javascript_include_tag "//cdn.transifex.com/live.js"
|
||||
= javascript_include_tag "//cdn.transifex.com/live.js"
|
||||
|
||||
= yield(:head)
|
||||
%body
|
||||
|
|
|
|||
|
|
@ -31,5 +31,3 @@ production:
|
|||
<<: *defaults
|
||||
|
||||
# If you add more providers that do not require a key, you still have to create the 2 variables with sample data
|
||||
|
||||
transifex_live_api_key: ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue