1216 Commits

Author SHA1 Message Date
Dan Poltawski
4e0f7f98ec Merge branch 'MDL-52317' of https://github.com/NeillM/moodle 2016-10-03 16:09:25 +01:00
Dan Poltawski
99fe296eb2 MDL-55168 css: remove 0-length units 2016-09-30 09:25:25 +01:00
Dan Poltawski
aea8eaecde MDL-55168 css: use shorthand colour props when possible 2016-09-30 09:25:24 +01:00
Dan Poltawski
bc33e9bd3f MDL-55168 css: reformat plain css with stylefmt 2016-09-30 09:25:23 +01:00
Neill Magill
c3e1c98f04 MDL-52317 Atto: Large resized images may display scroll bars
When an image was added via Atto and it was set to resize automatically
if the alignment was set to Top, Middle or Bottom when it was made
smaller then a vertical scroll bar would be displayed.

This was caused by the interaction of the margin settings on the image
and the 100% width set via the img-responsive css class. The width of
an element only includes the content area and not any borders, padding
or margins.

This change stops atto hardcoding the styles for image alignment into
the images style tag, it instead adds a class that defines the alignment
the image should have.

This change has the benefit that themers will now be able to adjust
how atto image alignments work if they wish.

Images added before this patch will continue to have the issue
until they are edited by the plugin, at which time their legacy style
will be removed and the new alignment method will be added.

Thanks to Andrew Nicols who provided a refactor for the Alignment
and style detection code.
2016-09-30 08:48:33 +01:00
Frederic Massart
ed7844b5f4 MDL-55224 theme_noname: RTL adjustments for auto-flipping era
Part of MDL-55071
2016-09-23 10:49:49 +01:00
Eloy Lafuente (stronk7)
ddf1d5c692 Merge branch 'MDL-55244-master' of git://github.com/danpoltawski/moodle 2016-07-27 00:19:40 +02:00
David Monllao
1a9c3d587f Merge branch 'wip-MDL-55183-master' of git://github.com/abgreeve/moodle
Conflicts:
	lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js
2016-07-26 09:52:51 +08:00
Dan Poltawski
3a0bc0fdc4 MDL-55244 js: build changes
There should be no changes to minified code
2016-07-25 07:58:05 +01:00
Dan Poltawski
bc8b6dc652 MDL-55244 js: fix various lint warnings in yui
* Incorrect brace style
* Empty functions
* Multiple var statemnts
2016-07-25 07:53:05 +01:00
Dan Poltawski
5bb4f444de MDL-55244 js: fix problems with eslint --fix
eslint --fix '**/yui/src/**/*.js'
2016-07-25 07:53:05 +01:00
Adrian Greeve
b559497393 MDL-54796 forms: Editor restore event created.
The editor restore event is currently being subscribed
to by the change checkers to refresh their savedstate.
2016-07-25 10:42:58 +08:00
Adrian Greeve
c17c25db05 MDL-55183 editor_atto: Fix requires error.
When using a different theme and removing an editor
plugin such as the equation plugin, atto will display
an error about a missing dependency.

A thank you to Anthony Forth for providing this patch.
2016-07-25 09:03:59 +08:00
Dan Poltawski
151aaa2654 Merge branch 'MDL-55012-master' of git://github.com/damyon/moodle 2016-07-18 13:55:50 +01:00
Damyon Wiese
91445c63f8 MDL-55012 Atto: no style attrs on paste
Specifically on paste - we don't need all the random style attributes
from content on the clipboard. When you copy from a webpage - the browser
inlines all the styles from the page so that the pasted content will look
like the place it was copied from. But this is never what you want - you
want the content on paste, but with no special styling.
2016-07-15 13:34:11 +08:00
Eloy Lafuente (stronk7)
5748e56242 Merge branch 'MDL-54671-master' of git://github.com/danpoltawski/moodle 2016-07-12 18:14:17 +02:00
Dan Poltawski
ad3f8cd18c MDL-54944 eslint: make the .eslintrc default stricter
Instead of using the more rollup-tolerant config for all files, make the
configuration stricter by default but lower in grunt for yui modules.

