modxcms/revolution — pull request #453 by danyaPostfactum (2013-02-25 20:17:18+00:00)
Title: Replace most window.location changes by MODx.loadPage calls

I replaced almost all direct location changes by MODx.loadPage proxy to allow to handle page loading.
There are still issues with remote toolbars and tree node clicks.

Currently tree click handler is defined in https://github.com/modxcms/revolution/blob/release-2.2/manager/assets/modext/widgets/core/modx.tree.js#L411 and it uses `page` attribute of node. We need the way to url params instead of url itself. Maybe to store params into another attribute in JSON format ? Or override click handler in each Tree class ancestor?

The another issue is remote toolbar. Currently, toolbar button click handler is defined such way:
https://github.com/modxcms/revolution/blob/release-2.2/core/model/modx/processors/resource/gettoolbar.class.php#L37

I propose to use this:
```php
'handler' => '(function(){ MODx.loadPage(MODx.action["resource/create"]) })'
```

Anyway eval is evil. Do we really need "remote toolbar" feature?