Development

Changeset 8898

You must first sign up to be able to contribute.

Changeset 8898

Show
Ignore:
Timestamp:
05/10/08 16:09:30 (6 days ago)
Author:
Leon.van.der.Ree
Message:

improved toolbar buttons, implemented xtypes

Files:

Legend:

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

    r8897 r8898  
    3535 
    3636<?php foreach ((array) $listActions as $actionName => $params): ?> 
    37   <?php echo $this->addCredentialCondition("\$config['attributes']['items'][] = \$sfExtjs2Plugin->".$this->getAjaxButtonToToolbarAction2($actionName, $params, false).";\n\n", $params) ?> 
     37  <?php echo $this->addCredentialCondition("\$config['attributes']['items'][] = \$sfExtjs2Plugin->asAnonymousClass(array(".$this->getAjaxButtonToToolbarAction2($actionName, $params, false)."));\n\n", $params) ?> 
    3838<?php endforeach ?>  
    3939   
  • plugins/sfExtjsThemePlugin/lib/sfExtjsPropelAdminGenerator.php

    r8897 r8898  
    234234        case 'spacer': 
    235235        case 'fill': 
    236           return ucfirst($actionName)."(array())"; 
     236          return "'xtype'      => 'tb".$actionName."'"; 
    237237          break; 
    238238        case 'delete': 
     
    350350    //      id: 'btn_".$actionName."', 
    351351    $jsOptions = " 
     352                  'xtype'      => 'tbbutton', //TODO add option for MenuButtons and possibly others 
    352353                  'text'       => '".$name."', 
    353354                  'action'     => '".$action."', 
     
    358359                 "; 
    359360 
    360     //toolbar is defined in the list 
    361     $html = "Button(array(".$jsOptions."));"; //TODO add option for MenuButtons and possibly others... 
    362  
    363     return $html; 
     361    return $jsOptions; 
    364362  } 
    365363