diff --git a/CHANGELOG b/CHANGELOG index 9593993..a1aa536 100755 --- a/CHANGELOG +++ b/CHANGELOG @@ -33,6 +33,8 @@ Contents **Changes introduced in 0.3.12 [Fix] Corrected nested insert size as displayed in "Available Templates" box +[Fix] Template port ID add/remove field not refreshing when shown for different connectable partitions +[Enhance] When configuring template port ID, show last port ID in long abreviated list **Changes introduced in 0.3.11 [Enhance] Added ability to create inserts with enclosure partitions diff --git a/assets/pages/jquery.templates.js b/assets/pages/jquery.templates.js index 194edf7..6910985 100755 --- a/assets/pages/jquery.templates.js +++ b/assets/pages/jquery.templates.js @@ -1689,25 +1689,6 @@ function handleScrollLock(){ function buildInsertParent(RUSize, hUnits, vUnits, encLayoutX, encLayoutY, nestedInsert, parentHUnits, parentVUnits, parentEncLayoutX, parentEncLayoutY){ var variables = getVariables(); - /* - var totalVUnits = RUSize * 2; - var flexRow = hUnits/24; - var flexCol = vUnits/totalVUnits; - - console.log('hUnits: '+hUnits); - console.log('parentHUnits: '+parentHUnits); - console.log('parentEncLayoutX: '+parentEncLayoutX); - console.log('nestedInsert: '+nestedInsert); - - if(nestedInsert) { - - parentFlexWidth = (parentHUnits / 24) / parentEncLayoutX; - parentFlexHeight = (parentVUnits / (RUSize * 2)) / parentEncLayoutY; - flexRow = parentFlexWidth * flexRow; - flexCol = parentFlexHeight * flexCol; - } - */ - if(nestedInsert) { parentFlexWidth = (parentHUnits / 24) / parentEncLayoutX; parentFlexHeight = (parentVUnits / (RUSize * 2)) / parentEncLayoutY; @@ -2398,6 +2379,7 @@ $( document ).ready(function() { $(document).data('portNameFormatAction', $(invoker).data('portNameAction')); setPortNameInput(); + handlePortNameFieldAddRemoveButtons(); updatePortNameDisplay(); setPortNameFieldFocus(); diff --git a/backend/process_port-name-format.php b/backend/process_port-name-format.php index 91ef1d3..478fc76 100755 --- a/backend/process_port-name-format.php +++ b/backend/process_port-name-format.php @@ -23,15 +23,17 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){ $portTotal = $data['portTotal']; $portNameListLong = ''; $portNameListShort = ''; + $portNameListShortCount = 3; + $portNameListLongCount = 5; for($x=0; $x<$portTotal; $x++) { $portName = $qls->App->generatePortName($portNameFormat, $x, $portTotal); - if($x < 3) { + if($x < $portNameListShortCount) { $portNameListShort .= $portName.', '; } - if($x < 10) { + if($x < $portNameListLongCount) { $portNameListLong .= $portName.'
'; } @@ -43,7 +45,10 @@ if($_SERVER['REQUEST_METHOD'] == 'POST'){ } $portNameListShort .= '...'; - $portNameListLong .= '...'; + //$portNameListLong .= '...'; + if($portTotal > $portNameListLongCount) { + $portNameListLong .= '...
'.$portNameLast; + } $portRange = $portNameFirst.'‑'.$portNameLast; $validate->returnData['success']['portNameListLong'] = $portNameListLong;