Changeset 708 for trunk/Modules/File


Ignore:
Timestamp:
Dec 21, 2014, 11:52:41 PM (9 years ago)
Author:
chronos
Message:
  • Přidáno: Zobrazování podadresářů a souborů v adresářích v ISu.
File:
1 edited

Legend:

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

    r690 r708  
    138138      'Items' => array(
    139139        'Name' => array('Type' => 'String', 'Caption' => 'Jméno', 'Default' => ''),
    140         'Parent' => array('Type' => 'TDirectory', 'Caption' => 'Nadřazený adresář', 'Default' => '', 'Null' => true),
     140       'Parent' => array('Type' => 'TDirectory', 'Caption' => 'Nadřazený adresář', 'Default' => '', 'Null' => true),
     141        'Subdirectories' => array('Type' => 'TDirectoryList', 'Caption' => 'Podadresáře', 'Default' => ''),
     142        'Files' => array('Type' => 'TFileList', 'Caption' => 'Soubory', 'Default' => ''),
    141143      ),
    142144    ));
    143 
     145    $this->System->FormManager->RegisterFormType('TDirectory', array(
     146      'Type' => 'Reference',
     147      'Table' => 'FileDirectory',
     148      'Id' => 'Id',
     149      'Name' => 'Name',
     150      'Filter' => '1',
     151    ));       
     152    $this->System->FormManager->RegisterFormType('TFile', array(
     153                'Type' => 'Reference',
     154                'Table' => 'File',
     155                'Id' => 'Id',
     156                'Name' => 'Name',
     157                'Filter' => '1',
     158    ));
     159    $this->System->FormManager->RegisterFormType('TFileList', array(
     160        'Type' => 'ManyToOne',
     161        'Table' => 'File',
     162        'Id' => 'Id',
     163        'Ref' => 'Directory',
     164        'Filter' => '1',
     165    ));
     166    $this->System->FormManager->RegisterFormType('TDirectoryList', array(
     167                'Type' => 'ManyToOne',
     168                'Table' => 'FileDirectory',
     169                'Id' => 'Id',
     170                'Ref' => 'Parent',
     171                'Filter' => '1',
     172    ));
    144173  }
    145174
Note: See TracChangeset for help on using the changeset viewer.