7921 Posts in 1359 Topics by 933 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » Preview: DataObjectManager module
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: | 54683 Views |
-
Re: Preview: DataObjectManager module

20 February 2009 at 11:03pm
Thanks UncleCheese, checked out the latest and with your tip, that worked perfectly. I only have one small issue now,
I added
SortableDataObject::add_sortable_class('Resource');
to the _config.php file and I can see the Allow Drag & Drop reordering tick box but any reordering that I do is not reflected when viewing the page and if I edit another page in the CMS and come back, the original order is back.
Thanks again
-
Re: Preview: DataObjectManager module

21 February 2009 at 4:34am
Did you run a /db/build after adding the sortable class? it needs to add a SortOrder column to the object. My guess is after you sort, the AJAX request is failing because it can't find that column.
And needless to say, when you display on the frontend, don't have an order clause in your query. It will order by SortOrder by default.
-
Re: Preview: DataObjectManager module

21 February 2009 at 12:05pm
After retracing my steps, it hit me. I added the sortable class after adding the resources to the database. Totally makes sense why it wont sort now.
Thanks for your patience.
-
Re: Preview: DataObjectManager module

22 February 2009 at 6:31am
I have a subdirectory in my localhost, something like http://localhost/silverstripe_2_3_0/.
In silverstripe 2.3.0 rc3 some files aren't found. So i had do delete the leading slashes of directories. The director is forced to take the whole path do build an absolute url.
These files are affected:
facebox.js (Line82): loadingImage : 'dataobject_manager/images/loading.gif',
facebox.js (Line83): closeImage : 'dataobject_manager/images/closelabel.gif',
dataobject_manager.js (Line70): $j.post('DataObjectManager_Controller/dosort/' + do_class, $list.sortable("serialize"));swfupload/_config.php (Line35): 'flash_url' => Director::absoluteURL('swfupload/javascript/swfupload.swf'),
swfupload/_config.php (Line45): 'button_image_url' => Director::absoluteURL('swfupload/images/XPButtonNoText_160x22.png'),In css-Files replace /dataobject_manager/images with ../images
I have another problem with sorting the data. I have a page with two dataobject_manager objects. Each of them has a sortable property.
Sorting the data works now in the first tab on list & grid-view, on the second tab, i can only sort the data in grid view, not in list view. I can change the order of the tabs and i have the same effect with the second tab.
Do you have any suggestion? -
Re: Preview: DataObjectManager module

22 February 2009 at 6:58am
Thanks for uncovering this bug. I'll first confirm it and then issue a fix. At that point, revert your changes and checkout the latest version. I'll make a post when I have it figured out. Thanks.
-
Re: Preview: DataObjectManager module

22 February 2009 at 7:23am
Okay, I've confirmed it. This is very bizarre. For some reason, only that checkbox has the strange behavior of binding to the first DOM on the page. All the other event handlers are aware of their unique containers. So strange.
-
Re: Preview: DataObjectManager module

22 February 2009 at 7:55am
Hey, really great work you did there. It fixed a ton of my problems in a second, thanks a lot!
I just thought I'd mention that the styling of the module fails if your silverstripe folder is not the document root of the webserver, due to the absolute paths in your css files. Also, it seems like the path on line 82 of facebox.js is incorrect.
-
Re: Preview: DataObjectManager module

22 February 2009 at 8:01am
Yup. You'll see someone mentioned that a few posts ago. I'll be checking in a new version with the correct pathing soon.
| 54683 Views | ||
| Go to Top | Next > |


