From 231621fe6c6ad4c0fb9cfa771455ef37ed41535a Mon Sep 17 00:00:00 2001 From: Yuzheng Zhou Date: Tue, 24 Jan 2012 11:35:09 -0500 Subject: [PATCH] BUG: Refs #0483. Fixed the item action menu in folder view. --- core/public/js/common/common.browser.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/core/public/js/common/common.browser.js b/core/public/js/common/common.browser.js index ba4fe20d5..fe420cd9e 100644 --- a/core/public/js/common/common.browser.js +++ b/core/public/js/common/common.browser.js @@ -344,7 +344,13 @@ midas.createAction = function (node) { } if(type == 'item') { var from = midas.parentOf(node); - var fromFolder = from.attr('element'); + // we are in a subfolder view and the parent is the current folder + if(from) { + var fromFolder = from.attr('element'); + } + else { + var fromFolder = json.folder.folder_id; + } html += '
  • '+json.browse.view+'
  • '; html += '
  • '+json.browse.downloadLatest+'
  • '; if (policy>=2) {