736 Commits

Author SHA1 Message Date
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
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
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
Mark Nelson
d4b2c195e1 MDL-54682 core: build amd modules 2016-10-11 14:39:24 +08:00
Jake Dallimore
d5553254e9 MDL-56010 libraries: Upgrade loglevel.js to 1.4.1 - post-import changes 2016-10-03 12:25:42 +08:00
Dan Poltawski
8a28a2a393 Merge branch 'MDL-56013-master' of git://github.com/lameze/moodle 2016-09-27 17:30:02 +01:00
Damyon Wiese
63e4df60f6 MDL-55839 behat: Behat fixes for theme_noname
This is a squash of many small fixes.
The list of changes are:

Initial set of behat selectors overrides required for new theme.

set core behat selectors if not overridden by theme

Remove pause

Fix for checkboxes not saving properly

Custom override for click in the user menu

Fix for behat guessing the field type.

Behat fix for guessing the correct field type.

Fix for missing closeElementBefore mforms mess.

Fix for textareas not displaying their contents.

Fix availability form element

Fix action menu selectors for activities in a course page

Fix textareas not retaining their values

Fix selector for blocks

I had to change the single select template to use an input instead of a button because of a
behat bug we have not tracked down yet.

Fix for frozen attribute in form elements

Use input instead of button while behat is still broken

Fix for navigation selector override

Behat selector fixes and multi-select fixes for templated select

Fix for configure blocks selector + booleans for autocomplete

Fixes for course_summary behat tests

Allow optgroups in single_select

Behat fixes for block_navigation

Fixes for url form element and activity chooser selectors

blocks_social - fix specific selector for behat

Fix export_for_template for selectgroups element.

Dont set empty id on the form

Fix direct call to behat_navigation in backup context

Checkbox empty value fix

Fix for assign grading panel popouts

file picker overrides to find a file manager in the page

Fix chat tests to use element name

Make selectors in mod_data behat less specific

MDL-55839: recent activity behat test relies on time()

SQUASH Honour mform element "class" attribute on the container

SQUASH Fixes for behat in mod_forum

SQUASH search form template showing value as text next to the button

SQUASH undo double selectgroup fix

SQUASH - The slightly different structure to action menus breaks course drag and drop

SQUASH Wrap loading icon in a span so the selector still works.

SQUASH Fix fragile javascript in report_loglive

SQUASH Fix tabtree, and selectgroups for mod_feedback

Also - do-not enhance the action menu - we are dropping support for this.

SQUASH Fix filemanager selector and pix_icon template for mod_forum tests.

SQUASH Fixes to breadcrumb and add formid to single select (fixes mod_glossary tests)

SQUASH lesson behat fixes. 95% of lesson styles were rubbish so they were disgarded.

SQUASH Fix lti behat tests - they were cheating and using a context step from quiz

SQUASH Behat fixes for quiz with new theme

SQUASH behat fixes for mod_wiki

SQUASH Workshop behat fixes

SQUASH Frozen form elements cannot use a readonly form element because it screws with the form JS "disabledIf" stuff.

SQUASH Fixes for grades behat tests

SQUASH behat fixes for groups

SQUASH blacklist action menu tests

SQUASH Fix for tag form element missing "manage standard tags" link

SQUASH Incomplete fixes for course behat tests

SQUASH behat fixes for badges

SQUASH Tags fixes for behat

SQUASH filepicker fixes for behat

SQUASH Abort guessing field type when we hit 'html'

SQUASH Fix for admin/tool/behat tests

SQUASH fix for admin tool behat tests

SQUASH fix for availabilty conditions hiding "aria-hidden" elements

SQUASH give the blocks more room. We get behat files because nav tree nodes are not in view

SQUASH Blocks fixed

Fix behaviour of unchecked checkboxes

SQUASH Remove incorrect step in user test

SQUASH behat fixes for course tests

Part of MDL-55071
2016-09-23 10:55:16 +01:00
Damyon Wiese
91bda4cd45 MDL-55417 forms: Render form elements with a template
This change allows form elements to be overridden with a mustache template.
The template can even listen for form validation errors and supply the JS to
change the look of the form element when there is/isn't a validation error.

Initial support is for all core form elements including:

text, select, selectyesno and checkboxes, groups, dateselector, datetimeselector,
autocomplete, modvisible, advcheckbox, button, duration, filemanager, filepicker, editor, static, grading,
warning, textarea, password, url, submit, questioncategory, recaptcha.

Part of MDL-55071
2016-09-23 10:53:30 +01:00
Simey Lameze
e38239b487 MDL-56013 lib: Upgrade Chart.js to version 2.2.2 2016-09-21 08:25:13 +08:00
Ryan Wyllie
2bcef5594a MDL-55727 javascript: Add modal module 2016-09-13 02:44:30 +00:00
Eloy Lafuente (stronk7)
a1a564c84a Merge branch 'MDL-55717_master' of git://github.com/markn86/moodle 2016-09-05 18:01:21 +02:00
Dan Poltawski
9dd516c432 Merge branch 'MDL-55771_master' of git://github.com/markn86/moodle 2016-09-05 10:18:53 +01:00
Marina Glancy
6f9f8b59fa MDL-55665 charts: correction to stacked bar charts 2016-09-01 09:17:36 +08:00
Mark Nelson
8354d12d39 MDL-55771 core: added title attribute when using JS to render {{pix}} 2016-08-30 14:49:44 +08:00
Simey Lameze
b02e738c4f MDL-55710 core: Add support for doughnut charts 2016-08-26 13:30:02 +08:00