Skip to content

Commit 5b44a8d

Browse files
committed
Merge pull request #373 from dpalou/MOBILE-1370-tmpfix
MOBILE-1370 glossary: Add entryid param to fix state comparison problems
2 parents 4699df6 + a79618e commit 5b44a8d

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

www/addons/mod_glossary/main.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ angular.module('mm.addons.mod_glossary', ['mm.core'])
3636
url: '/mod_glossary-entry',
3737
params: {
3838
cid: null, // Not naming it courseid because it collides with 'site.mod_glossary' param in split-view.
39-
entry: null
39+
entry: null,
40+
entryid: null // Required so Angular ui-router is able to compare states (it doesn't compare object properties).
4041
},
4142
views: {
4243
'site': {

www/addons/mod_glossary/services/handlers.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ angular.module('mm.addons.mod_glossary')
159159
return promise.then(function(courseId) {
160160
var stateParams = {
161161
entry: entry,
162+
entryid: entry.id,
162163
cid: courseId
163164
};
164165
$mmContentLinksHelper.goInSite('site.mod_glossary-entry', stateParams, siteId);

www/addons/mod_glossary/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<h2>{{getDivider(entries[$index])}}</h2>
3434
</div>
3535

36-
<a class="item" mm-split-view-link="site.mod_glossary-entry({entry: {{ entry }}, cid: {{ courseid }}})">
36+
<a class="item" mm-split-view-link="site.mod_glossary-entry({entry: {{ entry }}, cid: {{ courseid }}, entryid: {{ entry.id }}})">
3737
<p>{{entry.concept}}</p>
3838
</a>
3939
</div>

0 commit comments

Comments
 (0)