Skip to content
Snippets Groups Projects
Commit 9ac981c7 authored by Carlos Vega's avatar Carlos Vega
Browse files

added vertical ticker marquee to scroll between multiple warning messages....

added vertical ticker marquee to scroll between multiple warning messages. Added feature detection to check unsupported browsers
parent dfc02f54
No related branches found
No related tags found
1 merge request!210Feature/message for unsupported browsers
......@@ -71,9 +71,17 @@ desired effect
<a href="#" class="sidebar-toggle" data-toggle="offcanvas" role="button">
<span class="sr-only">Toggle navigation</span>
</a>
{% if user.is_authenticated and role == '<No worker information>' %}
<span class="no_worker_warning"><i class="fa fa-exclamation-triangle"></i>Some features might not work, <b>{{ user.get_username }}</b> has no worker associated.</span>
{% endif %}
<!-- <span class="no_worker_warning"><i class="fa fa-exclamation-triangle"></i>Some features might not work, <b>{{ user.get_username }}</b> has no worker associated.</span> -->
<div class="col-xs-7 navbar-text" style="margin-left: 0px">
<div class="warning_ticker">
<div class="ticker_list">
{% if user.is_authenticated and role == '<No worker information>' %}
<div class="warning"><i class="fa fa-exclamation-triangle"></i>Some features might not work, <b>{{ user.get_username }}</b> has no worker associated.</div>
{% endif %}
</div>
</div>
</div>
<!-- Navbar Right Menu -->
<div class="navbar-custom-menu">
......@@ -389,6 +397,27 @@ desired effect
window['moment-range'].extendMoment(moment);
</script>
<script>
if(!Modernizr.arrow){ // no arrow functions
$('.ticker_list').append(`<div class="warning"><i class="fa fa-exclamation-triangle"></i>This browser does not support some of our features. </div>`);
$('.ticker_list').append(`<div class="warning"><i class="fa fa-exclamation-triangle"></i>Please use a recent browser like Firefox or Chrome. </div>`);
}
//vertical ticker marquee. This could be used for other messages as weell :-)
if($('.ticker_list').children().length > 1){
$('.warning_ticker').easyTicker({
direction: 'up',
easing: 'swing',
speed: 'slow',
interval: 2000,
height: 'auto',
visible: 1,
mousePause: 1
});
}else if($('.ticker_list').children().length == 1){
}else{
$('.warning_ticker').css('display', 'none');
}
var activate = function (page_to_activate) {
var $e = $(".sidebar-menu li[data-desc='" + page_to_activate + "']");
$e.addClass("active");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment