Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions www/addons/calendar/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ angular.module('mm.addons.calendar')
$scope.icon = 'ion-calendar';
$scope.title = 'mma.calendar.calendarevents';
$scope.state = 'site.calendar';
$scope.class = 'mma-calendar-handler';
};
};

Expand Down
2 changes: 2 additions & 0 deletions www/addons/coursecompletion/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ angular.module('mm.addons.coursecompletion')

// Button title.
$scope.title = 'mma.coursecompletion.viewcoursereport';
$scope.class = 'mma-coursecompletion-user-handler';

$scope.action = function($event) {
$event.preventDefault();
Expand Down Expand Up @@ -208,6 +209,7 @@ angular.module('mm.addons.coursecompletion')
return function($scope, $state) {
$scope.icon = 'ion-android-checkbox-outline';
$scope.title = 'mma.coursecompletion.coursecompletion';
$scope.class = 'mma-coursecompletion-mine-handler';
$scope.action = function($event, course) {
$event.preventDefault();
$event.stopPropagation();
Expand Down
1 change: 1 addition & 0 deletions www/addons/files/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ angular.module('mm.addons.files')
$scope.icon = 'ion-folder';
$scope.title = 'mma.files.myfiles';
$scope.state = 'site.files';
$scope.class = 'mma-files-handler';
};
};

Expand Down
1 change: 1 addition & 0 deletions www/addons/frontpage/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ angular.module('mm.addons.frontpage')
$scope.icon = 'ion-home';
$scope.title = 'mma.frontpage.sitehome';
$scope.state = 'site.mm_course-section';
$scope.class = 'mma-frontpage-handler';
};
};

