Combine all JS files in one template

master
Daniel Berteaud 10 years ago
parent 8fc6cc7de7
commit 9e20d9208f
  1. 1
      templates/default/join.html.ep
  2. 7
      templates/default/js_common.html.ep
  3. 2
      templates/default/js_room.html.ep
  4. 1
      vroom.pl

@ -353,7 +353,6 @@
</div> </div>
</div> </div>
%= include 'js_common' %= include 'js_common'
%= include 'js_room'
<script> <script>
var roomName = '<%= $room %>'; var roomName = '<%= $room %>';
$( document ).ready(function() { $( document ).ready(function() {

@ -6,5 +6,10 @@
var api_key = '<%= ($self->session('key')) ? $self->session('key') : '' %>'; var api_key = '<%= ($self->session('key')) ? $self->session('key') : '' %>';
var roomName; var roomName;
</script> </script>
<% my @js = qw(js/jquery-1.11.2.js js/bootstrap.js js/notify-combined.js js/bootstrap-switch.js js/jquery.bootpag.js js/toc.js js/vroom.js); %> <%
my @js = qw(js/jquery-1.11.2.js js/bootstrap.js js/notify-combined.js js/bootstrap-switch.js js/jquery.bootpag.js js/toc.js js/vroom.js);
if (stash('page') && stash('page') eq 'room'){
push @js, qw(js/simplewebrtc.bundle.js js/jquery.browser.js js/sprintf.js js/FileSaver.js js/jquery.tinytimer.js js/etherpad.js);
}
%>
<%=js @js %> <%=js @js %>

@ -1,2 +0,0 @@
<% my @js = qw(js/simplewebrtc.bundle.js js/jquery.browser.js js/sprintf.js js/FileSaver.js js/jquery.tinytimer.js js/etherpad.js); %>
<%=js @js %>

@ -2080,6 +2080,7 @@ get '/:room' => sub {
} }
# Now display the room page # Now display the room page
return $self->render('join', return $self->render('join',
page => 'room',
moh => $self->choose_moh(), moh => $self->choose_moh(),
video => $video, video => $video,
etherpad => ($ec) ? 'true' : 'false', etherpad => ($ec) ? 'true' : 'false',

Loading…
Cancel
Save