グループを保持するように
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@1847 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
8c3f6d7135
commit
a6792472d2
@ -1782,19 +1782,36 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
var self = this;
|
var self = this;
|
||||||
|
|
||||||
var draggedTabs = [aDraggedTab];
|
var draggedTabs = [aDraggedTab];
|
||||||
|
var draggedRoots = [aDraggedTab];
|
||||||
|
|
||||||
if ('MultipleTabService' in window &&
|
if ('MultipleTabService' in window &&
|
||||||
MultipleTabService.isSelected(aDraggedTab) &&
|
MultipleTabService.isSelected(aDraggedTab) &&
|
||||||
MultipleTabService.allowMoveMultipleTabs)
|
MultipleTabService.allowMoveMultipleTabs) {
|
||||||
draggedTabs = MultipleTabService.getSelectedTabs(b);
|
draggedTabs = MultipleTabService.getSelectedTabs(b);
|
||||||
|
if (!(aInfo.action & this.kACTION_DUPLICATE)) {
|
||||||
|
draggedRoots = [];
|
||||||
|
draggedTabs.forEach(function(aTab) {
|
||||||
|
var parent = aTab,
|
||||||
|
current;
|
||||||
|
do {
|
||||||
|
current = parent;
|
||||||
|
parent = self.getParentTab(parent)
|
||||||
|
if (parent && MultipleTabService.isSelected(parent)) continue;
|
||||||
|
draggedRoots.push(current);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
while (parent);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (aDraggedTab && aInfo.action & this.kACTION_PART) {
|
if (aDraggedTab && aInfo.action & this.kACTION_PART) {
|
||||||
if (!(aInfo.action & this.kACTION_DUPLICATE))
|
if (!(aInfo.action & this.kACTION_DUPLICATE))
|
||||||
this.partTabsOnDrop(draggedTabs);
|
this.partTabsOnDrop(draggedRoots);
|
||||||
}
|
}
|
||||||
else if (aInfo.action & this.kACTION_ATTACH) {
|
else if (aInfo.action & this.kACTION_ATTACH) {
|
||||||
if (!(aInfo.action & this.kACTION_DUPLICATE))
|
if (!(aInfo.action & this.kACTION_DUPLICATE))
|
||||||
this.attachTabsOnDrop(draggedTabs, aInfo.parent);
|
this.attachTabsOnDrop(draggedRoots, aInfo.parent);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user