7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Feature Requests
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
| Go to End | Next > | |
| Author | Topic: | 11127 Views |
-
Re: Feature Requests

22 June 2010 at 2:50am
@timwjohn: HasMany and ManyMany FileDOM has existed for well over a year. I never added them for ImageDOM, because it seemed a little pointless.. ImageDOM is nothing more than an FDOM with a little resizing widget and automatically filtered file types. The latter can be added with one line of code.
@howard -- That functionality exists, and I believe I've checked it in. I used it recently on a project and I just need to find out where.
-
Re: Feature Requests

22 June 2010 at 4:26am Last edited: 22 June 2010 4:29am
@howard : I'm not sure about a primary sort by associated/related records -- this functionality would be nice && UC may detail. Here's my workaround;
$dom = new ManyManyFileDataObjectManager(....);
$relationCount = $this->owner->$relation()->Count();
$dom->setOnlyRelated((bool) $relationCount );Basically I check to see if there are related records during the getCMSFields where I instantiate the DOM, and if so, set it so it defaults to showing only related records.
So in the above, you could change $relation() to Videos() if your many-many relation is named "Videos".
NOTE: I'm doing this in a DataObjectDecorator using updateCMSFields() .. thus you'll probably want to do
$relationCount = $this->Videos()->Count();
in getCMSFields)().
Hope this makes sense.
-
Re: Feature Requests

22 June 2010 at 11:01pm
@UC: Here's the updated patch. Is this more like what you had in mind?
- ORIGINAL CODE - - - - - - - - - - - - - - - -
$.post($target.attr('href'),params,function() {$($target).parents('li:first').fadeOut();$(".ajax-loader").fadeOut("fast");});- PATCHED CODE - - - - - - - - - - - - - - - - -
$div.fadeOut("fast");
request = $.ajax({
cache: false,
url: $target.attr('href'),
data: params,
error: function(xhr){statusMessage(xhr.responseText,'bad');},
success: function(message){
statusMessage(message,'good');
$($target).parents('li:first').fadeOut();
$(".ajax-loader").fadeOut("fast");
}
});
- - - - - - - - - - - - - - - - - - - - - - - -Usage:
class MyClass extends DataObject {
...
function onBeforeDelete()
{
// 2.3 compatibility
$class = class_exists('SS_HTTPResponse') ? 'SS_HTTPResponse' : 'HTTPResponse';
if(<check if object can be deleted>)
{
parent::onBeforeDelete();
// Send success message
$response = new $class("Item successfully deleted");
$response->output();
}
else
{
// Send error message
$response = new $class("Cannot delete this item", 401);
$response->output();
exit; // Stop the object from being deleted
}
}
} -
Re: Feature Requests

8 July 2010 at 5:36am
I'd like to second this request that was made a while back by Shawn Parr...
"It would be great if there could be an ics feed for all the calendar events, along with the individual ics and full rss capabilities. This would be especially awesome in conjunction with the ICS feed feature. "
Is this already setup? If not is it possible?
-
Re: Feature Requests

5 August 2010 at 6:32am
I would love it if SWFUpload and the DataObjectManager would integrate with Amazon S3 cloud servers.
I would pay for this feature to be developed if someone is interested.
John -
Re: Feature Requests

5 August 2010 at 6:55am
SICK! I figured a workaround to allowing it to show progress on upload to S3 in flash (requires a small bit of JS changes) if you are interested.
| 11127 Views | ||
| Go to Top | Next > |




