Changeset 846


Ignore:
Timestamp:
May 1, 2017, 4:25:52 PM (8 years ago)
Author:
chronos
Message:
  • Fixed: Switching tabs with view action after saved/added items.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/IS/IS.php

    r843 r846  
    358358    return($Output);
    359359  }
    360  
     360
    361361  function ShowTabs($Tabs, $QueryParamName, $TabContent)
    362362  {
    363         $QueryItems = GetQueryStringArray($_SERVER['QUERY_STRING']);
    364        
     363    $QueryItems = GetQueryStringArray($_SERVER['QUERY_STRING']);
     364    $QueryItems['a'] = 'view';
     365
    365366    if(array_key_exists($QueryParamName, $_GET)) $TabIndex = $_GET[$QueryParamName];
    366367      else $TabIndex = 0;
     
    432433    ($this->System->FormManager->FormTypes[$Item['Type']]['Type'] == 'ManyToOne')))
    433434    {
    434           $Tabs[] = $Item['Caption'];
     435      $Tabs[] = $Item['Caption'];
    435436    }
    436437    $Tabs[] = 'Vše';
    437438    if(array_key_exists('tab', $_GET)) $TabIndex = $_GET['tab'];
    438439      else $TabIndex = 0;
    439    
     440
    440441    $TabContent = '';
    441442    $I = 0;
     
    444445    ($this->System->FormManager->FormTypes[$Item['Type']]['Type'] == 'ManyToOne')))
    445446    {
    446           $TypeItem = $this->System->FormManager->FormTypes[$Item['Type']];
     447      $TypeItem = $this->System->FormManager->FormTypes[$Item['Type']];
    447448      if (($TabIndex == $I) or ($TabIndex == (count($Tabs) - 1)))
    448       { 
     449      {
    449450        $TabContent .= $this->ShowList($TypeItem['Table'], '`'.
    450451          $TypeItem['Ref'].'`='.$Id, $Item['Caption'],
    451452          $TypeItem['Ref'], $Id).'<br/>';
    452           }
    453           $I++;
    454         }
     453      }
     454      $I++;
     455    }
    455456
    456457    $Output .= $this->ShowTabs($Tabs, 'tab', $TabContent);
Note: See TracChangeset for help on using the changeset viewer.