<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}"/>
<title>
{% block title %}
{{ app_name }}
-
{{ page_title }}
{% endblock %}
</title>
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/css/bootstrap-select.min.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
{{ encore_entry_link_tags('app') }}
{% block stylesheets %}
{% endblock %}
<style media="screen">
#ck-button label {
width: 2.8em;
}
#cy {
width: 100%;
height: 100%;
position: absolute;
left: 10px;
top: 100px;
z-index: 999;
background-color: white;
}
.extremityA {
background-color: #E8D5DC !important;
}
.extremityB {
background-color: #EDEE04 !important;
}
.extremityASite {
background-color: #BB9CA9 !important;
}
.extremityBSite {
background-color: #F0D162 !important;
}
#ck-button input.un_connected:disabled + span {
background-color: yellow;
}
#ck-button input.un_selectable:disabled + span {
background-color: #000;
}
#ck-button input.mpo_parent_port:disabled + span {
background-color: #458;
}
.skin-blue .main-header .navbar{
background-color: green;
}
.mpo_parent_port_border {
border: 2px solid red;
}
.mpo_parent_port_checked {
background-color: #777 !important;
}
hr {
clear: both;
height: 4px;
margin: 15px 0;
background-image: -webkit-linear-gradient(left, rgba(210,105,30,.8), rgba(210,105,30,.6), rgba(210,105,30,.4));
}
.pageLengthDiv {
text-align: center;
padding-bottom: 5px;
}
</style>
</head>
<body class="hold-transition skin-blue sidebar-mini layout-top-nav">
<div class="wrapper">
{% include 'main-header.html.twig' %}
<!-- Content Wrapper. Contains page content -->
<div
class="content-wrapper">
<!-- Content header -->
<section class="content-header row">
<h1 class="col-md-6 pull-left">
{{ page_title }}
</h1>
</section>
<!-- Main content -->
<section class="content"> {% block content %}{% endblock %}
</section>
<!-- /.content -->
</div>
<!-- /.content-wrapper -->
{% include 'main-footer.html.twig' %}
</div>
{{ encore_entry_script_tags('app') }}
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.12.4/js/bootstrap-select.min.js"></script>
<script type="text/javascript">
(function() {
/*
* Natural Sort algorithm for Javascript - Version 0.7 - Released under MIT license
* Author: Jim Palmer (based on chunking idea from Dave Koelle)
* Contributors: Mike Grier (mgrier.com), Clint Priest, Kyle Adams, guillermo
* See: http://js-naturalsort.googlecode.com/svn/trunk/naturalSort.js
*/
function naturalSort (a, b, html) {
var re = /(^-?[0-9]+(\.?[0-9]*)[df]?e?[0-9]?%?$|^0x[0-9a-f]+$|[0-9]+)/gi,
sre = /(^[ ]*|[ ]*$)/g,
dre = /(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,
hre = /^0x[0-9a-f]+$/i,
ore = /^0/,
htmre = /(<([^>]+)>)/ig,
// convert all to strings and trim()
x = a.toString().replace(sre, '') || '',
y = b.toString().replace(sre, '') || '';
// remove html from strings if desired
if (!html) {
x = x.replace(htmre, '');
y = y.replace(htmre, '');
}
// chunk/tokenize
var xN = x.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
yN = y.replace(re, '\0$1\0').replace(/\0$/,'').replace(/^\0/,'').split('\0'),
// numeric, hex or date detection
xD = parseInt(x.match(hre), 10) || (xN.length !== 1 && x.match(dre) && Date.parse(x)),
yD = parseInt(y.match(hre), 10) || xD && y.match(dre) && Date.parse(y) || null;
// first try and sort Hex codes or Dates
if (yD) {
if ( xD < yD ) {
return -1;
}
else if ( xD > yD ) {
return 1;
}
}
// natural sorting through split numeric strings and default strings
for(var cLoc=0, numS=Math.max(xN.length, yN.length); cLoc < numS; cLoc++) {
// find floats not starting with '0', string or 0 if not defined (Clint Priest)
var oFxNcL = !(xN[cLoc] || '').match(ore) && parseFloat(xN[cLoc], 10) || xN[cLoc] || 0;
var oFyNcL = !(yN[cLoc] || '').match(ore) && parseFloat(yN[cLoc], 10) || yN[cLoc] || 0;
// handle numeric vs string comparison - number < string - (Kyle Adams)
if (isNaN(oFxNcL) !== isNaN(oFyNcL)) {
return (isNaN(oFxNcL)) ? 1 : -1;
}
// rely on string comparison if different types - i.e. '02' < 2 != '02' < '2'
else if (typeof oFxNcL !== typeof oFyNcL) {
oFxNcL += '';
oFyNcL += '';
}
if (oFxNcL < oFyNcL) {
return -1;
}
if (oFxNcL > oFyNcL) {
return 1;
}
}
return 0;
}
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"natural-asc": function ( a, b ) {
return naturalSort(a,b,true);
},
"natural-desc": function ( a, b ) {
return naturalSort(a,b,true) * -1;
},
"natural-nohtml-asc": function( a, b ) {
return naturalSort(a,b,false);
},
"natural-nohtml-desc": function( a, b ) {
return naturalSort(a,b,false) * -1;
},
"natural-ci-asc": function( a, b ) {
a = a.toString().toLowerCase();
b = b.toString().toLowerCase();
return naturalSort(a,b,true);
},
"natural-ci-desc": function( a, b ) {
a = a.toString().toLowerCase();
b = b.toString().toLowerCase();
return naturalSort(a,b,true) * -1;
}
} );
}());
for (let i = 1; i <= 12; i++) {
let classe = ".portA"+i;
$(document).on("click", classe, function(e) {
if( $(this).is(':checked') ) {
$(classe).each(function () {
$(this).prop("checked", false)
});
$(this).prop("checked", true);
}
});
}
for (let i = 1; i <= 12; i++) {
let classe = ".portB"+i;
$(document).on("click", classe, function(e) {
if( $(this).is(':checked') ) {
$(classe).each(function () {
$(this).prop("checked", false)
});
$(this).prop("checked", true);
}
});
}
</script>
{% block javascripts %}{% endblock %}
</body>
</html>