-
17 Apr 2009 9:36 AM #1Sencha - Community Support Team
- Join Date
- Nov 2008
- Location
- San Diego, Peoples' Republic of California
- Posts
- 2,048
- Vote Rating
- 11
[FIXED][3.0] Ext.ux.TabCloseMenu.js broken
[FIXED][3.0] Ext.ux.TabCloseMenu.js broken
See: /examples/tabs/tabs-adv.html
The example doesn't work
-
17 Apr 2009 9:41 AM #2Sencha - Community Support Team
- Join Date
- Nov 2008
- Location
- San Diego, Peoples' Republic of California
- Posts
- 2,048
- Vote Rating
- 11
Additionally, items member removed from Ext.menu.Menu so none of the container methods work on it anymore.
-
17 Apr 2009 9:53 AM #3Sencha - Community Support Team
- Join Date
- Nov 2008
- Location
- San Diego, Peoples' Republic of California
- Posts
- 2,048
- Vote Rating
- 11
Fix:
Code:// Ext.ux.TabCloseMenu.js for 3.0-rc1 // Very simple plugin for adding a close context menu to tabs Ext.ux.TabCloseMenu = function() { var tabs, menu, ctxItem; this.init = function(tp) { tabs = tp; tabs.on('contextmenu', onContextMenu); } function onContextMenu(tabPanel, tab, e) { var items = []; if (tab.closable) { items.push({ text: 'Close Tab', handler: function() { tabPanel.remove(tab); } }); } var canCloseOthers = false; tabPanel.items.each(function() { if (this != tab && this.closable) { canCloseOthers = true; return false; } return true; }); if (canCloseOthers) { items.push({ text: 'Close Other Tabs', handler: function() { tabPanel.items.each(function() { if (this != tab && this.closable) { tabPanel.remove(this); } }) } }) } var menu = new Ext.menu.Menu({ items: items }); menu.showAt(e.getXY()); } };
-
17 Apr 2009 2:08 PM #4
Fixed in SVN.
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
17 Apr 2009 2:23 PM #5
I don't think you meant to keep that console.log in there!!

-
17 Apr 2009 3:11 PM #6
Cut me some slack, I just landed back in Sydney

Removed the log() statement.Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
-
17 Apr 2009 5:47 PM #7
Hahaha! No problem, not a complaint or anything, just a heads up. Part of me hesitates to mention it, but part of me knows it is easier to spot now than later...
I tend to review changes from SVN; it is a good way to learn things. Take docs, for example. When some are changed I can see how the wording changed to make things clearer, or how to use something new without having to hunt for changes by rereading all the docs again.
Which is also why I hate big changes in SVN. I'll never get through a big changeset, so I'll never learn much about whatever that big new thing is. Wish the designer were in SVN all this time. Could see how it changes over time, learn what the author learns. Or some other big example that gets improved on a continuous basis. Particularly from ExtJS people, as they would use the best practices on a public project like that.
-
18 Apr 2009 10:32 AM #8Sencha - Community Support Team
- Join Date
- Nov 2008
- Location
- San Diego, Peoples' Republic of California
- Posts
- 2,048
- Vote Rating
- 11
Perhaps in Ext.js (the file), you could detect if window.console exists, and if not, create stubs for it so console.* functions won't break?
-
20 Apr 2009 7:07 AM #9
I'm just kidding, we appreciate the reports
Evan Trimboli
Sencha Developer
Twitter - @evantrimboli
Don't be afraid of the source code!
Thank you for reporting this bug. We will make it our priority to review this report.


Reply With Quote