From a79618e9ce23c13b0f415b95cd93adec577e144f Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Fri, 5 Feb 2016 13:35:30 +0100 Subject: [PATCH] MOBILE-1370 glossary: Add entryid param to fix state comparison problems --- www/addons/mod_glossary/main.js | 3 ++- www/addons/mod_glossary/services/handlers.js | 1 + www/addons/mod_glossary/templates/index.html | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/www/addons/mod_glossary/main.js b/www/addons/mod_glossary/main.js index 2468ed428fe..71401c62f8d 100644 --- a/www/addons/mod_glossary/main.js +++ b/www/addons/mod_glossary/main.js @@ -36,7 +36,8 @@ angular.module('mm.addons.mod_glossary', ['mm.core']) url: '/mod_glossary-entry', params: { cid: null, // Not naming it courseid because it collides with 'site.mod_glossary' param in split-view. - entry: null + entry: null, + entryid: null // Required so Angular ui-router is able to compare states (it doesn't compare object properties). }, views: { 'site': { diff --git a/www/addons/mod_glossary/services/handlers.js b/www/addons/mod_glossary/services/handlers.js index 6cf4505e0f3..03ac07d44c5 100644 --- a/www/addons/mod_glossary/services/handlers.js +++ b/www/addons/mod_glossary/services/handlers.js @@ -159,6 +159,7 @@ angular.module('mm.addons.mod_glossary') return promise.then(function(courseId) { var stateParams = { entry: entry, + entryid: entry.id, cid: courseId }; $mmContentLinksHelper.goInSite('site.mod_glossary-entry', stateParams, siteId); diff --git a/www/addons/mod_glossary/templates/index.html b/www/addons/mod_glossary/templates/index.html index 7f18d6b8484..f164b81c6c8 100644 --- a/www/addons/mod_glossary/templates/index.html +++ b/www/addons/mod_glossary/templates/index.html @@ -33,7 +33,7 @@

{{getDivider(entries[$index])}}

- +

{{entry.concept}}