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

Commit

Permalink
Fix selectAll() action in GUI - was breaking the recycle bin empty ac…
Browse files Browse the repository at this point in the history
…tion.
  • Loading branch information
cdujeu committed Oct 5, 2015
1 parent cd6abec commit be82a25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Expand Up @@ -466,6 +466,7 @@ var PydioDataModel = (function (_Observable) {
this._selectedNodes = ajxpDataNodes;
this._bEmpty = ajxpDataNodes && ajxpDataNodes.length ? false : true;
this._bFile = this._bDir = this._isRecycle = false;
this._bUnique = false;
if (!this._bEmpty) {
this._bUnique = ajxpDataNodes.length == 1;
for (var i = 0; i < ajxpDataNodes.length; i++) {
Expand Down Expand Up @@ -517,7 +518,12 @@ var PydioDataModel = (function (_Observable) {
*/

PydioDataModel.prototype.selectAll = function selectAll() {
this.setSelectedNodes(this._contextNode.getChildren(), "dataModel");
var nodes = [];
var childrenMap = this._contextNode.getChildren();
childrenMap.forEach(function (child) {
nodes.push(child);
});
this.setSelectedNodes(nodes, "dataModel");
};

/**
Expand Down
Expand Up @@ -436,6 +436,7 @@ class PydioDataModel extends Observable{
this._selectedNodes = ajxpDataNodes;
this._bEmpty = ((ajxpDataNodes && ajxpDataNodes.length)?false:true);
this._bFile = this._bDir = this._isRecycle = false;
this._bUnique = false;
if(!this._bEmpty)
{
this._bUnique = (ajxpDataNodes.length == 1);
Expand Down Expand Up @@ -485,7 +486,10 @@ class PydioDataModel extends Observable{
* Select all the children of the current context node
*/
selectAll (){
this.setSelectedNodes(this._contextNode.getChildren(), "dataModel");
var nodes = [];
var childrenMap = this._contextNode.getChildren();
childrenMap.forEach(function(child){nodes.push(child)});
this.setSelectedNodes(nodes, "dataModel");
}

/**
Expand Down

0 comments on commit be82a25

Please sign in to comment.