Some Minor Updates...
Confirmed Deletes
Yes, they're finally here. What was stalling me on this were two main pain points:
1) Handling translation in javascript events is a major pain
2) I can't stand alert boxes
Fortunately, I came up with innovative solutions for both issues. There is now an i18n_js handler on the DOM controller that will serve up all the translations for Javascript messages on the first load of your DOM. Very handy for future additions to DOM. Right now, there's just one translation, of course -- "Delete this record?"
The second solution is a little less innovative, but I wrote a little Javascript widget that pops out over the DOM actions to confirm your delete. It will get overwritten when I refactor the module, but for now, it does the job, and it's cross-browser tested.
Confirmed deletes are enabled by default, but to globally disable them:
DataObjectManager::set_confirm_delete(false);
To disable them on your DOM instance:
$myDOM->setConfirmDelete(false);
Improved Handling of DOM Actions
Special thanks to Andrew Houle on this one, for pointing out that custom actions receive VIP treatment as compared to the "core" actions of the DOM (edit, delete, etc). Now everything gets passed through the DataObjectManagerAction object. The benefit being that you can now reorder them as needed in your setPermissions() method. The advantage here is that you can customise which action is first, thereby receiving the "click the row" treatment.
Bug Fix: RelationDataObjectManager.ss missing a closing div
Thank you, Banal!
Bug Fix: IE7 can't click the save button
In the battle of good vs. evil, Unclecheese has prevailed.
Custom popup widths
We're going to deprecate setWideMode() in favor of setPopupWidth((int) $pixels). Nested DOMs will still receive the 850 width, and normal doms will still receive 500 by default, but the API is now left open for you to customize as needed.
// Set all DOMs to use a 900 width:
DataObjectManager::set_popup_width(900);
// Set one DOM to use a width of 300
$myDOM->setPopupWidth(300);
Rock on!