Skip to content

Commit

Permalink
bugfix: folder isn't loaded when opened from filetree and preview mod…
Browse files Browse the repository at this point in the history
…e is enabled #120
  • Loading branch information
psolom committed Mar 13, 2017
1 parent ef0f002 commit 96c6210
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions scripts/filemanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ $.richFilemanagerPlugin = function(element, pluginOptions)
if(node.rdo.type === 'folder') {
if(!node.isLoaded() || (node.isExpanded() && config.filetree.reloadOnClick)) {
tree_model.loadNodes(node, true);
model.itemsModel.loadList(node.id);
getDetailView(node.rdo);
} else {
tree_model.toggleNode(node);

Expand Down Expand Up @@ -3458,7 +3458,7 @@ $.richFilemanagerPlugin = function(element, pluginOptions)
---------------------------------------------------------*/

// Retrieves file or folder info based on the path provided.
var getDetailView = function(resourceObject) {
function getDetailView(resourceObject) {
if(!resourceObject.attributes.readable) {
fm.error(lg.NOT_ALLOWED_SYSTEM);
return false;
Expand All @@ -3467,9 +3467,10 @@ $.richFilemanagerPlugin = function(element, pluginOptions)
fmModel.previewModel.applyObject(resourceObject);
}
if(resourceObject.type === 'folder' || resourceObject.type === 'parent') {
fmModel.previewFile(false);
fmModel.itemsModel.loadList(resourceObject.id);
}
};
}

// Options for context menu plugin
function getContextMenuItems(resourceObject) {
Expand Down

0 comments on commit 96c6210

Please sign in to comment.