227 Commits

Author SHA1 Message Date
Ryan Wyllie
e03d5d4790 MDL-57445 core: allow context variables in pix helper
Allow the user of context variables in the id and component section of
the pix helper.

Part of MDL-55611 epic.
2017-04-03 11:35:37 +08:00
Dan Poltawski
dca0ea03b1 Merge branch 'MDL-58317-master' of git://github.com/damyon/moodle 2017-03-21 08:03:42 +00:00
Damyon Wiese
8626dc99fa MDL-40759 fontawesome: Add BC for unmapped icons
This is yukky but it works. Note: I had to duplicate the standard pix icon template
inside the font-awesome one because the way this is rendered does not support partials.
2017-03-20 13:47:30 +08:00
Damyon Wiese
f4e623b3e7 MDL-58317 templates: Fix async template render
There is an edge case where we do not wait for all promises before
rendering a template. This can generate "failed to pre-fetch the template" JS errors.
2017-03-20 13:29:09 +08:00
Damyon Wiese
42d4689c65 MDL-40759 fontawesome: Minor cleanups
Remove eslint hints that are not required and revert changes to the
behat test for recycle bin that are not needed.
2017-03-17 15:52:46 +08:00
Damyon Wiese
b9b409cfc3 MDL-40759 icons: Peer review fixes (all minor) 2017-03-17 15:52:46 +08:00
Damyon Wiese
1caabd8468 MDL-40759 icons: Keep separate alt/title
For font awesome icons I had only supported one of alt/title. This was because (subjectively) we have
done a terrible job of providing meaningful alt text for icons. This is not a good idea and not backwards
compatible so I have put it back again.

Fingers crossed I did not break 1000 behats.
2017-03-17 15:52:18 +08:00
Damyon Wiese
8857c715d1 MDL-40759 icons: Behat fixes for font-awesome 2017-03-17 15:52:18 +08:00
Damyon Wiese
e330b1c214 MDL-40759 icons: Refactor to allow theme icon systems 2017-03-17 15:52:18 +08:00
Damyon Wiese
7776c9e112 MDL-40759 icons: Fix when icon map comes from cache 2017-03-17 15:52:17 +08:00
Damyon Wiese
95b06c13c6 MDL-40759 icons: Refactor icon system to be extensible. 2017-03-17 15:51:29 +08:00
Andrew Nicols
e2310e4361 Merge branch 'MDL-57975-master' of git://github.com/ryanwyllie/moodle 2017-03-10 18:04:42 +00:00
Ryan Wyllie
0e5b3e282f MDL-57975 javascript: add userdate mustache js helper
Part of MDL-55611
2017-03-08 03:33:24 +00:00
Ryan Wyllie
b61015cfcd MDL-57975 javascript: add user_date.js
Part of MDL-55611
2017-03-08 03:33:23 +00:00
David Monllao
68aab93ea5 Merge branch 'MDL-57280-master' of git://github.com/ryanwyllie/moodle 2017-03-07 13:13:51 +01:00
Ryan Wyllie
75378ded5f MDL-57972 mustache: add shortentext template helper
Part of MDL-55611
2017-03-07 06:33:56 +00:00
Ryan Wyllie
180f5f23a6 MDL-57972 javascript: add upgrade instructions for truncate.js
Part of MDL-55611
2017-03-07 06:33:56 +00:00
Ryan Wyllie
7172b33e24 MDL-57972 javascript: Change truncate.js behaviour
Updated truncate.js to behave closer to the moodle implementation of
shorten_text.

Part of MDL-55611
2017-03-07 05:22:38 +00:00
Ryan Wyllie
d74d91f49a MDL-57972 javascript: Add truncate.js third party lib
Part of MDL-55611
2017-03-07 05:22:34 +00:00
Ryan Wyllie
b6563dcfc3 MDL-57975 javascript: add sessionstorage.js
Part of MDL-55611
2017-03-07 01:29:13 +00:00
Ryan Wyllie
0531ce1a29 MDL-57280 javascript: add modal registry
Add a modal registry for the types and make the factory use it to allow
code to register modal types at run time and use the factory for
non-core modals.
2017-02-27 01:05:44 +00:00
Dan Poltawski
cf8c463de6 Merge branch 'MDL-57009-master' of git://github.com/damyon/moodle 2017-02-07 12:32:34 +00:00
Damyon Wiese
3d6ae65b61 MDL-57009 javascript: Reject on all errors
Not all error paths were resulting in a reject() call to fail a promise.
2017-02-07 15:36:48 +08:00
Damyon Wiese
f3cd5c5b7b MDL-57009 javascript: Always use when.apply
Or it does not really wait for the promises.
2017-02-07 15:03:43 +08:00
Eloy Lafuente (stronk7)
f65a48c50e Merge branch 'MDL-53349-master' of https://github.com/xow/moodle 2017-02-06 16:06:25 +01:00
Damyon Wiese
b302369d17 MDL-57009 javascript: cibot nagging 2017-02-02 15:54:19 +08:00
Damyon Wiese
39bf2a985b MDL-57009 javascript: Dont rely on async ajax
Recursively pre-scan mustache templates to extract the list of blocks and partials. Then
we can pre-fetch them all and don't have to rely on jquery async ajax (which is deprecated).

