Skip to content

Commit

Permalink
Merge branch '1.9' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
yannickroger committed Apr 18, 2017
2 parents b1e2d7d + 463ba98 commit f7fe168
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions Resources/public/js/apps/ez-platformuiapp.js
Expand Up @@ -618,6 +618,8 @@ YUI.add('ez-platformuiapp', function (Y) {
});
if ( createView ) {
viewInfo.instance = new viewInfo.type();
} else {
viewInfo.instance.reset();
}
view = viewInfo.instance;
view.addTarget(service);
Expand Down
Expand Up @@ -77,7 +77,7 @@ YUI.add('ez-discoverybarviewservice', function (Y) {
_navigateToLocation: function (e) {
this.get('app').navigateTo('viewLocation', {
id: e.selection.location.get('id'),
languageCode: e.selection.content.get('mainLanguageCode')
languageCode: e.selection.location.get('contentInfo').get('mainLanguageCode')
});
},

Expand Down
4 changes: 2 additions & 2 deletions Resources/translations/trash.en.xlf
Expand Up @@ -49,8 +49,8 @@
<jms:reference-file>Resources/public/js/views/services/ez-trashviewservice.js</jms:reference-file>
</trans-unit>
<trans-unit id="e4070d79791c331da86fcb230fec53235b1519ad" resname="items.permanently.deleted">
<source>%count items were permanently deleted.</source>
<target>%count items were permanently deleted.</target>
<source>%count% items were permanently deleted.</source>
<target>%count% items were permanently deleted.</target>
<note>key: items.permanently.deleted</note>
<jms:reference-file>Resources/public/js/views/services/ez-trashviewservice.js</jms:reference-file>
</trans-unit>
Expand Down
8 changes: 7 additions & 1 deletion Tests/js/apps/assets/ez-platformuiapp-tests.js
Expand Up @@ -1128,7 +1128,8 @@ YUI.add('ez-platformuiapp-tests', function (Y) {
}
},
initialized = 0, rendered = 0, bubble = 0,
activeSet = 0, nextCalls = 0;
activeSet = 0, nextCalls = 0,
sideViewReseted = false;


this.app.sideViews.sideView1.type = Y.Base.create('sideView1', Y.View, [], {
Expand All @@ -1138,6 +1139,10 @@ YUI.add('ez-platformuiapp-tests', function (Y) {
return this;
},

reset: function () {
sideViewReseted = true;
},

initializer: function () {
initialized++;
this.after('activeChange', function (e) {
Expand Down Expand Up @@ -1181,6 +1186,7 @@ YUI.add('ez-platformuiapp-tests', function (Y) {
this.app.sideViews.sideView1.instance.get('container')
)
);
Y.Assert.isTrue(sideViewReseted, "The side view should have been reseted");
},

"Should hide the side view instance": function () {
Expand Down
Expand Up @@ -96,6 +96,8 @@ YUI.add('ez-discoverybarviewservice-tests', function (Y) {
this.mainLanguage = 'LYO-69';
this.location = new Y.Base();
this.location.set('id', this.locationId);
this.location.set('contentInfo', new Y.Base());
this.location.get('contentInfo').set('mainLanguageCode', this.mainLanguage);

Y.eZ.LocationViewView = Y.Base.create('locationView', Y.Base, [], {}, {
ATTRS: {
Expand Down Expand Up @@ -230,12 +232,6 @@ YUI.add('ez-discoverybarviewservice-tests', function (Y) {
returns: this.activeView
});

Y.Mock.expect(contentMock, {
method: 'get',
args: ['mainLanguageCode'],
returns: this.mainLanguage
});

Mock.expect(this.app, {
method: 'navigateTo',
args: ["viewLocation", Y.Mock.Value.Object],
Expand Down

0 comments on commit f7fe168

Please sign in to comment.