Development

Changeset 8992

You must first sign up to be able to contribute.

Changeset 8992

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

update editpanel-title after load/saving

Files:

Legend:

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

    r8803 r8992  
    300300    foreach ($this->getPrimaryKey() as $pk) 
    301301    { 
    302       $params[]  = $this->getColumnGetter($pk, true, 'this->'); 
     302      $params['id']  = $this->getColumnGetter($pk, true, 'this->'); 
    303303    } 
    304304?>     
    305     return $this->renderText('{ success: true, message: "Your modifications have been saved", id: "'.<?php echo $params[0] ?>.'" }'); 
     305    $this->id = <?php echo $params['id'] ?>; 
     306         
     307    $this->setTemplate('jsonSave'); 
    306308  } 
    307309 
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/_edit_ajax_form.php

    r8990 r8992  
    5454  var old_key = this.ownerCt.key; 
    5555  this.ownerCt.key = action.result.id; //(re)set the key (needed to track new items) 
     56  this.ownerCt.setTitle(action.result.title);  
    5657 
    5758  //fire saved event 
     
    118119  'url'                 => '<?php echo $controller->genUrl($this->getModuleName().'/ajaxEdit') ?>', 
    119120  'method'              => 'post',  
    120   'title'               => <?php echo $this->getI18NString($edit_key.'.title', 'Edit '.$this->getModuleName(), false) ?>, 
    121121 
    122122<?php if (($width = $this->getParameterValue('edit.width', 400)) != 'fill'): ?> 
     
    156156  //call parent 
    157157  Ext.app.sx.<?php echo $formName ?>.superclass.initComponent.apply(this, arguments); 
    158  
     158   
    159159//  this.addEvents( 
    160160//  ); 
  • plugins/sfExtjsThemePlugin/data/generator/sfPropelAdmin/extjs/template/templates/editAjaxJsSuccess.pjs

    r8990 r8992  
    115115    'waitMsg' => 'Loading data', 
    116116    'success' => $sfExtjs2Plugin->asVar('this.onLoadSuccess'), 
     117    'scope'   => $sfExtjs2Plugin->asVar('this'), 
    117118  ))."; 
    118119   
     
    131132 
    132133$sfExtjs2_<?php echo $moduleName ?>_onLoadSuccess = " 
    133 //  this.setTitle(action.reader.jsonData.title); 
     134  this.setTitle(action.reader.jsonData.title); 
    134135"; 
    135136 
     
    152153          Ext.Msg.alert('Delete Status',message); 
    153154           
    154           //fire saved event 
     155          //fire deleted event 
    155156          this.fireEvent('deleted', this); 
    156157        },