| | 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 | |
|---|