diff --git a/lib/amd/build/ajax.min.js b/lib/amd/build/ajax.min.js index 936d338c377..96fcee8fbe6 100644 --- a/lib/amd/build/ajax.min.js +++ b/lib/amd/build/ajax.min.js @@ -1 +1 @@ -define(["jquery","core/config"],function(a,b){var c=function(a){var b,c,d=this,e=null,f=0;for(f=0;f * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -define(['jquery', 'core/ajax', 'core/notification', 'core/log'], function($, Ajax, Notification, Log) { +define(['jquery', 'core/ajax', 'core/notification'], function($, Ajax, Notification) { /** * Retrieve a list of messages from the server. * @@ -72,9 +72,7 @@ define(['jquery', 'core/ajax', 'core/notification', 'core/log'], function($, Aja var promise = Ajax.call([request])[0]; - promise.fail(function(e) { - Log.error('Could not retrieve unread message count: ' + e.message); - }); + promise.fail(Notification.exception); return promise; }; diff --git a/message/output/popup/amd/build/notification_repository.min.js b/message/output/popup/amd/build/notification_repository.min.js index beb592ec1cc..6d076df7bf4 100644 --- a/message/output/popup/amd/build/notification_repository.min.js +++ b/message/output/popup/amd/build/notification_repository.min.js @@ -1 +1 @@ -define(["core/ajax","core/notification","core/log"],function(a,b,c){var d=function(c){"undefined"==typeof c.limit&&(c.limit=20),"undefined"==typeof c.offset&&(c.offset=0);var d={methodname:"message_popup_get_popup_notifications",args:c},e=a.call([d])[0];return e.fail(b.exception),e},e=function(b){var d={methodname:"message_popup_get_unread_popup_notification_count",args:b},e=a.call([d])[0];return e.fail(function(a){c.error("Could not retrieve notifications count: "+a.message)}),e},f=function(c){var d={methodname:"core_message_mark_all_notifications_as_read",args:c},e=a.call([d])[0];return e.fail(b.exception),e},g=function(c,d){var e={messageid:c};d&&(e.timeread=d);var f={methodname:"core_message_mark_message_read",args:e},g=a.call([f])[0];return g.fail(b.exception),g};return{query:d,countUnread:e,markAllAsRead:f,markAsRead:g}}); \ No newline at end of file +define(["core/ajax","core/notification"],function(a,b){var c=function(c){"undefined"==typeof c.limit&&(c.limit=20),"undefined"==typeof c.offset&&(c.offset=0);var d={methodname:"message_popup_get_popup_notifications",args:c},e=a.call([d])[0];return e.fail(b.exception),e},d=function(c){var d={methodname:"message_popup_get_unread_popup_notification_count",args:c},e=a.call([d])[0];return e.fail(b.exception),e},e=function(c){var d={methodname:"core_message_mark_all_notifications_as_read",args:c},e=a.call([d])[0];return e.fail(b.exception),e},f=function(c,d){var e={messageid:c};d&&(e.timeread=d);var f={methodname:"core_message_mark_message_read",args:e},g=a.call([f])[0];return g.fail(b.exception),g};return{query:c,countUnread:d,markAllAsRead:e,markAsRead:f}}); \ No newline at end of file diff --git a/message/output/popup/amd/src/notification_repository.js b/message/output/popup/amd/src/notification_repository.js index 093238a9249..2fdb83ea6d0 100644 --- a/message/output/popup/amd/src/notification_repository.js +++ b/message/output/popup/amd/src/notification_repository.js @@ -22,7 +22,7 @@ * @copyright 2016 Ryan Wyllie * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ -define(['core/ajax', 'core/notification', 'core/log'], function(Ajax, Notification, Log) { +define(['core/ajax', 'core/notification'], function(Ajax, Notification) { /** * Retrieve a list of notifications from the server. * @@ -64,9 +64,7 @@ define(['core/ajax', 'core/notification', 'core/log'], function(Ajax, Notificati var promise = Ajax.call([request])[0]; - promise.fail(function(e) { - Log.error('Could not retrieve notifications count: ' + e.message); - }); + promise.fail(Notification.exception); return promise; };