Commit Graph

22 Commits

Author SHA1 Message Date
Mark Nelson d2eb1ca91e MDL-62889 message_popup: only add redirecturl if it exists
We allow notifications to have a null value for the 'contexturl'.
In this case we should not be appending a 'redirecturl' param to
the URL when it is going to be empty.
2018-07-17 11:44:41 +08:00
Mark Nelson 4f6cb2ee77 MDL-62658 message_popup: fixed issue with malformed URL being generated 2018-06-18 14:27:54 +08:00
cescobedo 84e03ed859 MDL-57968 core_message: Remove multiple unnecessary AJAX requests
Remove AJAX requests core_message_get_unread_conversations_count and
message_popup_get_unread_popup_notification_count and
render the unread messages and notifications into mustache template.
2018-06-06 01:02:00 +02:00
Michael Hawkins 105974cd08 MDL-56498 message: Ensure clicked notifications are marked read 2018-05-16 14:59:06 +08:00
Mark Nelson 3f3e453632 MDL-36941 message_popup: use new WS for marking notifications as read
Also changed the observer to listen for the notification_viewed event,
rather than the message_viewed event.
2018-03-23 12:30:28 +08:00
Carlos b999cee9a5 MDL-60547 message_popup: adding preventDefault at notification popover 2018-02-21 22:51:02 +01:00
Dan Poltawski d9dff92fef MDL-59761 eslint: Auto-fix some minor lint warnings 2017-09-06 08:53:50 +01:00
Neill Magill 5b40aaa5e4 MDL-59515 messages: arguments behave differently with single promise
Seems that objects are not borked by when in the same way as arrays when
there is only a single promise.
2017-07-19 11:52:15 +01:00
Neill Magill 6e594ff687 MDL-59515 messages: arguments behave differently with single promise
When only a single promise is passed the returned array is flattened.
2017-07-19 10:10:25 +01:00
Neill Magill a5fbe27d8e MDL-59515 messages: Order of popup messages should be predictable
Before this change the messages in the message popup would be loaded
onto a page in a random order, based on the speed at which the user's
browser was able to render each template.

This causes the messages to be attached to the page sequentially, after
they have all been rendered asynchronously.
2017-07-14 15:50:48 +01:00
John Okely 46f68f026e MDL-58310 message: No longer need to supress errors from messaging 2017-06-19 09:34:34 +08:00
Dan Poltawski 50c277a5d8 MDL-57139 js: built 2017-06-01 14:54:40 +01:00
Dan Poltawski 877d997fe1 MDL-57139 messages/notifications: ensure promise best practices
Previously there were a few issues with the code

* We were capturing a promise without then then .then() that came after
  it, so our promise wouldn't always be completely resolved by the time
  then next piece of code was operating on it

* We weren't catching all errors with .catch()
2017-06-01 10:27:58 +01:00
Marina Glancy fde2e5b1a7 MDL-58452 ajax: do not show popup when can't retrieve the message count 2017-04-07 16:05:19 +08:00
Dan Poltawski b580f39556 Merge branch 'MDL-56403_master' of git://github.com/markn86/moodle 2016-10-25 09:27:42 +01:00
Mark Nelson f9408b6dd7 MDL-56403 message_popup: removed unnecessary sesskey from URL 2016-10-20 17:42:10 +08:00
Ryan Wyllie 65be5b6c11 MDL-56355 message: add keyboard nav to notification page 2016-10-19 03:05:33 +00:00
Mark Nelson d4b2c195e1 MDL-54682 core: build amd modules 2016-10-11 14:39:24 +08:00
Ryan Wyllie 963ba88970 MDL-56234 message: fix messaging UI in theme boost 2016-10-11 14:39:24 +08:00
Ryan Wyllie 641b36e2ab MDL-56292 message: move notifications page into popup plugin 2016-10-11 14:39:23 +08:00
Ryan Wyllie 9f7b7b7c88 MDL-56292 message: fix style for notification popover and page 2016-10-11 14:39:23 +08:00
Ryan Wyllie 7d69958e6b MDL-56292 message: move popover code into output plugin 2016-10-11 14:39:23 +08:00