diff --git a/chrome/chromeFiles/content/scholar/collectionTreeView.js b/chrome/chromeFiles/content/scholar/collectionTreeView.js index 4a46f0d99e..2c33bfecfc 100644 --- a/chrome/chromeFiles/content/scholar/collectionTreeView.js +++ b/chrome/chromeFiles/content/scholar/collectionTreeView.js @@ -248,11 +248,8 @@ Scholar.CollectionTreeView.prototype._refreshHashMap = function() Scholar.CollectionTreeView.prototype.canDrop = function(row, orient) { - if(orient == 0 && this._getItemAtRow(row).isCollection()) - { - Scholar.debug("drag on row: " + row + " orient: " + orient); + if((row == 0 && orient == 1) || orient == 0) return true; - } else return false; } @@ -269,7 +266,7 @@ Scholar.CollectionTreeView.prototype.drop = function(row, orient) var oldCount = this.rowCount; var targetCollectionID; - if(this.canDrop(row,orient)) + if(this._getItemAtRow(row).isCollection()) targetCollectionID = this._getItemAtRow(row).ref.getID(); var droppedCollection = Scholar.Collections.get(ids[0]); @@ -300,7 +297,6 @@ Scholar.CollectionTreeView.prototype.getSupportedFlavours = function () return flavors; } -Scholar.CollectionTreeView.prototype.onDragOver = function (evt,dropdata,session) { } Scholar.CollectionTreeView.prototype.onDrop = function (evt,dropdata,session) { } // diff --git a/chrome/chromeFiles/content/scholar/itemTreeView.js b/chrome/chromeFiles/content/scholar/itemTreeView.js index 61d639b601..983a8ea23f 100644 --- a/chrome/chromeFiles/content/scholar/itemTreeView.js +++ b/chrome/chromeFiles/content/scholar/itemTreeView.js @@ -253,9 +253,6 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) if(madeChanges) { - if(action == 'add') - this.selection.select(this._itemRowMap[item.getID()]); - if(this.isSorted()) { this.sort(); //this also refreshes the hash map @@ -266,7 +263,10 @@ Scholar.ItemTreeView.prototype.notify = function(action, type, ids) this._refreshHashMap(); } - this.rememberSelection(); + if(action == 'add') + this.selection.select(this._itemRowMap[item.getID()]); + else + this.rememberSelection(); } this.selection.selectEventsSuppressed = false; } diff --git a/chrome/chromeFiles/content/scholar/overlay.xul b/chrome/chromeFiles/content/scholar/overlay.xul index c5abf2cb38..8f0f57d953 100644 --- a/chrome/chromeFiles/content/scholar/overlay.xul +++ b/chrome/chromeFiles/content/scholar/overlay.xul @@ -28,7 +28,7 @@ @@ -59,7 +59,7 @@ enableColumnDrag="true" onkeypress="if(event.keyCode == event.DOM_VK_BACK_SPACE || event.keyCode == event.DOM_VK_DELETE){ ScholarPane.deleteItemSelection(); return false; }" onselect="ScholarPane.itemSelected();" ondraggesture="if (event.target.localName == 'treechildren') nsDragAndDrop.startDrag(event,ScholarPane.getItemsView());" - ondragover="nsDragAndDrop.dragOver(event,ScholarPane.getItemsView())" ondragdrop="nsDragAndDrop.drop(event,ScholarPane.getItemsView())" + ondragdrop="nsDragAndDrop.drop(event,ScholarPane.getItemsView())" flex="1">