418 Commits

Author SHA1 Message Date
Andrew Nicols
3e35647f3f Merge branch 'MDL-65751-master' of git://github.com/mihailges/moodle 2019-07-17 15:22:27 +08:00
Andrew Nicols
d744d8fd2c Merge branch 'MDL-65758' of git://github.com/Chocolate-lightning/moodle 2019-07-17 15:20:15 +08:00
Mihail Geshoski
a6c735031a MDL-65751 lib: Replace deprecated jQuery functions 2019-07-17 09:59:44 +08:00
Andrew Nicols
c8898e74a1 Merge branch 'MDL-65794_master' of git://github.com/markn86/moodle 2019-07-16 14:26:55 +08:00
Mark Nelson
e81107fa25 MDL-65794 core: use themerev as the cache key when getting font icons 2019-07-16 14:23:34 +08:00
Mark Nelson
76669f0f51 MDL-65794 core: use langrev as the cache key when getting strings 2019-07-16 14:23:34 +08:00
Mark Nelson
3f7360f07d MDL-65794 core: use themerev as the cache key when getting templates 2019-07-16 14:23:34 +08:00
Mark Nelson
6a1ad7c677 MDL-65794 core: allow ajax calls to specify a cache key
This allows for better caching capabilities on servers. If a
cache key is passed and the web service call does not require
the user to be logged in we will attempt to use GET for the
request. This allows for things like proxy caching on URLs.
The cache key must be changed if we do not want to retrieve
what has been cached and want to perform the request again.
2019-07-16 14:23:34 +08:00
Andrew Nicols
ce4e052209 Merge branch 'MDL-60013-master' of git://github.com/junpataleta/moodle 2019-07-16 14:21:18 +08:00
Jun Pataleta
c5681f7ff1 MDL-60013 amd: Final removal of core/modal_confirm 2019-07-15 13:37:01 +08:00
Jun Pataleta
05b25140d0 MDL-65928 core: Use 'starts with' for non-exact toggle group matching
* Use the 'starts with' selector when matching toggle groups by name in
  non-exact mode to avoid potential conflicts with other toggle groups.
* Note down the required data attributes for JS in the template
  documentations.
* Add a note of this output component in upgrade.txt.
* Add doc blocks for the core/checkbox-toggleall attributes and methods.
2019-07-12 16:33:29 +08:00
Jun Pataleta
5943fc3f95 MDL-65928 core: Render master element as button too 2019-07-12 14:36:35 +08:00
Jun Pataleta
0a3d306358 MDL-65928 core_amd: Let checkboxes belong to multiple toggle groups 2019-07-12 14:36:35 +08:00
Jun Pataleta
686ab8cc74 MDL-65928 core_amd: Add support for action elements
Enable/disable action elements that are associated with the toggle
group.
2019-07-12 14:36:35 +08:00
Mark Nelson
7fa4e41052 MDL-65794 core: no need for sesskey when login not required 2019-07-12 13:03:43 +08:00
Mathew May
d712127f34 MDL-65758 library: Add Moodle modifications for Mustache 2019-06-12 13:34:27 +08:00
Mathew May
a5410e13bf MDL-65758 library: Update mustache.js to 3.0.1 2019-06-12 10:58:58 +08:00
Kristian Ringer
6c97045e5e MDL-65183 block_timeline: escape newline characters 2019-06-07 09:37:34 +10:00
Damyon Wiese
00fd749041 MDL-34498 session: Do not extend expired session
After showing a warning, if the "extend session" button is clicked too late,
tell them their session is expired so they can collect any unsaved data in the page.
2019-06-06 09:35:35 +08:00
Damyon Wiese
7aeeb44463 MDL-34498 session: Add a checker to warn before session expiry
Replaces old yui module checknet.
2019-06-06 09:31:01 +08:00
Shamim Rezaie
f12bc65f1d MDL-64523 core_access: replace .delegate with .on
As of jQuery 3.0, .delegate() has been deprecated. It was superseded by
the .on() method since jQuery 1.7, so its use was already discouraged.
2019-05-25 04:23:41 +10:00
Shamim Rezaie
b1078b18c8 MDL-64523 core_access: Fix js racing issue when overriding permissions 2019-05-25 04:23:33 +10:00
Shamim Rezaie
6786f6b6cc MDL-64523 core_access: Improve the title of the delete role links 2019-05-25 04:08:56 +10:00
Jun Pataleta
cb7263feb0 Merge branch 'MDL-64573-master' of git://github.com/damyon/moodle 2019-04-26 10:50:55 +08:00
Damyon Wiese
260565e305 MDL-64573 output: ajax form event
Add an event that can be fired when an mform is about to be submitted via ajax.
This allows custom field types to perform an action when the form is submitted.

