Index: branches/unlabeled/unlabeled-1.4.2/core/units/selectors/selectors_config.php =================================================================== diff -u -N -r2326 -r4367 --- branches/unlabeled/unlabeled-1.4.2/core/units/selectors/selectors_config.php (.../selectors_config.php) (revision 2326) +++ branches/unlabeled/unlabeled-1.4.2/core/units/selectors/selectors_config.php (.../selectors_config.php) (revision 4367) @@ -7,6 +7,23 @@ 'EventHandlerClass' => Array('class'=>'SelectorsEventHandler','file'=>'selectors_event_handler.php','build_event'=>'OnBuild'), 'TagProcessorClass' => Array('class'=>'SelectorsTagProcessor','file'=>'selectors_tag_processor.php','build_event'=>'OnBuild'), 'AutoLoad' => true, + + 'Clones' => Array( + 'selectorsbase' => Array( + 'Hooks' => Array(), + 'Constrain' => 'Type = 1', + 'SubItems' => Array('selectorsblock'), + ), + + 'selectorsblock' => Array( + 'Hooks' => Array(), + 'Constrain' => 'Type = 2', + 'ForeignKey' => Array('css' => 'StylesheetId', 'selectorsbase' => 'ParentId'), + 'ParentTableKey' => Array('css' => 'StylesheetId', 'selectorsbase' => 'SelectorId'), + 'ParentPrefix' => 'selectorsbase', + ), + ), + 'Hooks' => Array( Array( 'Mode' => hAFTER, @@ -58,10 +75,6 @@ 'ParentPrefix' => 'css', 'AutoDelete' => true, 'AutoClone' => true, - - 'Constrain' => 'Type = 1', - 'SubItems' => Array('SAME: Type=2'), - 'ForeignKey1' => 'ParentId', 'ListSQLs' => Array( ''=>' SELECT %1$s.* FROM %s', @@ -75,14 +88,14 @@ ), 'Fields' => Array( 'SelectorId' => Array(), - 'StylesheetId' => Array('type' => 'int', 'unique'=>Array('SelectorName'), 'not_null' => '1','default' => '0'), + 'StylesheetId' => Array('type' => 'int', 'unique'=>Array('SelectorName'), 'current_table_only' => 1, 'not_null' => '1','default' => '0'), 'Name' => Array('type' => 'string','not_null' => '1','default' => '','required'=>1), - 'SelectorName' => Array('type' => 'string', 'unique'=>Array('StylesheetId'), 'not_null' => '1','default' => '','required'=>1), + 'SelectorName' => Array('type' => 'string', 'unique'=>Array('StylesheetId'), 'current_table_only' => 1, 'not_null' => '1','default' => '','required'=>1), 'SelectorData' => Array('not_null' => '1','default' => ''), 'Description' => Array('type' => 'string','not_null' => '1','default' => ''), 'Type' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array( 1 => 'la_BaseSelectors', 2 => 'la_BlockSelectors'), 'use_phrases' => 1, 'not_null' => '1','default' => '0'), 'AdvancedCSS' => Array('type' => 'string','not_null' => '1','default' => ''), - 'ParentId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'options'=>Array(0=>''), 'not_null' => '1','default' => '0'), + 'ParentId' => Array('type' => 'int', 'formatter'=>'kOptionsFormatter', 'required' => 1, 'not_null' => '1','default' => '0'), ), 'VirtualFields' => Array(