This means that manual runs (prechecker) or editor integrations will
flag up the errors as well as grunt.

Also add ignore lines to the core files so that eslint isn't noisy when
not running with grunt.
2016-07-11 12:44:34 +01:00
Dan Poltawski
d7f2176fd8 MDL-54671 css: fix lint errors 2016-07-08 12:58:54 +01:00
Jake Dallimore
9e12b0faf7 MDL-54795 mod_assign: Fix notifications JS error in grading interface 2016-07-01 13:49:02 +08:00
Dan Poltawski
0fd08fc7e5 Merge branch 'MDL-35628' of https://github.com/mr-russ/moodle 2016-06-16 09:04:12 +01:00
Russell Smith
1fcf0ca8a5 MDL-35628 performance: Remove dirname() where possible.
dirname() is a slow function compared with __DIR__ and using
'/../'.  Moodle has a large number of legacy files that are included
each time a page loads and is not able to use an autoloader as it is
functional code.  This allows those required includes to perform as
best as possible in this situation.
2016-06-10 08:06:49 +10:00
Frederic Massart
240a9de4ab
MDL-48756 editor_atto: Bulk atto autosave queries 2016-06-01 12:49:15 +08:00
Eloy Lafuente (stronk7)
4da854a68b MDL-54677 upgrade: add 3.1.0 separation line to all upgrade scripts 2016-05-23 01:31:34 +02:00
Dan Poltawski
5d84a61419 Merge branch 'MDL-54633-master-tinymce' of git://github.com/mudrd8mz/moodle 2016-05-19 13:00:34 +01:00
David Mudrák
929727e3ef MDL-54633 tinymce: Sync editors' iframe to textarea on form submit
The previous commit "Automatically sync editor with its textarea" was
found a not good solution as the onchange event is triggered way less
often than needed for our needs. So this reverts commit 34321d49.

Instead, we add a hack to the formslib so that when there are some
TinyMCE editors used at the page, we explicitly save them before
triggering the form validation. This simply calls save() on all editors
on the page - see the API reference:
http://archive.tinymce.com/wiki.php/API3:method.tinymce.triggerSave

Having TinyMCE hardcoded like this on this core level does not make me
happy. But it seems to be most effective solution for now (and
definitely more efficient than the previous solution). Plus there is a
precedence - we already use window.tinyMCE in formchangechecker.js YUI
module, for example.
2016-05-19 13:44:41 +02:00
Dan Poltawski
b887c81907 Merge branch 'MDL-54633-master-tinymce' of git://github.com/mudrd8mz/moodle 2016-05-19 09:00:12 +01:00
Eloy Lafuente (stronk7)
1abca11e0a MDL-54638 versions: bump all versions and requires near release
version = 2016052300 release version
requires= 2016051900 current rc1 version
2016-05-19 02:16:15 +02:00
David Mudrák
34321d491b MDL-54633 tinymce: Automatically sync editor with its textarea
Probably as a result of recent changes in the way how forms client side
validators are trigerred (MDL-52826), the field validator has been
triggered before the underlying textarea's values property is updated by
TinyMCE. This led to marking such a field as "required" even if the
value is provided.

Inspired by http://stackoverflow.com/questions/2122085/
this patch adds a new onchange callback that automatically keeps the
underlying textarea synced with the editor iframe. Relevant API docs:
http://archive.tinymce.com/wiki.php/Configuration3x:onchange_callback

