-
Notifications
You must be signed in to change notification settings - Fork 47
Fix EZP-27144: Current location not viewable when content browsing #833
Fix EZP-27144: Current location not viewable when content browsing #833
Conversation
11b8614
to
2183d6b
Compare
@@ -60,6 +60,12 @@ YUI.add('ez-discoverybarviewservice', function (Y) { | |||
startingLocationId: startingLocationId, | |||
minDiscoverDepth: rootDepth, | |||
confirmLabel: Y.eZ.trans('view.content.label', {}, 'bar'), | |||
isSelectable: function(contentStruct) { | |||
if (startingLocationId === contentStruct.location.get('id')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can be simplified (and cs issue, missing space after function
):
isSelectable: function (contentStruct) {
return startingLocationId !== contentStruct.location.get('id');
}
Assert.isFunction(e.config.isSelectable, "config should have a function named isSelectable"); | ||
|
||
Y.Assert.isTrue( | ||
e.config.isSelectable({location: otherLocation}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add 2 new test cases that would call the isSelectable
function and make sure the starting Location can not be selected and any other Location is selectable.
Updated ping @dpobel @yannickroger |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
besides the remaining CS issue
@@ -60,6 +60,9 @@ YUI.add('ez-discoverybarviewservice', function (Y) { | |||
startingLocationId: startingLocationId, | |||
minDiscoverDepth: rootDepth, | |||
confirmLabel: Y.eZ.trans('view.content.label', {}, 'bar'), | |||
isSelectable: function(contentStruct) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space still missing after function
...
28aaace
to
a80dbe3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with base branch 1.9
jira : https://jira.ez.no/browse/EZP-27144
Description
When a user wanted to browse with the finder the current location where he currently was this was resulting in an infinite loading. Now the user can only select another location than the one he is on ( or cancel to stay on it obviously )
Screencast
https://youtu.be/w5M2Wfygc_8
Tests
Manually and unit tested