Skip to content

Commit

Permalink
Merge pull request #450 from dpalou/MOBILE-1527
Browse files Browse the repository at this point in the history
Mobile 1527
  • Loading branch information
jleyva committed Apr 14, 2016
2 parents d60a3c1 + 4b2749e commit 9a5ab42
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 7 deletions.
4 changes: 3 additions & 1 deletion www/addons/coursecompletion/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,8 @@ angular.module('mm.addons.coursecompletion')
});
$mmEvents.on(mmCoursesEventMyCoursesRefreshed, $mmaCourseCompletionHandlers.clearCoursesNavCache);
$mmEvents.on(mmUserEventProfileRefreshed, function(data) {
$mmaCourseCompletionHandlers.clearViewCompletionCache(data.courseid, data.userid);
if (data) {
$mmaCourseCompletionHandlers.clearViewCompletionCache(data.courseid, data.userid);
}
});
});
4 changes: 3 additions & 1 deletion www/addons/grades/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,8 @@ angular.module('mm.addons.grades')
.run(function($mmaGradesHandlers, $mmEvents, mmCoreEventLogout, mmUserEventProfileRefreshed) {
$mmEvents.on(mmCoreEventLogout, $mmaGradesHandlers.clearViewGradesCache);
$mmEvents.on(mmUserEventProfileRefreshed, function(data) {
$mmaGradesHandlers.clearViewGradesCache(data.courseid, data.userid);
if (data) {
$mmaGradesHandlers.clearViewGradesCache(data.courseid, data.userid);
}
});
});
3 changes: 2 additions & 1 deletion www/addons/messages/controllers/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ angular.module('mm.addons.messages')
}).then(function(user) {
// Verify that no other user was loaded while the async call was in progress.
if ($scope.userId == userId) {
$scope.profileLink = user.profileimageurl;
// Use a default icon if no image URL available.
$scope.profileLink = user.profileimageurl || true;
}
});
}
Expand Down
2 changes: 1 addition & 1 deletion www/addons/messages/templates/discussion.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

<ion-nav-buttons side="secondary">
<a ng-if="profileLink" mm-user-link userid="{{userId}}" aria-label="{{ 'mm.user.viewprofile' | translate }}">
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}">
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}" mm-external-content>
<span ng-if="profileLink === true" class="button button-icon icon ion-person"></span>
</a>
</ion-nav-buttons>
Expand Down
2 changes: 1 addition & 1 deletion www/addons/messages/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<ion-view view-title="{{ 'mma.messages.messages' | translate }}">
<ion-nav-buttons side="secondary">
<a ng-if="profileLink" mm-user-link userid="{{userId}}" aria-label="{{ 'mm.user.viewprofile' | translate }}">
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}">
<img ng-if="profileLink && profileLink !== true" class="button mm-bar-button-image" ng-src="{{profileLink}}" mm-external-content>
<span ng-if="profileLink === true" class="button button-icon icon ion-person"></span>
</a>
</ion-nav-buttons>
Expand Down
2 changes: 1 addition & 1 deletion www/addons/mod_chat/templates/chat.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
<img ng-if="message.userprofileimageurl" ng-src="{{message.userprofileimageurl}}" mm-external-content alt="{{ 'mm.core.pictureof' | translate:{$a: message.userfullname} }}" role="presentation">
<img ng-if="!message.userprofileimageurl" src="img/user-avatar.png" alt="{{ 'mm.core.pictureof' | translate:{$a: message.userfullname} }}" role="presentation">
<h2>{{ message.userfullname }}</h2>
<span class="item-note">{{ message.timestamp * 1000 | mmFormatDate:"dftimedate" }}</span>

<mm-format-text after-render="scrollAfterRender" watch="true">{{ message.message }}</mm-format-text>

<span class="item-note">{{ message.timestamp * 1000 | mmFormatDate:"dftimedate" }}</span>
</article>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion www/addons/mod_wiki/lang/en.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"errorloadingpage": "An error occured while loading page.",
"errornowikiavailable": "There's no wiki available to be shown.",
"errornowikiavailable": "This wiki does not have any content yet.",
"gowikihome": "Go Wiki home",
"map": "Map",
"notingroup": "Not in group",
Expand Down

0 comments on commit 9a5ab42

Please sign in to comment.