This is part of a refactoring of the promises code in the templates module to prevent duplicate requests.
2017-02-02 15:54:19 +08:00
Damyon Wiese
f20a336b43 MDL-57009 js: Do not fetch the same template twice
Also clean up promises use of done vs then.
2017-02-02 15:54:19 +08:00
Damyon Wiese
dcdf7c6155 MDL-57009 js: Skip ajax request for same string
This is done by caching the first promise generated to fetch a string.
2017-02-02 15:54:19 +08:00
Nadav Kavalerchik
e375029ea0 MDL-53349 Autocomplete: Support multi lingual COMMA keycode (44) 2017-02-01 16:00:41 +08:00
Dan Poltawski
e7ecb4a90f MDL-57690 js: fix core modal uses in amd
Converting the uses to the AMD modules is a bit risky for now, instead
just require the YUI depdency.
2017-01-26 11:28:59 +00:00
Simey Lameze
7d17256a75 MDL-57194 core_charts: Allow colors to be overridden by setting 2016-12-01 14:44:00 +08:00
Damyon Wiese
be2247fb24 MDL-56586 blocks: Do the addblock in a modal 2016-11-24 14:24:59 +08:00
Damyon Wiese
9d44510d60 MDL-57100 JS: Exceptions give exceptions
Exceptions returned from ajax are not in the format expected by the JS, so
an error occurs and the exception popups are not appearing.
2016-11-23 18:07:26 +00:00
Damyon Wiese
52a51514f6 MDL-56683 theme_boost: Popovers on dynamic content 2016-11-22 10:28:25 +08:00
Mark Nelson
ffd7798c96 MDL-56139 core: changes after peer review
- No longer use the Fibonacci sequence for delaying the timeout.
  It is too aggressive.
- The backoff_timer AMD module now expects the callback AND the
  backoff function to be passed to the constructor.
- Added ability to specify polling frequency in config.php.
- Added helper function to return the cache key.
- Reworded the parameters for clarity.
2016-11-16 10:22:52 +08:00
Ryan Wyllie
fb1469d84f MDL-56139 message: ajax poll for new messages in message area 2016-11-16 10:22:33 +08:00
Simey Lameze
cff1f90adf MDL-56792 core_charts: clean html content from title and labels
This commit add cleanData() and call it from all places that has labels or title
to guarantee that html content will not be printed on the chart.
2016-11-09 10:41:12 +08:00
Simey Lameze
fd5797aa3b MDL-55799 inplace_editable: add form-control class to fields 2016-10-28 15:04:54 +08:00
Andrew Nicols
ab00bf59a5 Merge branch 'MDL-56341-master' of git://github.com/damyon/moodle 2016-10-24 10:11:20 +08:00
Frédéric Massart
a89cf23744 MDL-56341 mustache: JS engines handles strings wrapped in quote
Prior to the patch the strings wrapped as the following one
where not found and replaced when rendering the template via Javascript

{{#quote}}{{#str}}string,component{{/str}}{{/quote}}
2016-10-20 12:13:42 +08:00
Dan Poltawski
c8303131be Merge branch 'MDL-54682_master' of git://github.com/markn86/moodle 2016-10-11 12:53:11 +01:00
Mark Nelson
d4b2c195e1 MDL-54682 core: build amd modules 2016-10-11 14:39:24 +08:00
Ryan Wyllie
a92eda4b26 MDL-56292 core: make popover region event bindings on open 2016-10-10 12:48:52 +08:00
Ryan Wyllie
2d552f37b8 MDL-56292 core: auto_rows should fire event on element 2016-10-10 12:48:52 +08:00
Dan Poltawski
e4edbce35d MDL-55835 js: fix lint issues
Some caused by eslint checks being better, some just not detected
because we don't show warnings well (MDL-54930).
2016-10-07 10:03:43 +01:00
Dan Poltawski
00c714f05c MDL-55835 eslint: bump to v3.7.1
1) Bump eslint verson in npm
2) Enable tabs rule introduced in 3.2.0
3) With rules deprecated in 3.3.0 to their replacements
   http://eslint.org/blog/2016/08/eslint-v3.3.0-released
4) Deprecate the use of M.str (fixes MDLSITE-3646) with new
   no-restricted-properties introduced in 3.5.0
5) Fixup no-unused-vars - remove argsIgnorePattern which shouldn't have allowed
   partial matches and turns out to be uncesssary
   (detected because of https://github.com/eslint/eslint/issues/7250 in 3.6.0)
2016-10-07 10:00:26 +01:00
Ryan Wyllie
a038fcf5d6 MDL-55635 message: create notifications page 2016-10-07 16:37:56 +08:00
Mark Nelson
7b55aaa12e MDL-55942 core: obey the mighty CiBoT 2016-10-07 16:26:40 +08:00
Ryan Wyllie
10ea82701a MDL-55972 core: add confirmation modal 2016-10-07 16:26:40 +08:00