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.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

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

Minor issues w/ DOM Sorting, Saving, & Results per Page


Reply


2 Posts   1115 Views

Avatar
socks

Community Member, 190 Posts

25 September 2009 at 5:06pm

I'm just now getting to play around with the DataObjectManager module. Thank you Uncle Cheese for all your hard work.

In the Admin:

Initial Sorting
When I add new objects and hit Save, the list / table shows the most recent entries on top (which is good). But if I go to another page in Site Tree and come back to edit, the newest entries are no longer on top. If I select a different Results Per Page from the dropdown, the table re-sorts and puts the newest on top. Anyway to make it stay that way when I initially go to that page to view or add more objects?

Saving
It doesn't seem necessary to Save or Save & Publish the page if I just Add more objects since the objects are being saved via the button in the pop-up window. But I get the "Are you sure you want to navigate away from this page without saving" warning if I don't Save or Save & Publish the page. Is this a bug?

Show - Results Per Page
Is there any way to make the admin remember whatever I selected last (ie show 30 results per page). I have to change it every time I come back to the page. Or could I set the default somehow in the code.

thanks

Avatar
UncleCheese

Forum Moderator, 4096 Posts

26 September 2009 at 3:31am

Edited: 26/09/2009 3:31am

Wow. Great catches. Thanks for this.

I have fixed the bug that was causing DOM to only order by Created DESC only on DOM reloads. Should order by Created DESC all the time now by default, that is, unless you override $SourceSort in the constructor.

I have also added a few more handy functions

      $myDOM->setPerPageMap(array(
       '100','200','300'
      ));
      $myDOL->setUseViewAll(false);

If you have a large number of records, you may want values other than 10,20,30,40,50. You can now use setPerPageMap() to customize. As always, you can use setPageSize() to set a default value. Also, the setUseViewAll(() boolean will add or remove the "All" value of the per-page dropdown.

The alert message that happens when navigating away from a DOM page has existed for a while. I wish to god I could figure it out. I'm looking for answers!