[MNT-15990] CLONE - Copy/Move dialog's default selection should fall back to a non-hidden view mode Created: 06-Apr-16 Updated: 03-Oct-16 Resolved: 18-Apr-16 |
|
Status: | Closed |
Project: | Service Packs and Hot Fixes |
Component/s: | Share Application |
Affects Version/s: | 5.0.3 |
Fix Version/s: | 5.0.4 |
Type: | Service Pack Request | ||
Reporter: | Craig Tan [X] (Inactive) | Assignee: | Closed Bugs (Inactive) |
Resolution: | Fixed | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | 0 minutes | ||
Time Spent: | 2 hours, 30 minutes | ||
Original Estimate: | Not Specified |
Issue Links: |
|
||||||||
Bug Priority: |
|
||||||||
ACT Numbers: | 00612777 Premier |
||||||||
Build Location: | https://releases.alfresco.com/Enterprise-5.0/5.0.4/build-00030/ALL/ |
Description |
They found an error handling issue on 5.0.3 when users hide the "Recent Site" view mode. The Copy/Move dialog would still render the view instead of choosing to another view to render. [Steps to reproduce] 1. In share-config-custom.xml, add the following under section <config evaluator="string-compare" condition="DocumentLibrary" replace="true"> to hide these views: <!-- Document Library config section --> <config evaluator="string-compare" condition="DocumentLibrary" replace="true"> <hidden-picker-view-modes> <mode>VIEW_MODE_SITE</mode> <mode>VIEW_MODE_USERHOME</mode> <mode>VIEW_MODE_RECENT_SITES</mode> <mode>VIEW_MODE_FAVOURITE_SITES</mode> <mode>VIEW_MODE_SHARED</mode> </hidden-picker-view-modes> ... </config> 2. Start Alfresco and log into Share [Actual result] [Expected result] [Investigation] Original code for (var i = 0, ii = modeButtons.length; i < ii; i++) { modeButton = modeButtons[i]; viewMode = parseInt(modeButton.get("name"), 10); modeButton.set("disabled", !(viewMode in allowedViewModes)); modeButton.setStyle("display", viewMode in allowedViewModes ? "block" : "none"); if (viewMode == this.options.viewMode) { if (modeButton.get("checked")) { // Will trigger the path expansion this.setViewMode(viewMode); } else { modeButton.set("checked", true); } } } The following change by bringing "this.setViewMode(viewMode);" out of the if statement seemed to have fixed the issue: for (var i = 0, ii = modeButtons.length; i < ii; i++) { modeButton = modeButtons[i]; viewMode = parseInt(modeButton.get("name"), 10); modeButton.set("disabled", !(viewMode in allowedViewModes)); modeButton.setStyle("display", viewMode in allowedViewModes ? "block" : "none"); if (viewMode == this.options.viewMode) { if (modeButton.get("checked")) { } else { modeButton.set("checked", true); } // Will trigger the path expansion this.setViewMode(viewMode); } } See image "Copy and Move after proposed fix.png" after the proposed fix is in place. |