The atto text editor will reset any autosaves when the form is submitted.
2019-04-24 16:17:49 +08:00
David Monllaó
906800a082 Merge branch 'MDL-65102-master' of git://github.com/rezaies/moodle 2019-04-23 13:42:37 +02:00
Damyon Wiese
cdc7390446 MDL-64331 modals: Be careful closing modals
Don't close a modal when the user clicks outside of it and the modal contains a form.
2019-04-02 10:02:26 +08:00
Shamim Rezaie
072a033a79 MDL-65102 core_form: autocomplete element to handle submit event 2019-03-27 19:00:27 +11:00
Simey Lameze
545e2abb91 MDL-63244 core: make mustache retrieve language 2019-03-19 15:03:51 +08:00
Marina Glancy
76f2d89471 MDL-10965 course: search only courses with completion
it is quite often when we need to have an autocomplete element that searches courses that
have completion enabled. This commit adds an option for the 'course' form element, and also
changes two places where we search for courses with completion. This should fix MDL-58989
2019-04-10 12:35:29 +02:00
Damyon Wiese
b0d4560634 MDL-64819 output: Hide icons with no title
When output from javascript they should match what gets output from php.
2019-04-08 14:34:15 +02:00
Eloy Lafuente (stronk7)
e3d78a7c8d Merge branch 'MDL-63937-master' of https://github.com/HuongNV13/moodle 2019-03-06 13:30:39 +01:00
Andrew Nicols
507d05f6e3 Merge branch 'MDL-64376-master-2' of git://github.com/ryanwyllie/moodle 2019-02-27 11:51:14 +08:00
Ryan Wyllie
3edde4fbe8 MDL-64376 recentlyaccessedcourses: improve displaying of courses 2019-02-27 10:58:02 +08:00
Davo Smith
08163b2067 MDL-52167 admin: display dependencies in search results 2019-02-26 15:45:53 +01:00
Davo Smith
d940855f92 MDL-52167 admin: switch hide_if() to use hide() + update upgrade.txt 2019-02-26 15:45:44 +01:00
Davo Smith
8ed3671d4c MDL-52167 admin: now able to show/hide settings based on conditions 2019-02-26 15:45:35 +01:00
Huong Nguyen
efef2efdd6 MDL-63937 autocomplete: Add the indicator when processing the request 2019-02-21 10:08:16 +07:00
Andrew Nicols
df5feea490 MDL-63937 autocomplete: Add a loading icon when fetching via AJAX 2019-02-21 10:08:16 +07:00
Andrew Nicols
270fd3f5e4 MDL-63944 Question: Convert toggle all to generic module 2019-02-15 10:07:08 +07:00
Andrew Nicols
9626e56812 MDL-64835 JS: Reduce cache invalidation checks
The cache invalidation check was previously occuring every time either
the `set` or `get` function was called on the cache. However, the cache
invalidation check is based on the jsrev which is static for the
lifetime of the page.

This change moved the invalidation to happen during the setup of the AMD
module such that it only happens one time per storage type (Local +
Session).
2019-02-13 10:13:05 +08:00
Andrew Nicols
dd663b41bc MDL-64835 JS: Stop using the jsrev in the jsrevPrefix
We only use the jsrevPrefix to determine if the cache should be
invalidated, but the prefix that we were using is based on the new
jsrev.

For example, the jsrevPrefix will be:

    hash(wwwroot + '/ + config.jsrev) + '/jsrev'

Where config.jsrev is the _current_ (new) jsrev.

As a result when searching for the jsrev used to store the data which is
currently in the storage cache, no key is returned, and we instead set
an 'initial' value and the cache is not cleared

This patch changes the jsrevPrefix to be:

    hash(wwwroot) + '/jsrev'

Since the wwwroot does not change, the key remains static for the
current site. As a result, when the jsrev is bumped via a Moodle cache
purge, we are able to correctly fetch the old jsrev from the cache,
determine that the jsrev has changed, and purge the cache.
2019-02-13 10:11:42 +08:00
Eloy Lafuente (stronk7)
3901fd74ba Merge branch 'MDL-64649-master' of https://github.com/felicemcc/moodle 2019-02-04 16:35:22 +01:00
Felice Candilio
c4ddf40612 MDL-64649 amd: Removing underscores from icons in [Roles/Groups] forms 2019-01-31 10:55:53 +01:00
Andrew Nicols
bebb976b99 MDL-62514 behat: Inplace editable pendingjs wrapper 2019-01-30 08:24:32 +08:00
Andrew Nicols
e994dea0b3 MDL-62514 behat: Rewrite handling of autocomplete
This includes a minor restructure of the autocomplete JS to make use of
promises and improve tracking of pending JS.

In particular it improves the way in which throttled text input is
handled to ensure that the behat does not continue until:
- typing is fully complete; and
- all possible ajax requests have been sent; and
- all possible ajax requests complete; and
- the suggestions are updated.

A number of conditions existed where behat would move on to the next
step too early in a race condition effect between Behat and Autocomplete.
2019-01-30 08:24:32 +08:00
Andrew Nicols
024b5c5b9f Merge branch 'MDL-63722-master' of git://github.com/rezaies/moodle 2019-01-08 12:04:19 +08:00
Ryan Wyllie
c77ba4890a MDL-64348 javascript: change template loading to a buffer
Changed the template loading to buffer the requests for templates
so that they can be sent in batches to the server to save large
volumes of network requests.
2019-01-07 09:03:06 +08:00
Ryan Wyllie
2b92891a88 MDL-64348 javascript: change template loading to also load dependencies
Changed the getTemplate function in templates.js to use the
core_output_load_template_with_dependencies function to load the
requested template and all of the dependencies required to render it.

The dependencies are added to the relevant caches so that when the
template is rendered they aren't re-requested from the server.
2019-01-07 09:03:06 +08:00
Ryan Wyllie
fbbed5c603 MDL-64348 javascript: add cache_strings to str.js
Added a function to allow a set of strings to be added to the
str.js caches if they've been loaded outside of that module.
2019-01-07 09:03:06 +08:00