Title: Panel onMove event does not fire. Post by: tslatt on January 24, 2012, 08:19:43 AM See http://www.jeasyui.com/forum/index.php?topic=257.0
Bug: The onMove event for a panel does not fire in easyUI 1.2.5. This was tested for panels that are within the portal layout. An alert was added to the panel onMove event, but the alert is never triggered when a panel is moved around within the portal. Feature Request: It would be helpful if there was an onBeforeMove event for panels for use within the portal layout. It has been found that when moving a panel within a portal, if that panel contains a great amount of data, such as a datagrid or a graph, the panel can lose focus when being dragged -- unless it is collapsed first. Having an onBeforeMove event for panels would allow us to collapse a panel before it's moved. Then, the onMove event, once it's working, could be used to re-expand the panel after it is moved. Title: Re: Panel onMove event does not fire. Post by: stworthy on January 26, 2012, 03:02:06 AM The portal panel cannot trigger 'onMove' event. This bug has been fixed. Please download the portal plugin from http://www.jeasyui.com/extension/portal.php.
It has been found that when moving a panel within a portal, if that panel contains a great amount of data, such as a datagrid or a graph, the panel can lose focus when being dragged -- unless it is collapsed first. To solve this issue, override the moving panel proxy may be helpful: Code: $('div.portal-p').each(function(){ Title: Re: Panel onMove event does not fire. Post by: tslatt on January 26, 2012, 08:09:34 AM I downloaded the updated portal plugin, installed it, and tried again. The onMove function still does not trigger when a panel is moved.
I set up the panel events on each panel while they are in the staging area, before I add them to the portal, because for some unknown reason, doing it after they are in the portal makes them undraggable. All of the other events I've tried seem to be working normally, but even with the updated portal js, onMove still doesn't do anything. Code: //set up panel events for all panels in this tab, *before* adding them to the portal (doing it after breaks dragging in the portal) Title: Re: Panel onMove event does not fire. Post by: stworthy on January 26, 2012, 06:03:56 PM After recreate panel, call 'enableDragging' method for that panel again:
Code: $(this).panel({ Title: Re: Panel onMove event does not fire. Post by: tslatt on January 27, 2012, 08:04:19 AM That worked for getting the onMove to work. Adding that drag enabling bit after setting up the panel events allowed me to do the panel event setup *after* the panels are added to the portal, rather than before. Then, the onMove event would fire.
Thanks!!!! Title: Re: Panel onMove event does not fire. Post by: alex.capurro on May 14, 2012, 08:47:32 AM I would still like to know if its possible to collapse the panel when the user begins to move it. I have tried modifying the example code pasted in this thread but i cant seem to make the panel collapse. Could someone suggest a way please?
Thanks |