-
Notifications
You must be signed in to change notification settings - Fork 47
EZP-26872: Add support for starting Location id in the UDW Finder #804
Conversation
2938160
to
e0698c7
Compare
@@ -22,6 +22,60 @@ YUI.add('ez-universaldiscoveryviewservice', function (Y) { | |||
*/ | |||
Y.eZ.UniversalDiscoveryViewService = Y.Base.create('universalDiscoveryViewService', Y.eZ.ViewService, [Y.eZ.SideViewService], { | |||
/** | |||
* |
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.
@StephaneDiot : missing doc
}, | ||
|
||
/** | ||
* `Get the path of the UDW starting Location. |
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.
@StephaneDiot : not Get (it returns nothing) but Loads
* @method _loadStartingLocationPath | ||
* @protected | ||
* @param {eZ.Location} startingLocation | ||
* @param {Function} callback |
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.
@StephaneDiot missing doc for the callback parameter
ATTRS: { | ||
|
||
/** | ||
* Holds the starting location where the UDW will . |
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.
@StephaneDiot the end of the sentence is missing
* | ||
* @attribute startingLocation | ||
* @default false | ||
* @type {eZ.Location} |
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.
@StephaneDiot this should reflect the fact it can be false
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.
With comments fixed and commit squashed.
* @method _loadStartingLocationPath | ||
* @protected | ||
* @param {eZ.Location} startingLocation | ||
* @param {Function} callback Executed after loading the path. Takes the location containing the path in parameter or false if loading error. |
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.
Nitpick: line too long
this.wakeUp(); | ||
} | ||
}); | ||
this.on('*:explorerNavigate', function(e) { | ||
this._handleLevelViews(e.target, e.depth, e.location); | ||
}); | ||
this.after('startingLocationChange', function (e) { | ||
if ( e.newVal === e.prevVal ) { | ||
// this is to avoid rebuilding the level views when a |
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.
Missing capital letter. Lines are too short. Sentences are long and weird.
@@ -138,11 +178,15 @@ YUI.add('ez-universaldiscoveryfinderexplorerview', function (Y) { | |||
* | |||
* @method _addLevel | |||
* @param {Y.eZ.Location} location the parent location | |||
* @param {Number} the location id that should be selected in the level |
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.
Name of the parameter is missing
@@ -170,19 +214,33 @@ YUI.add('ez-universaldiscoveryfinderexplorerview', function (Y) { | |||
}, | |||
|
|||
/** | |||
* The starting Location model if the UDW is configured with one. |
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.
Model ?
@@ -150,20 +150,32 @@ YUI.add('ez-universaldiscoveryfinderview', function (Y) { | |||
}, | |||
|
|||
/** | |||
* Holds the virtual root location | |||
* The starting Location model if the UDW is configured with one. It |
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.
Same here. We usually call it Location
without model
5c6915c
to
b16570b
Compare
JIRA: https://jira.ez.no/browse/EZP-26872
replaces #799
Description
This patch brings the support of the starting Location id UDW parameter to the Finder method.
Screencast:
Tests
manual tests + unit tests