Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

New Features


Go to End


36 Posts   25296 Views

Avatar
africansafari

Community Member, 30 Posts

23 January 2010 at 1:46pm

Thanks for the reply.

Not being a programmer - I have no idea :-(

My problem as has to do with this http://www.silverstripe.org/general-questions/show/269138?start=8#post269671 - I believe other people are experiencing the same problem?

So ..... I wondered if the new features you have added fixed this bug?

Cheers

Claire

Avatar
UncleCheese

Forum Moderator, 4102 Posts

23 January 2010 at 2:48pm

I'm sorry, I can't see any reason why this post is in the DataObjectManager forum. I may have missed something in that thread, but it looks like the issues you're reporting are with the UserForms module. I'm not seeing the connection to DOM at all. Is there something I'm missing?

Avatar
wmk

Community Member, 87 Posts

25 January 2010 at 8:30pm

Hi Uncle Cheese,

do the new many_many features work in 2.3.5? Anyone here did tests with the latest release?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

26 January 2010 at 3:09am

I don't think the changeset made it into 2.3.5, but definitely 2.4, they told me. Ticket is here: http://open.silverstripe.org/ticket/4929

Avatar
UncleCheese

Forum Moderator, 4102 Posts

26 January 2010 at 3:09am

Also, keep in mind, it's just the many_many sorting that fails in 2.3.4+. All the other stuff mentioned should work fine.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

2 February 2010 at 11:55am

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!

Avatar
bummzack

Community Member, 904 Posts

2 February 2010 at 7:45pm

Hi UncleCheese

Thanks for these improvements! The confirmed deletes are very handy.
Just tried it and it's great. However, I was only able to set it on a global level using

DataObjectManager::set_confirm_delete(false);

Setting it on a DOM instance produced an error, apparently the setConfirmDelete function is missing (maybe you didn't commit it to svn?)
Cheers

Avatar
UncleCheese

Forum Moderator, 4102 Posts

3 February 2010 at 5:13am

Thanks for your testing. I did this at the eleventh hour last night, and I think I was a little commit-happy. The setConfirmDelete() method has been added.