7912 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » drag & drop reordering not working
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: | 2791 Views |
-
drag & drop reordering not working

11 August 2009 at 11:28am
Hi all,
I've been using dataobject manager for a while now with no problem. On one particular site (SS2.3.3 dataobject r206) I have a problem with drag and drop.
On a page with a dataobject manager, I can see the checkbox to allow reordering. But when I click it, I am unable to drag anything around.
However! Drag and drop reordering works fine in the 'Files & Images' section.
I'm adding the manager the way I've done countless times before...
$fields->addFieldToTab("Root.Content.TestObjects", new DataObjectManager(
$this,
'TestObjects',
'TestObject',
array(
'Name' => 'Name',
),
'getCMSFields_forPopup'
));Anyone have any ideas?
Cheers,
Barry.
-
Re: drag & drop reordering not working

11 August 2009 at 3:41pm
Okay - I've narrowed down the problem.
I have an ImageDataObjectManager (ImageDOM) field and a DataObjectManager (DOM) field in seperate tabs on a Page.
If the ImageDOM is added before the DOM then drag & drop wont work on the DOM. The DOM must be added to getCMSFields first.
Can anyone recreate this problem? Is this a bug?
-
Re: drag & drop reordering not working

12 August 2009 at 1:15am
I have heard this bug reported before, but I have never been able to replicate it. I'll do some more testing. I'm sure it's something simple.
-
Re: drag & drop reordering not working

14 August 2009 at 12:13pm
Thanks Uncle Cheese - appreciate the help!
-
Re: drag & drop reordering not working

25 August 2009 at 12:04pm
I'm also having problems adding more than one ImageDOM to a page. I get the error:
Fatal error: Call to a member function Icon() on a non-object in C:\wamp\www\palms\dataobject_manager\code\ImageDataObjectManager.php on line 70
Is is generally a bad idea to be adding more than one ImageDOM to a page?
Thanks,
Barry.
-
Re: drag & drop reordering not working

25 August 2009 at 1:26pm
No, that's an unrelated error. Sounds like you may have deleted the file associated with a record?
-
Re: drag & drop reordering not working

27 August 2009 at 4:54pm
Hmm - well I cleaned out all records and then uploaded some new images but still got the error. It worked fine on normal pages which only have one ImageDOM, but the HomePage had two ImageDoms.
I modified the HomePage to use one ImageDOM and one DOM (with thumbnail) but I would've preferred to use two ImageDOM's.
Phew!... all these Dom-Dom-Dom's sound like ominous background music.
-
Re: drag & drop reordering not working

2 September 2009 at 12:05pm
Hi again uncle,
I'm having more drag & drop woes. I'm using trunk version of DOM.
Now when I go to drag something in a DOM, the page just keeps expanding downwards. There's slightly different, but equally bizarre behaviour in the ImageDOM.
To fix I just uncommented DataObjectManager.php (line 72)
Requirements::javascript('dataobject_manager/javascript/jquery-ui.1.5.3.js');
Must be some kindof incompatibilty in the sortable function between 1.5 and later versions? Sorry - I wouldn't know where to start if I wanted to update your jquery calls to the 1.7 versions. Perhaps you could point me in the right direction?
Cheers,
Barry.
| 2791 Views | ||
| Go to Top | Next > |

