Development

Changeset 8257

You must first sign up to be able to contribute.

Changeset 8257

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

restored 3 function-calls for the grid-panel, to hijack on-click events

Files:

Legend:

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

    r8242 r8257  
    3636      }); 
    3737 
     38      gridPanel.on('activate', function(){this.addEvents('openLink')}, gridPanel); 
     39     
     40      gridPanel.on('click', onClickGrid, gridPanel); 
     41       
     42      gridPanel.on('openLink', function(target){App.onOpenLink(target); return false;}, gridPanel); 
     43       
     44      function onClickGrid(e, target){ 
     45        if(target = e.getTarget('a')){ 
     46          // stop propogation (stops loading the clicked link) 
     47          e.stopEvent(); 
     48           
     49          var openLink = this.fireEvent('openLink', target); 
     50           
     51          if (openLink !== false) { 
     52            addTab('Edit: '+target.firstChild.textContent,  { url: target.href, scripts: true, method: 'GET' }, 'edit_'+target.firstChild.textContent ); 
     53          } 
     54        } 
     55      }; 
     56 
    3857      gridPanel.on('afteredit', this.updateDB, gridPanel, true); 
     58