From 9e20d9208fac8343fc4fa8943c62c5cec03dc074 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 18 Mar 2015 09:35:59 +0100 Subject: [PATCH] Combine all JS files in one template --- templates/default/join.html.ep | 1 - templates/default/js_common.html.ep | 7 ++++++- templates/default/js_room.html.ep | 2 -- vroom.pl | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) delete mode 100644 templates/default/js_room.html.ep diff --git a/templates/default/join.html.ep b/templates/default/join.html.ep index cc0c816..3fb2202 100644 --- a/templates/default/join.html.ep +++ b/templates/default/join.html.ep @@ -353,7 +353,6 @@ %= include 'js_common' -%= include 'js_room' - <% 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 %> diff --git a/templates/default/js_room.html.ep b/templates/default/js_room.html.ep deleted file mode 100644 index 97bcc66..0000000 --- a/templates/default/js_room.html.ep +++ /dev/null @@ -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 %> diff --git a/vroom.pl b/vroom.pl index 60c2bee..29cba6c 100755 --- a/vroom.pl +++ b/vroom.pl @@ -2080,6 +2080,7 @@ get '/:room' => sub { } # Now display the room page return $self->render('join', + page => 'room', moh => $self->choose_moh(), video => $video, etherpad => ($ec) ? 'true' : 'false',