Development

Changeset 1338

You must first sign up to be able to contribute.

Changeset 1338

Show
Ignore:
Timestamp:
05/10/06 21:49:07 (3 years ago)
Author:
fabien
Message:

added position option to stylesheets configured in view.yml

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/data/generator/sfPropelAdmin/default/template/actions/actions.class.php

    r1270 r1338  
    1414  public function preExecute () 
    1515  { 
    16     $this->getResponse()->addStylesheet('<?php echo $this->getParameterValue('css', '/sf/css/sf_admin/main') ?>', 'first'); 
     16    $this->getResponse()->addStylesheet('<?php echo $this->getParameterValue('css', '/sf/css/sf_admin/main') ?>'); 
    1717  } 
    1818 
  • trunk/lib/config/sfViewConfigHandler.class.php

    r1202 r1338  
    259259      foreach ($stylesheets as $css) 
    260260      { 
     261        $position = ''; 
    261262        if (is_array($css)) 
    262263        { 
    263264          $key = key($css); 
    264265          $options = $css[$key]; 
     266          if (isset($options['position'])) 
     267          { 
     268            $position = $options['position']; 
     269            unset($options['position']); 
     270          } 
    265271        } 
    266272        else 
     
    272278        if ($key) 
    273279        { 
    274           $data[] = sprintf("  \$response->addStylesheet('%s', '', %s);", $key, var_export($options, true)); 
     280          $data[] = sprintf("  \$response->addStylesheet('%s', '%s', %s);", $key, $position, var_export($options, true)); 
    275281        } 
    276282      }