I was also trying to call the save() method via the editor's onSubmit
method but that one seems to be also triggered only after the validator.
2016-05-19 00:50:08 +02:00
Panagiotis Nikoloutsopoulos
c3c3c9f28a MDL-52550 atto: Added preventDefaults for events dragover and dragenter 2016-04-21 15:08:20 +08:00
Dan Poltawski
e92a39cf0c Revert "Merge branch 'MDL-52944-master' of git://github.com/cameron1729/moodle"
This reverts commit 61a0465ce76154dbe223649c58c66313e9b510ae, reversing
changes made to 2408f8fe2bf6321592cc1ab5a8db6f9b3c65eb4b.
2016-04-13 10:48:59 +01:00
Dan Poltawski
61a0465ce7 Merge branch 'MDL-52944-master' of git://github.com/cameron1729/moodle 2016-04-12 14:13:36 +01:00
Dan Poltawski
5702a8289b Merge branch 'MDL-52954-master' of git://github.com/damyon/moodle 2016-04-11 09:52:40 +01:00
Cameron Ball
a6a59bcaa4 MDL-52944 atto: Use event-key to handle enter key 2016-04-08 12:25:27 +08:00
Panagiotis Nikoloutsopoulos
92a8ca4ba2 MDL-52944 atto: Contenteditable command 'FormatBlock' set to 'p' 2016-04-08 12:13:23 +08:00
Damyon Wiese
b803df8170 MDL-52954 atto: Stop autosave timer, when editor no-longer exists. 2016-03-30 11:48:40 +08:00
Adrian Greeve
387c8026a5 MDL-50795 atto: Pasting into atto removes background colour style.
Copying from one atto editor to another comes with a lot of style
information. This removes the color attributes which make the page
look ugly when competing with different themes.
2016-03-24 10:53:59 +08:00
Rajesh Taneja
e01012e96d MDL-46891 behat: Driver specific fixes.
1. Browserkit doesn't handle [] in name
2. Grades are not visible in viewport and might fail
   with few drivers, increasing size of window to ensure
   grades are visible and can be modified.
3. Click edit first to see grade link
4. Expand fields before setting value
5. Updated xpath, as crawler update it.
6. Hover fails to show icon
2016-03-11 10:51:16 +08:00
Eric Merrill
1f0d77f7cd MDL-53249 atto: Make sure all editors see end move event 2016-02-25 21:37:16 -05:00
Rajesh Taneja
7b61603406 MDL-52996 Atto: Only check if plugins are loaded
Atto bold using behat with phantomjs doesn't work.
In this case there is no need to test plugin functionality.
Only checking if plugin is loaded in toolbar is sufficient.
2016-02-24 10:09:15 +08:00
Andrew Nicols
0ea14dd849 Merge branch 'MDL-52996-master' of https://github.com/sammarshallou/moodle 2016-02-23 12:44:06 +08:00
Rajesh Taneja
9b4903c8fd MDL-52970 behat: Wait for page to be ready after click
After click enusre to wait so text fields are not
use autosize
2016-02-19 15:23:49 +08:00
Eloy Lafuente (stronk7)
e8c82aac82 MDL-51580 upgrade: clean < 2.7.0 upgrade steps
This just deletes all the upgrade steps previous to 2.7.0. Some
small adjustments, like adding missing MOODLE_INTERNAL or tweaking
globals can also be applied when needed.

Next commit will get rid of/deprecate all the upgradelib functions
not used anymore in codebase.
2016-02-15 18:38:09 +01:00
sam marshall
f66da45fa5 MDL-52996 Atto: Allow plugins to customise toolbar 2016-02-04 12:42:27 +00:00
David Monllao
90902953a8 MDL-52825 atto: Listen to gesturemovestart to discard some events 2016-01-29 10:15:26 +08:00
David Monllao
923589d759 MDL-52825 atto: Ignore out of bounds event targets 2016-01-19 15:37:00 +08:00
Eloy Lafuente (stronk7)
c38bdd62c7 Merge branch 'MDL-51719-master' of git://github.com/danpoltawski/moodle 2015-12-22 13:07:01 +01:00
David Monllao
9e313e798f MDL-51784 general: Adding missing php4 style constructors
Adding them to warn people calling the php4 constructor.
2015-12-11 14:02:42 +08:00
Marina Glancy
c4d0b752a2 MDL-51784 various: use __construct() for PHP7 compatibility 2015-12-11 12:48:24 +08:00
Dan Poltawski
e746afacef MDL-51719 atto_rtl: RTL/LTR buttons now indicate state
Previously the RTL buttons did not indiciate wether RTL or LTR was
selected. Thanks to Andrew Nicols for guiding how to do this.
2015-11-27 14:03:53 +00:00
Andrew Nicols
b27d4eac7f MDL-45364 atto_rtl: Fix JS lint 2015-11-26 19:09:03 +00:00