Skip to content

Commit

Permalink
EZP-26011: Fixed the issue where the UDW loadContent flag is not ta…
Browse files Browse the repository at this point in the history
…ken into

account
  • Loading branch information
dpobel committed Jul 8, 2016
1 parent f683b06 commit 5cb12bc
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -224,21 +224,27 @@ YUI.add('cof-createcontent-universaldiscoveryserviceplugin', function (Y) {
/**
* Loads the content location of the published content
*
* @method _setSelectedLocation
* @method _loadContentLocation
* @protected
* @param event {Object} event facade
*/
_loadContentLocation: function (event) {
var host = this.get('host');
var udwService = this.get('host'),
selection = {
contentType: udwService.get('contentType'),
};

event.content.loadLocations({api: host.get('capi')}, function (error, response) {
host.get('app').set('loading', false);
if ( udwService.get('parameters').loadContent ) {
selection.content = event.content;
}

host.get('eventTarget').fire('contentLoaded', {
contentInfo: event.content,
location: response[0],
contentType: host.get('contentType')
});
event.content.loadLocations({api: udwService.get('capi')}, function (error, locations) {
selection.location = locations[0];
selection.contentInfo = locations[0].get('contentInfo');

udwService.get('app').set('loading', false);

udwService.get('eventTarget').fire('contentLoaded', selection);
});
},

Expand Down

0 comments on commit 5cb12bc

Please sign in to comment.