jejacks0n/mercury — pull request #215 by swistak (2012-04-23 08:55:40+00:00)
Title: Allow for a lazy evaluated url functions for Dialog inheriting classes 

Currently toolbar buttons are initialized upon interface creation, and functions are evaluated then to get url content.
This is problematic for several reasons
- You cannot implement any form of dynamic url return, once you generate url - that's final.
- You cannot use data from pageEditor.

Basic use case is to generate url for "historyPanel" based on source of irfame.

in layouts/mercury
```javascript
pageEditor = new PageEditor(saveURL, options);
```

In morecury.js onload, or mercury_overrides.js
```javascript
Mercury.config.toolbars.primary.historyPanel[2].panel = function() {
return pageEditor.iframeSrc() + "/versions";
};
```

This will load a /versions for edited iframe, even if address changes during editing, or initial get is redirected.

This change adds dynamic url generation for all classes based on `Mercury.Dialog` it might be usefull to add that behaviour to other Buttons. Please let me know if you'd like me to do that.