mirror of
https://github.com/dani/vroom.git
synced 2024-06-02 05:21:39 +02:00
Define rootUrl in js_include
So /localize is working not matter which alias we use, even on the front page
This commit is contained in:
parent
1e2e524900
commit
4815e4cb83
|
@ -35,7 +35,7 @@ var locale = {
|
||||||
|
|
||||||
// Localize the strings we need
|
// Localize the strings we need
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '/localize',
|
url: rootUrl + 'localize',
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
data: {
|
data: {
|
||||||
|
|
|
@ -162,11 +162,6 @@
|
||||||
</div>
|
</div>
|
||||||
%= include 'js_include'
|
%= include 'js_include'
|
||||||
<script>
|
<script>
|
||||||
<%
|
|
||||||
my $url = $self->url_for('/');
|
|
||||||
$url .= ($url =~ m/\/$/) ? '' : '/';
|
|
||||||
%>
|
|
||||||
var rootUrl = '<%= $url %>';
|
|
||||||
var roomName = '<%= $room %>';
|
var roomName = '<%= $room %>';
|
||||||
$( document ).ready(function() {
|
$( document ).ready(function() {
|
||||||
webrtc = new SimpleWebRTC({
|
webrtc = new SimpleWebRTC({
|
||||||
|
|
|
@ -1,3 +1,10 @@
|
||||||
|
<script type="text/javascript">
|
||||||
|
<%
|
||||||
|
my $url = $self->url_for('/');
|
||||||
|
$url .= ($url =~ m/\/$/) ? '' : '/';
|
||||||
|
%>
|
||||||
|
var rootUrl = '<%= $url %>';
|
||||||
|
</script>
|
||||||
<script type="text/javascript" src="/js/simplewebrtc.bundle.js"></script>
|
<script type="text/javascript" src="/js/simplewebrtc.bundle.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
|
<script type="text/javascript" src="/js/jquery-1.11.1.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
|
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user