templates/master.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. <html>
  3.     <head>
  4.         <meta charset="UTF-8">
  5.         <link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
  6.         <title>
  7.             {% block title %}
  8.                 {{ app_name }}
  9.                 -
  10.                 {{ page_title }}
  11.             {% endblock %}
  12.         </title>
  13.         {# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
  14.         <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
  15.         <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
  16.         {{ encore_entry_link_tags('app') }}
  17.         {% block stylesheets %}
  18.             
  19.         {% endblock %}
  20.         
  21.         <style media="screen">
  22.             #ck-button label {
  23.                 width: 2.8em;
  24.             }
  25.             #cy {
  26.                 width: 100%;
  27.                 height: 100%;
  28.                 position: absolute;
  29.                 left: 10px;
  30.                 top: 100px;
  31.                 z-index: 999;
  32.                 background-color: white;
  33.             }
  34.             .extremityA {
  35.                 background-color: #E8D5DC !important;
  36.             }
  37.             .extremityB {
  38.                 background-color: #EDEE04 !important;
  39.             }
  40.             .extremityASite {
  41.                 background-color: #BB9CA9 !important;
  42.             }
  43.             .extremityBSite {
  44.                 background-color: #F0D162 !important;
  45.             }
  46.             #ck-button input.un_connected:disabled + span {
  47.                 background-color: yellow;
  48.             }
  49.             #ck-button input.un_selectable:disabled + span {
  50.                 background-color: #000;
  51.             }
  52.             #ck-button input.mpo_parent_port:disabled + span {
  53.                 background-color: #458;
  54.             }
  55.             .skin-blue .main-header .navbar{
  56.                                 background-color: green;
  57.                         }
  58.             .mpo_parent_port_border {
  59.                 border: 2px solid red;
  60.             }
  61.             .mpo_parent_port_checked {
  62.                 background-color: #777 !important;
  63.             }
  64.             hr {
  65.                 clear: both;
  66.                 height: 4px;
  67.                 margin: 15px 0;
  68.                 background-image: -webkit-linear-gradient(left, rgba(210,105,30,.8), rgba(210,105,30,.6), rgba(210,105,30,.4));
  69.             }
  70.             .pageLengthDiv {
  71.                 text-align: center;
  72.                 padding-bottom: 5px;
  73.             }
  74.         </style>
  75.     </head>
  76.     <body class="hold-transition skin-blue sidebar-mini layout-top-nav">
  77.         <div class="wrapper">
  78.             {% include 'main-header.html.twig' %}
  79.             <!-- Content Wrapper. Contains page content -->
  80.             <div
  81.                 class="content-wrapper">
  82.                 <!-- Content header -->
  83.                 <section class="content-header row">
  84.                     <h1 class="col-md-6 pull-left">
  85.                         {{ page_title }}
  86.                     </h1>
  87.                 </section>
  88.                 <!-- Main content -->
  89.                 <section class="content"> {% block content %}{% endblock %}
  90.                     </section>
  91.                     <!-- /.content -->
  92.                 </div>
  93.                 <!-- /.content-wrapper -->
  94.                 {% include 'main-footer.html.twig' %}
  95.             </div>
  96.             {{ encore_entry_script_tags('app') }}
  97.             <script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>
  98.             
  99.             <script type="text/javascript">
  100.             (function() {
  101.                 /*
  102.                 * Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license
  103.                 * Author: Jim Palmer (based on chunking idea from Dave Koelle)
  104.                 * Contributors: Mike Grier (mgrier.com), Clint Priest, Kyle Adams, guillermo
  105.                 * See: http://js-naturalsort.googlecode.com/svn/trunk/naturalSort.js
  106.                 */
  107.                 function naturalSort (a, b, html) {
  108.                 var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?%?$|^0x[0-9a-f]+$|[0-9]+)/gi,
  109.                     sre = /(^[ ]*|[ ]*$)/g,
  110.                     dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,
  111.                     hre = /^0x[0-9a-f]+$/i,
  112.                     ore = /^0/,
  113.                     htmre = /(<([^>]+)>)/ig,
  114.                     // convert all to strings and trim()
  115.                     x = a.toString().replace(sre, '') || '',
  116.                     y = b.toString().replace(sre, '') || '';
  117.                     // remove html from strings if desired
  118.                     if (!html) {
  119.                         x = x.replace(htmre, '');
  120.                         y = y.replace(htmre, '');
  121.                     }
  122.                     // chunk/tokenize
  123.                 var xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
  124.                     yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
  125.                     // numeric, hex or date detection
  126.                     xD = parseInt(x.match(hre), 10) || (xN.length !== 1 && x.match(dre) && Date.parse(x)),
  127.                     yD = parseInt(y.match(hre), 10) || xD && y.match(dre) && Date.parse(y) || null;
  128.                 // first try and sort Hex codes or Dates
  129.                 if (yD) {
  130.                     if ( xD < yD ) {
  131.                         return -1;
  132.                     }
  133.                     else if ( xD > yD ) {
  134.                         return 1;
  135.                     }
  136.                 }
  137.                 // natural sorting through split numeric strings and default strings
  138.                 for(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc++) {
  139.                     // find floats not starting with '0', string or 0 if not defined (Clint Priest)
  140.                     var oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc], 10) || xN[cLoc] || 0;
  141.                     var oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc], 10) || yN[cLoc] || 0;
  142.                     // handle numeric vs string comparison - number < string - (Kyle Adams)
  143.                     if (isNaN(oFxNcL) !== isNaN(oFyNcL)) {
  144.                         return (isNaN(oFxNcL)) ? 1 : -1;
  145.                     }
  146.                     // rely on string comparison if different types - i.e. '02' < 2 != '02' < '2'
  147.                     else if (typeof oFxNcL !== typeof oFyNcL) {
  148.                         oFxNcL += '';
  149.                         oFyNcL += '';
  150.                     }
  151.                     if (oFxNcL < oFyNcL) {
  152.                         return -1;
  153.                     }
  154.                     if (oFxNcL > oFyNcL) {
  155.                         return 1;
  156.                     }
  157.                 }
  158.                 return 0;
  159.                 }
  160.                 jQuery.extend( jQuery.fn.dataTableExt.oSort, {
  161.                 "natural-asc": function ( a, b ) {
  162.                     return naturalSort(a,b,true);
  163.                 },
  164.                 "natural-desc": function ( a, b ) {
  165.                     return naturalSort(a,b,true) * -1;
  166.                 },
  167.                 "natural-nohtml-asc": function( a, b ) {
  168.                     return naturalSort(a,b,false);
  169.                 },
  170.                 "natural-nohtml-desc": function( a, b ) {
  171.                     return naturalSort(a,b,false) * -1;
  172.                 },
  173.                 "natural-ci-asc": function( a, b ) {
  174.                     a = a.toString().toLowerCase();
  175.                     b = b.toString().toLowerCase();
  176.                     return naturalSort(a,b,true);
  177.                 },
  178.                 "natural-ci-desc": function( a, b ) {
  179.                     a = a.toString().toLowerCase();
  180.                     b = b.toString().toLowerCase();
  181.                     return naturalSort(a,b,true) * -1;
  182.                 }
  183.                 } );
  184.             }());
  185.             for (let i = 1; i <= 12; i++) {
  186.                 let classe = ".portA"+i;
  187.                 $(document).on("click", classe, function(e) {
  188.                   if( $(this).is(':checked') ) {
  189.                     $(classe).each(function () {
  190.                       $(this).prop("checked", false)
  191.                     });
  192.                     $(this).prop("checked", true);
  193.                   }
  194.                 });
  195.             }
  196.             for (let i = 1; i <= 12; i++) {
  197.                 let classe = ".portB"+i;
  198.                 $(document).on("click", classe, function(e) {
  199.                   if( $(this).is(':checked') ) {
  200.                     $(classe).each(function () {
  201.                       $(this).prop("checked", false)
  202.                     });
  203.                     $(this).prop("checked", true);
  204.                   }
  205.                 });
  206.             }
  207.         </script>
  208.         {% block javascripts %}{% endblock %} 
  209.     </body>
  210. </html>