Development

Changeset 8300

You must first sign up to be able to contribute.

Changeset 8300

Show
Ignore:
Timestamp:
04/04/08 19:17:10 (8 months ago)
Author:
Leon.van.der.Ree
Message:

added config option to set edit form-width

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/__edit_form_ajax_inner.php

    r8278 r8300  
    2929  $hides = $this->getParameterValue($edit_key.'.hide', array()); 
    3030   
     31  $width = $this->getParameterValue('edit.width', 400); 
     32   
    3133  $groupedColumns = $this->getColumnsGrouped($edit_key.'.display', true); 
    3234  $pkn = $groupedColumns['pk']->getName(); 
    33 //  $pkn = $this->getPrimaryKeyAdminColumn()->getName(); 
    3435     
    3536  if (!isset($pageName)) 
     
    8889            layoutConfig: { 
    8990            }, 
    90              
    91             width: 400, 
     91 
     92<?php if ($width != 'fill'): ?>             
     93            width: <?php echo $width ?>, 
     94<?php endif; ?> 
     95             
    9296//            defaults: {width: 230}, 
    9397            reader: ds_<?php echo $edit_name ?>.reader, 
     
    172176  $relatedTableFKs = substr($column->key, 0, $last); 
    173177  $fieldName = str_replace('/', $tableDelimiter, $column->key); 
     178   
     179  $width = 175; 
     180  $params = $this->getParameterValue('list.fields.'.$column->key.'.params'); 
     181  $params = is_array($params) ? $params : sfToolkit::stringToArray($params); 
     182  if (isset($params['width'])) $width = $params['width']; 
     183   
    174184  $options = array('name' => strtolower($tableName).'['.$fieldName.']', 
    175                    'width' => 175); 
     185                   'width' => $width); 
     186  if (isset($params['height'])) $options['height'] = $params['height'];   
    176187  $columnDef = $this->getColumnAjaxDefinition($column, $options, 'edit', $groupedColumns); 
    177188  $cls=''; if (isset($columnDef['options']['allowBlank']) && ($columnDef['options']['allowBlank']===false)) $cls = ' class="required"'; 
    178189   
    179  
    180190  $comma = ', '; 
    181191  if ($first)