mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
put live js code into application layout
This commit is contained in:
parent
b43b68ac4f
commit
40fc1a32d4
3 changed files with 9 additions and 8 deletions
|
|
@ -30,7 +30,6 @@
|
||||||
//= require osem-datepickers
|
//= require osem-datepickers
|
||||||
//= require osem-datatables
|
//= require osem-datatables
|
||||||
//= require osem-tickets
|
//= require osem-tickets
|
||||||
//= require transifex-live
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('a[disabled=disabled]').click(function(event){
|
$('a[disabled=disabled]').click(function(event){
|
||||||
|
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
window.liveSettings = {
|
|
||||||
api_key: CONFIG['transifex_live_api_key'],
|
|
||||||
picker: "bottom-right",
|
|
||||||
detectlang: true,
|
|
||||||
autocollect: true
|
|
||||||
};
|
|
||||||
|
|
@ -8,14 +8,22 @@
|
||||||
= stylesheet_link_tag "application", :media => "all"
|
= stylesheet_link_tag "application", :media => "all"
|
||||||
= stylesheet_link_tag "splash" if content_for :splash
|
= stylesheet_link_tag "splash" if content_for :splash
|
||||||
= javascript_include_tag "application"
|
= javascript_include_tag "application"
|
||||||
= javascript_include_tag "//cdn.transifex.com/live.js"
|
|
||||||
= csrf_meta_tags
|
= csrf_meta_tags
|
||||||
:javascript
|
:javascript
|
||||||
|
window.liveSettings = {
|
||||||
|
api_key: "<%= CONFIG['transifex_live_api_key'] %>",
|
||||||
|
picker: "bottom-right",
|
||||||
|
detectlang: true,
|
||||||
|
autocollect: true
|
||||||
|
};
|
||||||
|
|
||||||
$(function() {
|
$(function() {
|
||||||
$('.dropdown input, .dropdown label').click(function(e) {
|
$('.dropdown input, .dropdown label').click(function(e) {
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
= javascript_include_tag "//cdn.transifex.com/live.js"
|
||||||
= yield(:head)
|
= yield(:head)
|
||||||
%body{ data: (content_for?(:splash_nav) ? {spy: 'scroll', offset: 0, target: 'splash-nav'} : {} ) }
|
%body{ data: (content_for?(:splash_nav) ? {spy: 'scroll', offset: 0, target: 'splash-nav'} : {} ) }
|
||||||
= render 'layouts/navigation'
|
= render 'layouts/navigation'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue