18 Dec 2008 6:20 AM #1
Ext.ux.panel.DDTabPanel extends Ext.TabPanel to support drag and drop operations to re-order the tabs.
This extension is the result of the work done in the topic "Draggable Panel in a TabPanel". When I started using the code in that thread, I found that clicking a tab to activate it didn't work any longer, you had to start dragging for it to activate. After some investigation, this was fixed by adding an onMouseDown event to activate the tab. As suggested by mabello, I decided to publish this great piece of work by giving it its own topic and by publishing it on the UX Repository.
This extension is based on the code of thommy and rizjoj and was then fixed, polished and published by myself.
JS File: http://extjs-ux.org/repo/authors/Mat.../DDTabPanel.js
UX Repository: http://extjs-ux.org/docs/index.html?...nel.DDTabPanel
Okay, it's in the repository now. Some small adjustments to the documentation have been done which will be reflected in the repository in approximately an hour (the interval between two repository updates).
This thread is open for suggestions, questions, bug reports and appreciations!
- None, yay!
- The tab panel can't be made stateful.
It'd be very hard to do this as the default tab panel itself doesn't seem to support this either. Seen from a developer's point, it would be very hard too as some tabs are loaded dynamically through AJAX requests and such, how would one save those in a cookie?
- Allow tabs to be dropped on another tab panel by joining the drag and drop sources and targets.
- 1.0.7 (Jan 16, 2009)
- Implemented some more code optimizations from mystix.
- 1.0.6 (Jan 10, 2009)
- Implemented mystix's suggestions.
- 1.0.5 (Dec 31, 2008)
- Tabs with an iconCls now have a left padding on the ghost text.
- 1.0.4 (Dec 19, 2008)
- Fixed bug with west region and code is much cleaner now.
- 1.0.3 (Dec 19, 2008)
- Fixed activeTab configuration not working.
- Added configuration option and method for tabs to enable/disable drag and drop on a per-tab basis.
- 1.0.2 (Dec 18, 2008)
- Fixed conflict between multiple DDTabPanels.
- 1.0.1 (Dec 18, 2008)
- Initial release.
Last edited by Matti; 16 Jan 2009 at 9:43 AM. Reason: Updated to version 1.0.7
18 Dec 2008 6:49 AM #2
18 Dec 2008 7:53 AM #3
Thanks for share,
18 Dec 2008 8:04 AM #4
18 Dec 2008 9:27 AM #5
18 Dec 2008 9:45 AM #6
18 Dec 2008 2:19 PM #7
22 Dec 2008 3:18 AM #8
Thank you very much for this extension!
There is, unfortunately, a problem with tabs dragging when 'west' region is set. Something is wrong with calculating X offset where to put a dragged tab. Please try adding this to the first window items in the demo file and try it yourself:
I would be very grateful if you could fix these issues.
22 Dec 2008 4:08 AM #9
Doesn't seem to work in IE. This is a great extension though.
22 Dec 2008 2:29 PM #10
I noticed that the demo page only worked if I enabled debugging in Firebug. I was convinced the page wasn't working until I started to write this comment and went back to look for an error.
That being said, I'm excited by this extension and I'm going to try it out.Arthur Kay
Senior Software Engineer, Sencha Inc.
Twitter | Sencha Chicago User Group
Thread Participants: 26
- galdaka (2 Posts)
- vtswingkid (3 Posts)
- mystix (4 Posts)
- dawesi (1 Post)
- ifnot (1 Post)
- marcing (1 Post)
- tobiu (12 Posts)
- adam.jimenez (7 Posts)
- wm003 (2 Posts)
- miti (1 Post)
- mabello (1 Post)
- JamesC (1 Post)
- mholyszko (4 Posts)
- moegal (1 Post)
- Remy (1 Post)
- gthe (1 Post)
- ttbgwt (1 Post)
- Scorpie (1 Post)
- simplessus (1 Post)
- arthurakay (5 Posts)
- Mjollnir26 (3 Posts)
- Xander75 (2 Posts)
- mschwartz (6 Posts)
- mjmonserrat (1 Post)
- adbox (2 Posts)
- george.neculai (1 Post)