Index: trunk/kernel/units/selectors/selectors_item.php =================================================================== diff -u -N --- trunk/kernel/units/selectors/selectors_item.php (revision 1566) +++ trunk/kernel/units/selectors/selectors_item.php (revision 0) @@ -1,55 +0,0 @@ -'); - - class SelectorsItem extends kDBItem - { - /** - * Returns compiled selector for inserting into css file - * - * @return string - */ - function CompileStyle($separator = STYLE_FILE) - { - $ret = $this->GetDBField('SelectorName')." {\n"; - $ret .= $this->CompileStyleBody($separator); - $ret .= $separator."}\n"; - return $ret; - } - - function CompileStyleBody($separator) - { - $ret = ''; - $selector_data = $this->GetDBField('SelectorData'); - if($selector_data) - { - foreach($selector_data as $property_name => $property_value) - { - if ($property_value == '') continue; - $ret .= "\t$property_name: $property_value;".$separator; - } - } - - $advanced_css = $this->GetDBField('AdvancedCSS'); - if($separator != "\n") $advanced_css = str_replace("\n",$separator,$advanced_css); - $ret .= $advanced_css; - - return $ret; - } - - /** - * Resets all block style attributes to it's base style - * - */ - function ResetStyle() - { - if( $this->GetDBField('ParentId') ) - { - $this->SetDBField( 'SelectorData', Array() ); - $this->Update(); - } - } - } -?> \ No newline at end of file