Expand Down
2 changes: 2 additions & 0 deletions www/addons/grades/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ angular.module('mm.addons.grades')
return function($scope, $state) {
$scope.icon = 'ion-stats-bars';
$scope.title = 'mma.grades.grades';
$scope.class = 'mma-grades-mine-handler';
$scope.action = function($event, course) {
$event.preventDefault();
$event.stopPropagation();
Expand Down Expand Up @@ -178,6 +179,7 @@ angular.module('mm.addons.grades')
*/
return function($scope) {
$scope.title = 'mma.grades.viewgrades';
$scope.class = 'mma-grades-user-handler';

$scope.action = function($event) {
$event.preventDefault();
Expand Down
6 changes: 6 additions & 0 deletions www/addons/messages/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,10 @@ angular.module('mm.addons.messages')
return $mmaMessages.isContact(user.id).then(function(isContact) {
if (isContact) {
$scope.title = 'mma.messages.removecontact';
$scope.class = 'mma-messages-removecontact-handler';
} else {
$scope.title = 'mma.messages.addcontact';
$scope.class = 'mma-messages-addcontact-handler';
}
}).catch(function() {
// This fails for some reason, let's just hide the button.
Expand Down Expand Up @@ -145,8 +147,10 @@ angular.module('mm.addons.messages')
return $mmaMessages.isBlocked(user.id).then(function(isBlocked) {
if (isBlocked) {
$scope.title = 'mma.messages.unblockcontact';
$scope.class = 'mma-messages-unblockcontact-handler';
} else {
$scope.title = 'mma.messages.blockcontact';
$scope.class = 'mma-messages-blockcontact-handler';
}
}).catch(function() {
// This fails for some reason, let's just hide the button.
Expand Down Expand Up @@ -222,6 +226,7 @@ angular.module('mm.addons.messages')
*/
return function($scope) {
$scope.title = 'mma.messages.sendmessage';
$scope.class = 'mma-messages-sendmessage-handler';
$scope.action = function($event) {
$event.preventDefault();
$event.stopPropagation();
Expand Down Expand Up @@ -274,6 +279,7 @@ angular.module('mm.addons.messages')
$scope.icon = 'ion-chatbox';
$scope.title = 'mma.messages.messages';
$scope.state = 'site.messages';
$scope.class = 'mma-messages-handler';
};
};

Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_assign/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ angular.module('mm.addons.mod_assign')
return function($scope) {
$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('assign');
$scope.class = 'mma-mod_assign-handler';
$scope.action = function(e) {
if (e) {
e.preventDefault();
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_book/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ angular.module('mm.addons.mod_book')

$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('book');
$scope.class = 'mma-mod_book-handler';
$scope.buttons = [downloadBtn, refreshBtn];
$scope.spinner = true; // Show spinner while calculating status.

Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_chat/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ angular.module('mm.addons.mod_chat')
return function($scope) {
$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('chat');
$scope.class = 'mma-mod_chat-handler';
$scope.action = function(e) {
$state.go('site.mod_chat', {module: module, courseid: courseid});
};
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_choice/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ angular.module('mm.addons.mod_choice')
return function($scope) {
$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('choice');
$scope.class = 'mma-mod_choice-handler';
$scope.action = function(e) {
$state.go('site.mod_choice', {module: module, courseid: courseid});
};
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_folder/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ angular.module('mm.addons.mod_folder')

$scope.icon = $mmCourse.getModuleIconSrc('folder');
$scope.title = module.name;
$scope.class = 'mma-mod_folder-handler';
$scope.buttons = [downloadBtn, refreshBtn];
$scope.spinner = true; // Show spinner while calculating status.

Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_forum/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ angular.module('mm.addons.mod_forum')
return function($scope) {
$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('forum');
$scope.class = 'mma-mod_forum-handler';
$scope.action = function(e) {
if (e) {
e.preventDefault();
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_glossary/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ angular.module('mm.addons.mod_glossary')
return function($scope) {
$scope.icon = $mmCourse.getModuleIconSrc('glossary');
$scope.title = module.name;
$scope.class = 'mma-mod_glossary-handler';
$scope.action = function(e) {
if (e) {
e.preventDefault();
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_imscp/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ angular.module('mm.addons.mod_imscp')

$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('imscp');
$scope.class = 'mma-mod_imscp-handler';
$scope.buttons = [downloadBtn, refreshBtn];
$scope.spinner = true; // Show spinner while calculating status.

Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_label/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ angular.module('mm.addons.mod_label')
}

$scope.icon = false;
$scope.class = 'mma-mod_label-handler';
$scope.action = function(e) {
if (e) {
e.preventDefault();
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_lti/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ angular.module('mm.addons.mod_lti')
return function($scope) {
$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('lti'); // Get LTI default icon for now.
$scope.class = 'mma-mod_lti-handler';
$scope.action = function() {
$state.go('site.mod_lti', {module: module, courseid: courseid});
};
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_page/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ angular.module('mm.addons.mod_page')

$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('page');
$scope.class = 'mma-mod_page-handler';
$scope.buttons = [downloadBtn, refreshBtn];
$scope.spinner = true; // Show spinner while calculating status.

Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_resource/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ angular.module('mm.addons.mod_resource')
} else {
$scope.icon = $mmCourse.getModuleIconSrc('resource');
}
$scope.class = 'mma-mod_resource-handler';
$scope.buttons = [downloadBtn, refreshBtn];
$scope.spinner = true; // Show spinner while calculating status.

Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_scorm/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ angular.module('mm.addons.mod_scorm')

$scope.icon = $mmCourse.getModuleIconSrc('scorm');
$scope.title = module.name;
$scope.class = 'mma-mod_scorm-handler';
$scope.buttons = [downloadBtn, refreshBtn];
$scope.spinner = true; // Show spinner while calculating status.

Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_survey/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ angular.module('mm.addons.mod_survey')
return function($scope) {
$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('survey');
$scope.class = 'mma-mod_survey-handler';
$scope.action = function(e) {
if (e) {
e.preventDefault();
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_url/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ angular.module('mm.addons.mod_url')
return function($scope) {
$scope.icon = $mmCourse.getModuleIconSrc('url');
$scope.title = module.name;
$scope.class = 'mma-mod_url-handler';
$scope.action = function(e) {
if (e) {
e.preventDefault();
Expand Down
1 change: 1 addition & 0 deletions www/addons/mod_wiki/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ angular.module('mm.addons.mod_wiki')

$scope.title = module.name;
$scope.icon = $mmCourse.getModuleIconSrc('wiki');
$scope.class = 'mma-mod_wiki-handler';
$scope.buttons = [downloadBtn, refreshBtn];
$scope.spinner = true; // Show spinner while calculating status.

Expand Down
2 changes: 2 additions & 0 deletions www/addons/notes/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ angular.module('mm.addons.notes')

// Button title.
$scope.title = 'mma.notes.addnewnote';
$scope.class = 'mma-notes-add-handler';

$ionicModal.fromTemplateUrl('addons/notes/templates/add.html', {
scope: $scope,
Expand Down Expand Up @@ -228,6 +229,7 @@ angular.module('mm.addons.notes')
return function($scope, $state) {
$scope.icon = 'ion-ios-list';
$scope.title = 'mma.notes.notes';
$scope.class = 'mma-notes-view-handler';
$scope.action = function($event, course) {
$event.preventDefault();
$event.stopPropagation();
Expand Down
1 change: 1 addition & 0 deletions www/addons/notifications/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ angular.module('mm.addons.notifications')
$scope.icon = 'ion-ios-bell';
$scope.title = 'mma.notifications.notifications';
$scope.state = 'site.notifications';
$scope.class = 'mma-notifications-handler';
};
};

Expand Down
1 change: 1 addition & 0 deletions www/addons/participants/services/handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ angular.module('mm.addons.participants')
return function($scope, $state) {
$scope.icon = 'ion-person-stalker';
$scope.title = 'mma.participants.participants';
$scope.class = 'mma-participants-handler';
$scope.action = function($event, course) {
$event.preventDefault();
$event.stopPropagation();
Expand Down
1 change: 1 addition & 0 deletions www/core/components/course/services/content_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ angular.module('mm.core.course')
return function($scope, $state) {
$scope.icon = $mmCourse.getModuleIconSrc(module.modname);
$scope.title = module.name;
$scope.class = 'mm-course-default-handler mm-course-module-' + module.modname + '-handler';

$scope.action = function(e) {
$state.go('site.mm_course-modcontent', {module: module});
Expand Down
1 change: 1 addition & 0 deletions www/core/components/course/services/courses_nav_handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ angular.module('mm.core.course')
return function($scope, $state) {
$scope.icon = 'ion-briefcase';
$scope.title = 'mm.course.contents';
$scope.class = 'mm-course-handler';

$scope.action = function(e, course) {
$state.go('site.mm_course', {courseid: course.id});
Expand Down
2 changes: 1 addition & 1 deletion www/core/components/course/templates/section.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2><mm-format-text watch="true">{{ section.name }}</mm-format-text></h2>
<mm-format-text class="mm-content-with-float">{{ section.summary }}</mm-format-text>
</div>

<a class="item item-text-wrap" ng-repeat="module in section.modules" ng-click="action($event)" ng-class="{'item-button-right': buttons && buttons.length > 0, 'item-media': icon, 'item-completion': module.completionstatus}" ng-controller="module._controller" title="{{ title }}">
<a class="item item-text-wrap mm-course-module-handler {{class}}" ng-repeat="module in section.modules" ng-click="action($event)" ng-class="{'item-button-right': buttons && buttons.length > 0, 'item-media': icon, 'item-completion': module.completionstatus}" ng-controller="module._controller" title="{{ title }}">

<img ng-src="{{ icon }}" alt="" role="presentation" ng-if="icon">
<mm-format-text watch="true">{{ title }}</mm-format-text>
Expand Down
2 changes: 1 addition & 1 deletion www/core/components/courses/templates/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ <h2><mm-format-text watch="true">{{course.fullname}}</mm-format-text></h2>
</p>
</div>
<div class="item tabs tabs-icon-left" ng-show="course._handlers && course._handlers.length">
<a ng-repeat="handler in course._handlers | orderBy:'-priority'" ng-controller="handler.controller" ng-click="action($event, course)" class="tab-item active" title="{{title | translate}}">
<a ng-repeat="handler in course._handlers | orderBy:'-priority'" ng-controller="handler.controller" ng-click="action($event, course)" class="tab-item active mm-courses-handler {{class}}" title="{{title | translate}}">
<i class="icon {{icon}}"></i> {{title | translate}}
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion www/core/components/courses/templates/viewresult.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ <h2><mm-format-text watch="true">{{course.fullname}}</mm-format-text></h2>
<p>{{ 'mm.courses.notenrollable' | translate }}</p>
</div>
<div class="item tabs tabs-icon-left" ng-show="course._handlers && course._handlers.length">
<a ng-repeat="handler in course._handlers | orderBy:'-priority'" ng-controller="handler.controller" ng-click="action($event, course)" class="tab-item active" title="{{title | translate}}">
<a ng-repeat="handler in course._handlers | orderBy:'-priority'" ng-controller="handler.controller" ng-click="action($event, course)" class="tab-item active mm-courses-handler {{class}}" title="{{title | translate}}">
<i class="icon {{icon}}"></i> {{title | translate}}
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions www/core/components/sidemenu/templates/menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ <h2>{{siteinfo.fullname}}</h2>
<ion-content class="has-side-menu-header mm-sidemenu-menu">
<nav>
<ul class="list dark">
<li>
<li class="mm-mycourses-handler">
<a menu-close class="item item-icon-left" ui-sref="site.mm_courses" title="{{ 'mm.sidemenu.mycourses' | translate}}">
<i class="icon ion-ionic"></i>{{ 'mm.sidemenu.mycourses' | translate}}
</a>
</li>
<li class="item text-center" ng-if="(!handlers || !handlers.length) && !areNavHandlersLoaded()">
<ion-spinner></ion-spinner>
</li>
<li ng-repeat="handler in handlers | orderBy:'-priority'" ng-controller="handler.controller" >
<li ng-repeat="handler in handlers | orderBy:'-priority'" ng-controller="handler.controller" class="mm-sidemenu-handler {{class}}">
<a menu-close class="item item-icon-left" ui-sref="{{state}}" title="{{title | translate}}">
<i class="icon {{icon}}"></i> {{title | translate}}
<span ng-show="badge > 0" class="badge badge-positive">{{badge}}</span>
Expand Down
2 changes: 1 addition & 1 deletion www/core/components/user/templates/profile.html
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ <h2>{{ 'mm.user.description' | translate}}</h2>
<div class="item text-center" ng-if="(!profileHandlers || !profileHandlers.length) && isLoadingHandlers">
<ion-spinner></ion-spinner>
</div>
<div ng-repeat="handler in profileHandlers | orderBy:'-priority'" ng-controller="handler.controller">
<div ng-repeat="handler in profileHandlers | orderBy:'-priority'" ng-controller="handler.controller" class="mm-user-profile-handler {{class}}">
<a class="button button-block" ng-click="action($event)" ng-hide="hidden" title="{{ title | translate }}">
{{ title | translate }} <ion-spinner class="icon" ng-if="spinner"></ion-spinner>
</a>
Expand Down