{% extends "base.html" %} {% load i18n staticfiles %} {% block title %}{{ view_title }} - PyScada Control Center{% endblock %} {% block body_confic_data %} data-data-file="json/cache_data/" {% endblock %} {% block top_menu_left %} {% for page in page_list %}
  • {{page.title}}
  • {% endfor %} {% endblock %} {% block top_menu_right %} {% for panel in control_list %} {% if panel.visible %} {% endif %} {% endfor %} {% endblock %} {% block top_area %} {% endblock %} {% block content %}
    {{pages_html|safe}}
    Date Level Message
    {% for panel in panel_list %}
    {% endfor %} {% endblock %} {% block include_bootom %} {% endblock %} {% block script_bottom %} $( document ).ready(function() { // Handler for .ready() called. // hide all pages $(".sub-page").hide(); if (window.location.hash.length > 0) { $(window.location.hash).show(); }else{ window.location.hash = $('ul.navbar-nav li a').first().attr("href"); } // move overlapping side menus var menu_pos = $('footer')[0].clientHeight + 6; $.each($('.side-menu.left'),function(key,val){ $(val).attr("style","bottom: " + menu_pos + "px;"); menu_pos = menu_pos + val.clientHeight + 10; }); var menu_pos = $('footer')[0].clientHeight + 6; $.each($('.side-menu.right'),function(key,val){ $(val).attr("style","bottom: " + menu_pos + "px;"); menu_pos = menu_pos + val.clientHeight + 10; }); // sidemenues $('.side-menu.left').mouseenter(function(){ $(this).stop().CSSAnimate({"left":0},500) }).mouseleave(function(){ ow = $(this).outerWidth() $(this).stop().CSSAnimate({"left":-(ow - 11)},500) }); $('.side-menu.right').mouseenter(function(){ $(this).stop().CSSAnimate({"right":0},500) }).mouseleave(function(){ ow = $(this).outerWidth() $(this).stop().CSSAnimate({"right":-(ow - 11)},500) }); $('.side-menu.bottom').css('margin-left',- $('.side-menu.bottom').outerWidth(true)/2) $('.side-menu.bottom').stop().CSSAnimate({"bottom":-($('.side-menu.bottom').outerHeight(true) - 31)},500) $('.side-menu.bottom').mouseenter(function(){ $(this).stop().CSSAnimate({"bottom":0},500) }).mouseleave(function(){ oh = $(this).outerHeight(true) $(this).stop().CSSAnimate({"bottom":-(oh - 31)},500) }); // prevent reloading by existent window.onbeforeunload = function() { return "you realy wan't to reload/leave the page?"; }; // nav menu click event $(window).on('hashchange', function() { if (window.location.hash.length > 0) { $('ul.navbar-nav li.active').removeClass('active'); $('a[href$="' + window.location.hash + '"]').parent('li').addClass('active'); // hide all pages $(".sub-page").hide(); // show only new content $(window.location.hash).show(); }; }); }); {% endblock %}