From f8257889b32114e66bdeb2810b4a947476f35f48 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 18 Mar 2015 11:06:46 +0100 Subject: [PATCH] Mark active page as such in the toolbar --- public/js/vroom.js | 3 +++ templates/default/js_common.html.ep | 1 + templates/default/public_toolbar.html.ep | 10 +++++----- vroom.pl | 24 +++++++++++++++++++++--- 4 files changed, 30 insertions(+), 8 deletions(-) diff --git a/public/js/vroom.js b/public/js/vroom.js index d59a4cb..5405a2d 100644 --- a/public/js/vroom.js +++ b/public/js/vroom.js @@ -32,6 +32,9 @@ var itemPerPage = 20; // Will store the global webrtc object var webrtc = undefined; +// Mark current page link as active +$('#lnk_' + page).addClass('active'); + // Localize the strings we need $.ajax({ url: rootUrl + 'localize/' + currentLang, diff --git a/templates/default/js_common.html.ep b/templates/default/js_common.html.ep index 95eeadc..9df354d 100644 --- a/templates/default/js_common.html.ep +++ b/templates/default/js_common.html.ep @@ -4,6 +4,7 @@ var rootUrl = '<%= $url %>'; var currentLang = '<%= $self->languages %>'; var api_key = '<%= ($self->session('key')) ? $self->session('key') : '' %>'; + var page = '<%= stash('page') ? stash('page') : "" %>'; var roomName; <% diff --git a/templates/default/public_toolbar.html.ep b/templates/default/public_toolbar.html.ep index 049b10e..159e5f7 100644 --- a/templates/default/public_toolbar.html.ep +++ b/templates/default/public_toolbar.html.ep @@ -11,20 +11,20 @@