Development

Changeset 9014

You must first sign up to be able to contribute.

Changeset 9014

Show
Ignore:
Timestamp:
05/16/08 15:20:39 (2 months ago)
Author:
Leon.van.der.Ree
Message:

fixed typo in config (module_returns_layout),
removed javascript config-variables (since they probably will never be used anyway, didn't make use of the namespace and introduced scope problems)
changes made to scope of actions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • plugins/sfExtjsThemePlugin/config/app.yml

    r8948 r9014  
    1111    list_tabbed:              true 
    1212    list_editable:            false 
    13      
    14     module_returs_layout:     true                      # set to true to let the module return a layout (so you don't have to setup a layout.php) or let the module only return a js-var: App.RequestedModulePanel 
     13 
     14    module_returns_layout:    true                      # set to true to let the module return a layout (so you don't have to setup a layout.php) or let the module only return a js-var: App.RequestedModulePanel 
    1515    module_panel_name:        App.RequestedModulePanel  # the name of the var to the panel name returned by the module-action 
    1616     
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_form.php

    r8992 r9014  
    143143?] 
    144144 
    145 var <?php echo $formName ?>Config = [?php echo $sfExtjs2Plugin->asAnonymousClass($form_config) ?]; 
    146  
    147145[?php 
    148146// constructor 
    149147$sfExtjs2_<?php echo $formName ?>_constructor = " 
    150148  // combine <?php echo $formName ?>Config with arguments 
    151   Ext.app.sx.<?php echo $formName ?>.superclass.constructor.call(this, Ext.apply(<?php echo $formName ?>Config, c)); 
     149  Ext.app.sx.<?php echo $formName ?>.superclass.constructor.call(this, Ext.apply(".$sfExtjs2Plugin->asAnonymousClass($form_config).", c)); 
    152150"; 
    153151 
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_header.php

    r8990 r9014  
    1313?] 
    1414 
    15 var <?php echo $panelName ?>Config = [?php echo $sfExtjs2Plugin->asAnonymousClass($panel_config) ?]; 
    16  
    1715[?php  
    1816// initComponent 
    1917$sfExtjs2_<?php echo $panelName ?>_initComponent = " 
    20   Ext.apply(this, this.initialConfig, <?php echo $panelName ?>Config); 
     18  Ext.apply(this, this.initialConfig, ".$sfExtjs2Plugin->asAnonymousClass($panel_config)."); 
    2119  //call parent 
    2220  Ext.app.sx.<?php echo $panelName ?>.superclass.initComponent.apply(this, arguments); 
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_west.php

    r8990 r9014  
    1313?] 
    1414 
    15 var <?php echo $panelName ?>Config = [?php echo $sfExtjs2Plugin->asAnonymousClass($panel_config) ?]; 
    16  
    1715[?php  
    1816// initComponent 
    1917$sfExtjs2_<?php echo $panelName ?>_initComponent = " 
    20   Ext.apply(this, this.initialConfig, <?php echo $panelName ?>Config); 
     18  Ext.apply(this, this.initialConfig, ".$sfExtjs2Plugin->asAnonymousClass($panel_config)."); 
    2119  //call parent 
    2220  Ext.app.sx.<?php echo $panelName ?>.superclass.initComponent.apply(this, arguments); 
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_paging_js.php

    r8910 r9014  
    2222  //setup the configuration 
    2323  $config = array( 
    24     'name' => '<?php echo $toolbarName ?>Config', 
    25     'attributes' => array( 
    26       'pageSize' => <?php echo $limit ?>, 
    27       'displayInfo' => true, 
    28       'displayMsg' => 'Displaying <?php echo $this->getModuleName() ?>s {0} - {1} of {2}', 
    29       'emptyMsg' => 'No <?php echo $this->getModuleName() ?> to display'     
    30     )    
     24    'pageSize' => <?php echo $limit ?>, 
     25    'displayInfo' => true, 
     26    'displayMsg' => 'Displaying <?php echo $this->getModuleName() ?>s {0} - {1} of {2}', 
     27    'emptyMsg' => 'No <?php echo $this->getModuleName() ?> to display'     
    3128  ); 
    32   echo $sfExtjs2Plugin->asAnonymousClass($config); 
    3329 
    3430  // constructor 
    3531  $sfExtjs2_<?php echo $toolbarName ?>_constructor = " 
    3632    // combine <?php echo $toolbarName ?>Config with arguments 
    37     Ext.app.sx.<?php echo $toolbarName ?>.superclass.constructor.call(this, Ext.apply(<?php echo $toolbarName ?>Config, c)); 
     33    Ext.app.sx.<?php echo $toolbarName ?>.superclass.constructor.call(this, Ext.apply(".$sfExtjs2Plugin->asAnonymousClass($config).", c)); 
    3834  "; 
    3935   
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_list_ajax_toolbar_top_js.php

    r8910 r9014  
    3737  // constructor 
    3838  $sfExtjs2_<?php echo $toolbarName ?>_constructor = " 
    39     <?php echo $toolbarName ?>Config = ".$sfExtjs2Plugin->asAnonymousClass($config_items)."; 
    40      
    4139    // combine <?php echo $toolbarName ?>Config with arguments 
    42     Ext.app.sx.<?php echo $toolbarName ?>.superclass.constructor.call(this, Ext.apply(<?php echo $toolbarName ?>Config, c)); 
     40    Ext.app.sx.<?php echo $toolbarName ?>.superclass.constructor.call(this, Ext.apply(".$sfExtjs2Plugin->asAnonymousClass($config_items).", c)); 
    4341  "; 
    4442   
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxJsSuccess.pjs

    r8992 r9014  
    6464[?php $sfExtjs2Plugin = new sfExtjs2Plugin(); ?] 
    6565 
    66 var <?php echo $panelName ?>Config = [?php echo $config ?]; 
    67  
    6866[?php 
    6967 
    7068// initComponent 
    7169$sfExtjs2_<?php echo $panelName ?>_initComponent = " 
    72   Ext.apply(this, this.initialConfig, <?php echo $panelName ?>Config); 
     70  Ext.apply(this, this.initialConfig, ".$config."); 
    7371  //call parent 
    7472  Ext.app.sx.<?php echo $panelName ?>.superclass.initComponent.apply(this, arguments); 
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxSuccess.php

    r8990 r9014  
    6767    editPanel.on('close_request', function(ep) {alert('Close Request: ' + ep.key + ', message from event-handler')} ); 
    6868     
    69 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_returs_layout', true)):  ?>     
     69<?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_returns_layout', true)):  ?>     
    7070    var viewport = <?php echo $sfExtjs2Plugin->Viewport(array(  
    7171      'layout'  => 'fit', 
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxGridPanelJsSuccess.pjs

    r8948 r9014  
    4141 
    4242  $config_array = array( 
    43     'name' => '<?php echo $panelName ?>Config', 
    44     'attributes' => array( 
    45       'ds'                  => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $storeName ?>()'), 
    46       'cm'                  => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $cmName ?>()'), 
    47       'view'                => $sfExtjs2Plugin->asVar($sfExtjs2_gridpanel_view), 
    48        
    49       'autoHeight'          => true, 
    50       'autoScroll'          => true,  //TODO: need some work 
    51        
    52       'autoLoadStore'       => true, 
     43    'ds'                  => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $storeName ?>()'), 
     44    'cm'                  => $sfExtjs2Plugin->asVar('new Ext.app.sx.<?php echo $cmName ?>()'), 
     45    'view'                => $sfExtjs2Plugin->asVar($sfExtjs2_gridpanel_view), 
    5346     
    54       'selModel'            => $sfExtjs2Plugin->RowSelectionModel(array( 
    55                                 'singleSelect' => <?php echo $this->getParameterValue('list.single_select', true) ?>  
    56                                )), 
    57       'enableColLock'       => false, 
    58       'clicksToEdit'        => 1, 
    59       'trackMouseOver'      => true, 
    60                                 
    61       'loadMask'            => false, 
    62     ) 
     47    'autoHeight'          => true, 
     48    'autoScroll'          => true,  //TODO: need some work 
     49     
     50    'autoLoadStore'       => true, 
     51   
     52    'selModel'            => $sfExtjs2Plugin->RowSelectionModel(array( 
     53                              'singleSelect' => <?php echo $this->getParameterValue('list.single_select', true) ?>  
     54                             )), 
     55    'enableColLock'       => false, 
     56    'clicksToEdit'        => 1, 
     57    'trackMouseOver'      => true, 
     58                              
     59    'loadMask'            => false, 
    6360  ); 
    6461 
     
    7370  <?php endif; ?> 
    7471 
    75 ?] 
    76 [?php echo $sfExtjs2Plugin->asAnonymousClass($config_array); ?] 
    77 [?php 
    7872 
    7973// constructor 
    8074$sfExtjs2_<?php echo $panelName ?>_constructor = " 
    8175  // combine <?php echo $panelName ?>Config with arguments 
    82   Ext.app.sx.<?php echo $panelName ?>.superclass.constructor.call(this, Ext.apply(<?php echo $panelName ?>Config, c)); 
     76  Ext.app.sx.<?php echo $panelName ?>.superclass.constructor.call(this, Ext.apply(".$sfExtjs2Plugin->asAnonymousClass($config_array).", c)); 
    8377"; 
    8478 
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/listAjaxSuccess.php

    r8911 r9014  
    5656//    list<?php echo $moduleName ?>GridPanel.on('actions', function() {alert('action: ')} ); 
    5757 
    58 <?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_returs_layout', true)):  ?>     
     58<?php if (sfConfig::get('app_sf_extjs_theme_plugin_module_returns_layout', true)):  ?>     
    5959    var viewport = [?php echo $sfExtjs2Plugin->Viewport(array(  
    6060      'layout'  => 'fit', 
  • plugins/sfExtjsThemePlugin/lib/sfExtjsPropelAdminGenerator.php

    r8910 r9014  
    394394      { 
    395395        case 'cancel': 
    396           $default_handler_function = "function() { this.ownerCt.ownerCt.fireEvent('close_request', this.ownerCt.ownerCt); }"; 
     396          $default_handler_function = "function() { this.ownerCt.fireEvent('close_request', this.ownerCt.ownerCt); }"; 
    397397          break; 
    398398           
    399399        case 'reload': 
    400           $default_handler_function = "function() { this.ownerCt.ownerCt.loadItem(); }"; 
     400          $default_handler_function = "function() { this.ownerCt.loadItem(); }"; 
    401401          break; 
    402402           
    403403        case 'save': 
    404404          $type = 'submit'; 
    405           $default_handler_function = "function() { this.ownerCt.doSubmit() }"; 
     405          $default_handler_function = "function() { this.doSubmit() }"; 
    406406          break; 
    407407 
    408408        case 'delete': 
    409           $default_handler_function = "function() { this.ownerCt.ownerCt.deleteItem(); }"; 
     409          $default_handler_function = "function() { this.ownerCt.deleteItem(); }"; 
    410410          break; 
    411411 
     
    468468      cls: 'x-btn-text-icon ".$actionClass."', 
    469469//      disabled: false, 
    470 //      scope: this, 
     470      scope: this, 
    471471//      formBind: true, 
    472472      handler : ".$handler_function."