0.3.12
This commit is contained in:
parent
81cca94787
commit
1cebdf1303
@ -443,9 +443,8 @@ function makeCabCloseClickable(){
|
||||
}
|
||||
|
||||
function resizeCanvas() {
|
||||
$('#canvasBuildSpace').attr('width', $('#canvasBuildSpace').parent().width());
|
||||
$('#canvasBuildSpace').attr('height', $('#canvasBuildSpace').parent().height());
|
||||
//redraw();
|
||||
$('#canvasBuildSpace').attr('width', $(document).width());
|
||||
$('#canvasBuildSpace').attr('height', $(document).height());
|
||||
}
|
||||
|
||||
function redraw() {
|
||||
|
||||
@ -27,7 +27,6 @@ $qls->Security->check_auth_page('user.php');
|
||||
|
||||
<!-- Make server data available to client via hidden inputs -->
|
||||
<?php include_once('includes/content-build-serverData.php'); ?>
|
||||
<canvas id="canvasBuildSpace" style="z-index:1000;position:absolute; pointer-events:none;"></canvas>
|
||||
|
||||
<!-- Page-Title -->
|
||||
<div class="row">
|
||||
|
||||
@ -1952,6 +1952,8 @@ var $qls;
|
||||
|
||||
function buildPathFull($path, $connectorCode39){
|
||||
|
||||
error_log('Debug (buildPathFull $path): '.json_encode($path));
|
||||
|
||||
$htmlPathFull = '';
|
||||
$htmlPathFull .= '<table>';
|
||||
|
||||
@ -1959,6 +1961,7 @@ var $qls;
|
||||
|
||||
$pathOrientation = $this->qls->user_info['pathOrientation'];
|
||||
|
||||
// Cable Adjacent
|
||||
if($pathOrientation == 0) {
|
||||
foreach($path as $objectIndex => $object) {
|
||||
$objType = $object['type'];
|
||||
@ -1967,12 +1970,16 @@ var $qls;
|
||||
|
||||
case 'connector':
|
||||
|
||||
error_log('here1');
|
||||
$addConnector = false;
|
||||
if(isset($path[$objectIndex+1])) {
|
||||
error_log('here2');
|
||||
if($path[$objectIndex+1]['type'] != 'object') {
|
||||
error_log('here3');
|
||||
$addConnector = true;
|
||||
}
|
||||
} else {
|
||||
error_log('here4');
|
||||
$addConnector = true;
|
||||
}
|
||||
|
||||
@ -1985,7 +1992,7 @@ var $qls;
|
||||
$connectorTypeID = $object['data']['connectorType'];
|
||||
|
||||
if($connectorTypeID != 0) {
|
||||
$connectorTypeName = $this->connectorTypeValueArray[$connectorTypeID]['name'];
|
||||
$connectorTypeName = $this->portTypeValueArray[$connectorTypeID]['name'];
|
||||
$connectorHTML = '<div title="'.$connectorTypeName.'" class="port '.$connectorTypeName.'"></div>';
|
||||
} else {
|
||||
$connectorTypeName = 'Unk';
|
||||
@ -2045,12 +2052,12 @@ var $qls;
|
||||
$htmlString = '<td>'.$objBox.'</td>';
|
||||
array_push($tableArray[count($tableArray)-1], $htmlString);
|
||||
|
||||
if($path[$objectIndex+1]['type'] == 'trunk') {
|
||||
if($path[$objectIndex+1]['type'] == 'trunk' or !isset($path[$objectIndex+1])) {
|
||||
if(isset($path[$objectIndex-1])) {
|
||||
$connectorTypeID = $path[$objectIndex-1]['data']['connectorType'];
|
||||
|
||||
if($connectorTypeID != 0) {
|
||||
$connectorTypeName = $this->connectorTypeValueArray[$connectorTypeID]['name'];
|
||||
$connectorTypeName = $this->portTypeValueArray[$connectorTypeID]['name'];
|
||||
$connectorHTML = '<div title="'.$connectorTypeName.'" class="port '.$connectorTypeName.'"></div>';
|
||||
} else {
|
||||
$connectorTypeName = 'Unk';
|
||||
@ -2088,6 +2095,7 @@ var $qls;
|
||||
}
|
||||
}
|
||||
|
||||
// Cable inline
|
||||
} else {
|
||||
|
||||
foreach($path as $objectIndex => $object) {
|
||||
|
||||
@ -83,12 +83,25 @@ for($x=0; $x<2; $x++){
|
||||
$remoteAttrPrefix = $inventory['remoteAttrPrefix'];
|
||||
$connection = $qls->App->inventoryAllArray[$inventoryID];
|
||||
|
||||
// Retrieve local connector type
|
||||
$localObj = $qls->App->objectArray[$objID];
|
||||
$localTemplateID = $localObj['template_id'];
|
||||
$localConnectorType = $qls->App->compatibilityArray[$localTemplateID][$objFace][$objDepth]['portType'];
|
||||
|
||||
// Retrieve remote connector type
|
||||
$remoteObjID = $inventory['id'];
|
||||
$remoteObjFace = $inventory['face'];
|
||||
$remoteObjDepth = $inventory['depth'];
|
||||
$remoteObj = $qls->App->objectArray[$remoteObjID];
|
||||
$remoteTemplateID = $remoteObj['template_id'];
|
||||
$remoteConnectorType = $qls->App->compatibilityArray[$remoteTemplateID][$remoteObjFace][$remoteObjDepth]['portType'];
|
||||
|
||||
// Local Connection
|
||||
$connector1WorkingArray = array(
|
||||
'type' => 'connector',
|
||||
'data' => array(
|
||||
'code39' => $connection[$localAttrPrefix.'_code39'],
|
||||
'connectorType' => $connection[$localAttrPrefix.'_connector']
|
||||
'connectorType' => $localConnectorType
|
||||
)
|
||||
);
|
||||
|
||||
@ -110,7 +123,7 @@ for($x=0; $x<2; $x++){
|
||||
'type' => 'connector',
|
||||
'data' => array(
|
||||
'code39' => $connection[$remoteAttrPrefix.'_code39'],
|
||||
'connectorType' => $connection[$remoteAttrPrefix.'_connector']
|
||||
'connectorType' => $remoteConnectorType
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
@ -17,6 +17,9 @@
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Canvas for drawing connections -->
|
||||
<canvas id="canvasBuildSpace" style="z-index:1000;position:absolute; pointer-events:none;"></canvas>
|
||||
|
||||
<?php require 'topbar.php'; ?>
|
||||
|
||||
<!-- User Settings -->
|
||||
|
||||
Loading…
Reference in New Issue
Block a user