diff --git a/assets/pages/jquery.drawConnections.js b/assets/pages/jquery.drawConnections.js index ee4d122..2256740 100755 --- a/assets/pages/jquery.drawConnections.js +++ b/assets/pages/jquery.drawConnections.js @@ -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() { diff --git a/explore.php b/explore.php index 290b797..73cc6cc 100755 --- a/explore.php +++ b/explore.php @@ -27,7 +27,6 @@ $qls->Security->check_auth_page('user.php'); -
diff --git a/includes/App.class.php b/includes/App.class.php index 83b6896..a3d31d5 100755 --- a/includes/App.class.php +++ b/includes/App.class.php @@ -1952,6 +1952,8 @@ var $qls; function buildPathFull($path, $connectorCode39){ + error_log('Debug (buildPathFull $path): '.json_encode($path)); + $htmlPathFull = ''; $htmlPathFull .= ''; @@ -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 = '
'; } else { $connectorTypeName = 'Unk'; @@ -2045,12 +2052,12 @@ var $qls; $htmlString = ''; 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 = '
'; } else { $connectorTypeName = 'Unk'; @@ -2088,6 +2095,7 @@ var $qls; } } + // Cable inline } else { foreach($path as $objectIndex => $object) { diff --git a/includes/content-path.php b/includes/content-path.php index b57bd40..6c43776 100755 --- a/includes/content-path.php +++ b/includes/content-path.php @@ -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 ) ); diff --git a/includes/header_end.php b/includes/header_end.php index 2f71cde..8289938 100755 --- a/includes/header_end.php +++ b/includes/header_end.php @@ -17,6 +17,9 @@ + + +
'.$objBox.'