Changeset 825 for trunk/Modules


Ignore:
Timestamp:
Apr 16, 2016, 9:53:17 PM (9 years ago)
Author:
chronos
Message:
  • Added: Allow to independently select table page and column order. This solves a problem where going between pages with tables incorrectly set default ordering column.
Location:
trunk/Modules
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/Finance/Manage.php

    r823 r825  
    8181    $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$SQL.') AS T');
    8282    $DbRow = $DbResult->fetch_row();
    83     $PageList = GetPageList($DbRow[0]);
     83    $PageList = GetPageList('MonthlyPayment', $DbRow[0]);
    8484
    8585    $Output = $PageList['Output'];
     
    9494      array('Name' => 'BillingPeriodName', 'Title' => 'Perioda'),
    9595    );
    96     $Order = GetOrderTableHeader($TableColumns, 'SubjectName', 0);
     96    $Order = GetOrderTableHeader('MonthlyPayment', $TableColumns, 'SubjectName', 0);
    9797    $Output .= $Order['Output'];
    9898
  • trunk/Modules/Finance/UserState.php

    r756 r825  
    2222    $DbResult = $this->Database->query('SELECT COUNT(*) FROM '.$UserOperationTableQuery.' AS `T1`');
    2323    $DbRow = $DbResult->fetch_row();
    24     $PageList = GetPageList($DbRow[0]);
     24    $PageList = GetPageList('FinanceOperation', $DbRow[0]);
    2525
    2626    $Output .= $PageList['Output'];
     
    3535        array('Name' => 'BillCode', 'Title' => 'Doklad'),
    3636    );
    37     $Order = GetOrderTableHeader($TableColumns, 'Time', 1);
     37    $Order = GetOrderTableHeader('FinanceOperation', $TableColumns, 'Time', 1);
    3838    $Output .= $Order['Output'];
    3939
  • trunk/Modules/IS/IS.php

    r821 r825  
    527527      $TotalFilteredCount = $DbRow[0];
    528528    } else $TotalFilteredCount = $TotalCount;
    529     $PageList = GetPageList($TotalFilteredCount);
     529    $PageList = GetPageList($Table, $TotalFilteredCount);
    530530
    531531    $Output = $PageList['Output'];
     
    537537    if(!array_key_exists('DefaultSortOrder', $FormClass))
    538538      $FormClass['DefaultSortOrder'] = 0;
    539     $Order = GetOrderTableHeader($TableColumns, $FormClass['DefaultSortColumn'], $FormClass['DefaultSortOrder']);
     539    $Order = GetOrderTableHeader($Table, $TableColumns, $FormClass['DefaultSortColumn'], $FormClass['DefaultSortOrder']);
    540540    $Output .= $Order['Output'];
    541541
  • trunk/Modules/Network/Network.php

    r824 r825  
    208208        'Wireless' => array('Type' => 'TNetworkInterfaceWirelessListInterface', 'Caption' => 'Bezdrátové spoje', 'Default' => ''),
    209209        'Ports' => array('Type' => 'TDevicePortListInterface', 'Caption' => 'Síťové porty', 'Default' => ''),
    210         'Latency' => array('Type' => 'TDeviceInterfaceLatencyListInterface', 'Caption' => 'Odezva sítě', 'Default' => ''),
     210        'Latency' => array('Type' => 'TDeviceInterfaceLatencyListInterface', 'Caption' => 'Síťová odezva', 'Default' => ''),
    211211      ),
    212212      'AfterInsert' => array($this, 'AfterInsertNetworkInterface'),
     
    261261    ));
    262262    $this->System->FormManager->RegisterClass('NetworkInterfaceLatency', array(
    263       'Title' => 'Sťová odezva',
     263      'Title' => 'Síťová odezva',
    264264      'Table' => 'NetworkInterfaceLatency',
     265      'DefaultSortColumn' => 'Time',
     266      'DefaultSortOrder' => 1,
    265267      'Items' => array(
    266268        'Time' => array('Type' => 'DateTime', 'Caption' => 'Čas', 'Default' => ''),
  • trunk/Modules/Network/Subnet.php

    r790 r825  
    1515    $DbResult = $this->Database->query('SELECT COUNT(*) FROM `NetworkSubnet`');
    1616    $DbRow = $DbResult->fetch_row();
    17     $PageList = GetPageList($DbRow[0]);
     17    $PageList = GetPageList('Subnets', $DbRow[0]);
    1818
    1919    $Output = $PageList['Output'];
     
    3030      array('Name' => 'SubjectName', 'Title' => 'Účastník'),
    3131    );
    32     $Order = GetOrderTableHeader($TableColumns, 'AddressRange', 0);
     32    $Order = GetOrderTableHeader('Subnets', $TableColumns, 'AddressRange', 0);
    3333    $Output .= $Order['Output'];
    3434
  • trunk/Modules/System/System.php

    r738 r825  
    1616    $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Module`');
    1717    $DbRow = $DbResult->fetch_row();
    18     $PageList = GetPageList($DbRow[0]);
     18    $PageList = GetPageList('Modules', $DbRow[0]);
    1919
    2020    $Output .= $PageList['Output'];
     
    3131      array('Name' => '', 'Title' => 'Akce'),
    3232    );
    33     $Order = GetOrderTableHeader($TableColumns, 'Name', 0);
     33    $Order = GetOrderTableHeader('Modules', $TableColumns, 'Name', 0);
    3434    $Output .= $Order['Output'];
    3535    $Query = 'SELECT *, (SELECT GROUP_CONCAT(`T1`.`Name` SEPARATOR ", ") FROM `ModuleLink` '.
  • trunk/Modules/TV/TV.php

    r738 r825  
    3232      ' LEFT JOIN `Language` ON `Language`.`Id` = `TV`.`Language` WHERE (`TV`.`Stream` <> "") OR (`TV`.`StreamWeb` <> "")');
    3333    $DbRow = $DbResult->fetch_row();
    34     $PageList = GetPageList($DbRow[0]);
     34    $PageList = GetPageList('TVChannels', $DbRow[0]);
    3535
    3636    $Output .= $PageList['Output'];
     
    4444      array('Name' => '', 'Title' => 'Ladění'),
    4545    );
    46     $Order = GetOrderTableHeader($TableColumns, 'Name', 0);
     46    $Order = GetOrderTableHeader('TVChannels', $TableColumns, 'Name', 0);
    4747    $Output .= $Order['Output'];
    4848
  • trunk/Modules/TimeMeasure/Main.php

    r738 r825  
    200200    $DbResult = $this->Database->query('SELECT COUNT(*) FROM `Measure` WHERE `Enabled`=1');
    201201    $DbRow = $DbResult->fetch_row();
    202     $PageList = GetPageList($DbRow[0]);
     202    $PageList = GetPageList('Measures', $DbRow[0]);
    203203
    204204    $Output = $PageList['Output'];
     
    217217      $TableColumns[] = array('Name' => 'MeasureDuration', 'Title' => 'Čas vykonání');
    218218    }
    219     $Order = GetOrderTableHeader($TableColumns, 'Name', 0);
     219    $Order = GetOrderTableHeader('Measures', $TableColumns, 'Name', 0);
    220220    $Output .= $Order['Output'];
    221221
  • trunk/Modules/User/UserList.php

    r790 r825  
    1111    $DbResult = $this->Database->query('SELECT COUNT(*) FROM `User`');
    1212    $DbRow = $DbResult->fetch_row();
    13     $PageList = GetPageList($DbRow[0]);
     13    $PageList = GetPageList('Users', $DbRow[0]);
    1414
    1515    $Output = $PageList['Output'];
     
    2121      array('Name' => '', 'Title' => 'Počítače'),
    2222    );
    23     $Order = GetOrderTableHeader($TableColumns, 'Name', 0);
     23    $Order = GetOrderTableHeader('Users', $TableColumns, 'Name', 0);
    2424    $Output .= $Order['Output'];
    2525
  • trunk/Modules/User/UserPage.php

    r738 r825  
    2222    $DbResult = $this->Database->query('SELECT COUNT(*) FROM ('.$Query.') AS T');
    2323    $DbRow = $DbResult->fetch_row();
    24     $PageList = GetPageList($DbRow[0]);
     24    $PageList = GetPageList('Contacts', $DbRow[0]);
    2525
    2626    $Output = '<div>Kontakty</div>';
     
    3232      array('Name' => 'Value', 'Title' => 'Hodnota'),
    3333    );
    34     $Order = GetOrderTableHeader($TableColumns, 'Value', 0);
     34    $Order = GetOrderTableHeader('Contacts', $TableColumns, 'Value', 0);
    3535    $Output .= $Order['Output'];
    3636
  • trunk/Modules/Wiki/Wiki.php

    r745 r825  
    185185        $DbResult2 = $this->Database->query('SELECT COUNT(*) FROM `WikiPageContent` WHERE Page='.$DbRow['Id']);
    186186        $DbRow2 = $DbResult2->fetch_row();
    187         $PageList = GetPageList($DbRow2[0]);
     187        $PageList = GetPageList('WikiHistory', $DbRow2[0]);
    188188
    189189        $Output .= $PageList['Output'];
     
    196196        );
    197197
    198         $Order = GetOrderTableHeader($TableColumns, 'Time', 1);
     198        $Order = GetOrderTableHeader('WikiHistory', $TableColumns, 'Time', 1);
    199199        $Output .= $Order['Output'];
    200200
Note: See TracChangeset for help on using the changeset viewer.