Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Fix node listeners just after upload
Browse files Browse the repository at this point in the history
  • Loading branch information
millsdude authored and cdujeu committed Oct 11, 2013
1 parent fbb87ce commit b0ef0ec
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,9 @@ Class.create("ActionsManager", {
if(!parent && getRepName(newNode.getPath()) == "") parent = dm.getRootNode();
if(parent){
parent.addChild(newNode);
dm.setSelectedNodes([newNode], {});
if(dm.getContextNode() == parent){
dm.setSelectedNodes([newNode], {});
}
}
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
*/

/**
* The godzilla of AjaXplorer, should be split in smaller pieces..
* The godzilla of Pydio, should be split in smaller pieces..
* This grid displays either a table of rows or a grid of thumbnail.
*/
Class.create("FilesList", SelectableElements, {
Expand Down Expand Up @@ -1143,7 +1143,9 @@ Class.create("FilesList", SelectableElements, {
item.ajxpNode = null;
delete item;
newItem.REPLACE_OBS = this.makeItemRefreshObserver(ajxpNode, newItem, renderer);
newItem.REMOVE_OBS = this.makeItemRemovedObserver(ajxpNode, newItem);
ajxpNode.observe("node_replaced", newItem.REPLACE_OBS);
ajxpNode.observe("node_removed", newItem.REMOVE_OBS);
var dm = (this._dataModel?this._dataModel:ajaxplorer.getContextHolder());
if(dm.getSelectedNodes() && dm.getSelectedNodes().length)
{
Expand Down

0 comments on commit b0ef0ec

Please sign in to comment.