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

Commit

Permalink
Pass page_position parameter when opening search result in paginated …
Browse files Browse the repository at this point in the history
…context. Fix #1041
  • Loading branch information
cdujeu committed Mar 8, 2016
1 parent 6e77a76 commit bd2d2cd
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/src/plugins/gui.ajax/res/js/es6/model/PydioDataModel.es6
Expand Up @@ -114,7 +114,7 @@ class PydioDataModel extends Observable{
var currentPage = ajxpNode.getMetadata().get("paginationData").get("current");
this.loadPathInfoSync(selPath, function(foundNode){
newPage = foundNode.getMetadata().get("page_position");
});
}, {page_position:'true'});
if(newPage && newPage != currentPage){
ajxpNode.getMetadata().get("paginationData").set("new_page", newPage);
this.requireContextChange(ajxpNode, true, true);
Expand Down Expand Up @@ -169,8 +169,8 @@ class PydioDataModel extends Observable{
this._iAjxpNodeProvider.refreshNodeAndReplace(nodeOrPath, onComplete);
}

loadPathInfoSync (path, callback){
this._iAjxpNodeProvider.loadLeafNodeSync(new AjxpNode(path), callback, false);
loadPathInfoSync (path, callback, additionalParameters = {}){
this._iAjxpNodeProvider.loadLeafNodeSync(new AjxpNode(path), callback, false, additionalParameters);
}

loadPathInfoAsync (path, callback){
Expand Down
Expand Up @@ -96,14 +96,19 @@ class RemoteNodeProvider{
* @param node AjxpNode
* @param nodeCallback Function On node loaded
* @param aSync bool
* @param additionalParameters object
*/
loadLeafNodeSync (node, nodeCallback, aSync=false){
loadLeafNodeSync (node, nodeCallback, aSync=false, additionalParameters={}){
var params = {
get_action:'ls',
options:'al',
dir: PathUtils.getDirname(node.getPath()),
file: PathUtils.getBasename(node.getPath())
};
for(var k in additionalParameters){
if(!additionalParameters.hasOwnProperty(k)) continue;
params[k] = additionalParameters[k];
}
if(this.properties){
this.properties.forEach(function(value, key){
params[key] = value;
Expand Down

0 comments on commit bd2d2cd

Please sign in to comment.