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

Commit

Permalink
Track ajxpNode.getChildren() usage for new api (Map instead of Hash)
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Apr 29, 2015
1 parent f08d3ce commit 758cb74
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
Expand Up @@ -40,7 +40,7 @@ Class.create("LocalCartNodeProvider", {
loadNode : function(node, nodeCallback, childCallback){
node.setLoaded(true);
nodeCallback(node);
node.getChildren().each(function(n){
node.getChildren().forEach(function(n){
childCallback(n);
});
},
Expand Down
Expand Up @@ -71,7 +71,7 @@ Class.create("NotificationLoader", {
var newNotifs = $A();
var currentLastAlert = 0, currentLastEvent = 0;

this.ajxpNode.getChildren().each(function(el){
this.ajxpNode.getChildren().forEach(function(el){

// REPLACE REAL PATH NOW
el._path = el.getMetadata().get("real_path");
Expand Down Expand Up @@ -333,7 +333,7 @@ Class.create("NotificationLoader", {
},0.2);
}
if(container.down('#ajxp_activity_panel > div.panelHeader')){
if(!fRp._rootNode.getChildren().length){
if(!fRp._rootNode.getChildren().size){
container.down('#ajxp_activity_panel > div.panelHeader').hide();
}else{
container.down('#ajxp_activity_panel > div.panelHeader').show();
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/editor.diaporama/class.Diaporama.js
Expand Up @@ -300,7 +300,7 @@ Class.create("Diaporama", AbstractEditor, {
var userSelection = ajaxplorer.getUserSelection();
var allItems, sCurrentFile;
if(userSelection.isUnique()){
allItems = userSelection.getContextNode().getChildren();
allItems = ProtoCompat.map2values(userSelection.getContextNode().getChildren());
sCurrentFile = node.getPath();
}else{
allItems = userSelection.getSelectedNodes();
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/core/model/AjxpNode.js
Expand Up @@ -250,7 +250,7 @@ var AjxpNode = (function (_Observable) {
this._metadata.set(key, value);
}
}).bind(this));
if (pathChanged && !this._isLeaf && this.getChildren().length) {
if (pathChanged && !this._isLeaf && this.getChildren().size) {
window.setTimeout((function () {
this.reload(this._iNodeProvider);
}).bind(this), 100);
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/es6/model/AjxpNode.es6
Expand Up @@ -200,7 +200,7 @@ class AjxpNode extends Observable{
this._metadata.set(key, value);
}
}.bind(this) );
if(pathChanged && !this._isLeaf && this.getChildren().length){
if(pathChanged && !this._isLeaf && this.getChildren().size){
window.setTimeout(function(){
this.reload(this._iNodeProvider);
}.bind(this), 100);
Expand Down

0 comments on commit 758cb74

Please sign in to comment.