Commit graph

792 commits

Author SHA1 Message Date
Sam Hemelryk
2faf4c4584 MDL-44221 editor_atto: fixed bug creating table in IE <= 10
This involved introducing a insert_html_at_focus_point method for
the editor and using that instead of insertHTML
2014-03-26 10:01:44 +08:00
Sam Hemelryk
9d535d04c2 MDL-44228 editor_atto: added missing outdent icon 2014-03-26 10:01:44 +08:00
Jerome Mouneyrac
6f0a16002a MDL-44228 add Atto sub-plugins admin table 2014-03-26 10:01:43 +08:00
Jerome Mouneyrac
7ca3ad91a0 MDL-44227 Atto: the screenreader helper now displays some texts when alt or title don\'t exist 2014-03-26 10:01:43 +08:00
Jason Fowler
e7109b5949 MDL-44216 Atto: Reversing the indent outdent buttons 2014-03-26 10:01:43 +08:00
Damyon Wiese
3ee53a425f MDL-44092 Atto: Add selectionchanged event and listeners in the buttons.
This means the buttons can indicate the state of the text under the cursor.
2014-03-26 10:01:43 +08:00
Jerome Mouneyrac
99061b7ad1 MDL-43863 Add Undo/Redo plugins to Atto 2014-03-26 10:01:43 +08:00
Frederic Massart
f6bef145bd MDL-44125 atto_align: Style with CSS whenever possible 2014-03-26 10:01:43 +08:00
Frederic Massart
acc94f70c8 MDL-44125 atto_align: New plugin for text alignment 2014-03-26 10:01:43 +08:00
Damyon Wiese
8bf5ad67ea MDL-43855 Atto: Add an equation editor
This equation editor relies on whatever the currently configured filter is to do the rendering.
If there is no filter that handles latex ($$ blah $$) - this plugin will not show up.

This will not work with the solutions on the forums of adding MathJax in the header of the page,
but it will work with a real mathjax filter written for Moodle (work in progress). It works with
the existing tex filter.
2014-03-26 10:01:42 +08:00
Damyon Wiese
05843fd3ee MDL-44067 Atto: Improve table editing controls.
Remove flaky inline menu icons - instead clicking on the table button, when
you are in a table shows the context menu for the current cell.

I removed all the special code for 'atto_control' - because it did not work very well. Having non-contenteditable
nodes inside a contenteditable region seems in expose bugs in different browsers.
2014-03-26 10:01:42 +08:00
Damyon Wiese
5ec54dd125 MDL-44127 Atto: Improve Atto API to allow plugins with multiple buttons/menus 2014-03-26 10:01:42 +08:00
Damyon Wiese
8095505e3c MDL-44126 Atto: List of minor fixes from review.
toolbar order (base it on tinymce)
change plain to paragraph
default for collapse plugin should be 5 groups
fix alignment of table dialogue form
insert newlines in html generated by table plugin
rename accessibility helper to screenreader helper
remove accessibility hint for images and media files
fix some broken plugin names
style table captions
remove verbose accessibility hints
2014-03-26 10:01:42 +08:00
Jerome Mouneyrac
fe0d247796 MDL-43869 New Atto plugin switch language LTR/RTL 2014-03-26 10:00:05 +08:00
Frederic Massart
c7ef8e455e MDL-43870 atto_title: Remove quoted style 2014-03-26 10:00:05 +08:00
Frederic Massart
5a06d5d71d MDL-43870 atto_indent: Removing browser styling after execCommand 2014-03-26 10:00:05 +08:00
Damyon Wiese
b03d59821a MDL-43934 Atto: Rename shifter meta files to the correct name.
This could have caused yui to fetch extra files because the dependencies might not have been loaded.
2014-03-26 10:00:04 +08:00
Damyon Wiese
fcb5b5c473 MDL-43854 Atto: Add collapse toolbar plugin 2014-03-26 10:00:04 +08:00
Frederic Massart
4c37c1f416 MDL-43954 editor_atto: Fix styling for IE8 in clean and standard 2014-03-26 10:00:04 +08:00
Rossiani Wijaya
39e2a67a53 MDL-44032 Atto editor: add subscript and superscript plugins 2014-03-26 10:00:04 +08:00
Damyon Wiese
26f8822d5c MDL-43867 Atto: Accessibility improvements.
1/ Set the aria-labelledby attribute on the contenteditable div (find the label from
original textarea)

2/ Store/restore the selection for the contenteditable div when it is focused. This allows
you to select some text, then go to the toolbar and click a button, and the selection
will be restored before the button effect is applied.

3/ Add an accessibility helper plugin.

From testing in all screenreaders, I found that all of their support for contenteditable is not great.
They treat it like a textbox - which means you can type and edit text, but it tells you nothing about
the styles, links or images in the editor. So I added a button to the toolbar, that is only accessible
when navigating via keyboard, that opens an accesssibility helper dialogue. The dialogue shows the list
of current styles, a global list of all links, and a global list of all images. Choosing an image or link
from here, will focus on the editable region, and select the link/image.

4/ Add an accessibility checker plugin to Atto.

Checks for images with no alt, images and links with filenames as alternate text/link text, and contrast ratios
less than WCAG 2.0 AA.
2014-03-26 09:59:37 +08:00
Frederic Massart
dad09216bc MDL-43953 editor_atto: Trigger form change when editing content 2014-03-26 09:59:37 +08:00
Frederic Massart
60a051d471 MDL-44064 editor_atto: Do not die when a plugin is missing 2014-03-26 09:59:36 +08:00
Damyon Wiese
34f5867a11 MDL-43990 Atto: Add a function for changing the formatting of the selected block. 2014-03-26 09:59:36 +08:00
Damyon Wiese
0fa78b80b4 MDL-43861 Atto: Fix for toolbar menu repaint bug in chrome. 2014-03-26 09:59:36 +08:00
Rossiani Wijaya
534cf7b730 MDL-43861: Atto Plugins: create new plugin for font and background colors 2014-03-26 09:59:36 +08:00
Damyon Wiese
0012a94601 MDL-44003 Atto: Set type="button" on atto toolbar buttons.
To prevent them accidentally becoming the default submit buttons for the form.
2014-03-26 09:59:36 +08:00
Frederic Massart
d19cf39edb MDL-44003 editor_atto: Identify the submit buttons in plugins 2014-03-26 09:59:36 +08:00
Frederic Massart
6e3220c053 MDL-43862 atto_managefiles: New plugin to manage files
AMOS BEGIN
 CPY [hasmissingfiles,tinymce_managefiles],[hasmissingfiles,atto_managefiles]
 CPY [deleteselected,tinymce_managefiles],[deleteselected,atto_managefiles]
 CPY [unusedfilesdesc,tinymce_managefiles],[unusedfilesdesc,atto_managefiles]
 CPY [unusedfilesheader,tinymce_managefiles],[unusedfilesheader,atto_managefiles]
AMOS END
2014-03-26 09:59:35 +08:00
Frederic Massart
224a9a51ad MDL-43859 atto_smiley: New plugin to insert smileys 2014-03-26 09:59:35 +08:00
Damyon Wiese
0ec6a46ad1 MDL-43869 Atto: Fix broken repositories.
The previous change on this issue accidentally fixed a selector,
so the repository API was recieving a valid node instead of null.
This means that it calls it's undocumented and dodgy callbacks on the node,
which are really calls directly to the TinyMCE API (just well buried).

But - by not setting the editor_target property, the api will not do
the secret handshakes.
2014-03-26 09:59:35 +08:00
Frederic Massart
c7829b26e1 MDL-43858 atto_charmap: New plugin to insert special characters 2014-03-26 09:59:35 +08:00
Damyon Wiese
48bdf86f31 MDL-43869 Atto: Add functions to get the nodes from the elementids.
If plugins try and do this themselves with Y.one, they will fall foul of the
qtype essay page bug which uses : in the id for form elements.

This is an alternative solution, to escaping the ids, which seemed unreliable for older
version of ie.
2014-03-26 09:59:35 +08:00
Frederic Massart
45698f7714 MDL-43950 editor_atto: Add arguments to plugin callback params_for_js 2014-03-26 09:59:35 +08:00
Damyon Wiese
d088a835d1 MDL-43857: Auto clean tag bloat from word/openoffice/googledocs
The cleanup rules are pulled from both testing of live docs, and the
jquery clean plugin. I tested with googledocs, libreoffice, word 2003
and word 2013.
2014-03-26 09:59:35 +08:00
Damyon Wiese
b269f635f6 MDL-43869 Atto: id escaping so Atto works with when there is : in the id.
(Quiz)
Also includes fixes for Atto when the repositories should not be displayed.
2014-03-26 09:59:34 +08:00
Damyon Wiese
55c0403c6c MDL-43853 Atto: Performance. Turbocharge the loader.
Rewrite the atto plugin loader so that:

A) We have a real settings.php page and can edit the toolbar.
B) All plugins are loaded at the same time (not serially)
C) All plugins share the YUI sandbox (more performance boost).

I had to change the loading API for this - but there are not non-core uses yet,
this is the best time to break it.
2014-03-26 09:59:34 +08:00
Damyon Wiese
f1e6953b36 MDL-43842 Atto: Remove licence and README.txt 2014-03-26 09:59:34 +08:00
Damyon Wiese
3df7cfc59a MDL-43842 Atto: Move pix-icons into core pix folder. 2014-03-26 09:59:34 +08:00
Damyon Wiese
adca7326d8 MDL-43842: Import atto back into core 2014-03-26 09:59:34 +08:00
David Monllao
759b323e0e MDL-43236 behat: Updating references to deprecated methods 2014-03-07 16:05:21 +08:00
Dan Poltawski
7de1b42f55 Merge branch 'wip-MDL-43606-master' of git://github.com/marinaglancy/moodle 2014-01-08 14:32:57 +08:00
Marina Glancy
c6cd067f14 MDL-43606 tinymce_managefiles: bump version
to allow smooth upgrade from contributed plugin in 2.5
2014-01-08 13:58:41 +08:00
Petr Škoda
f540cfe99e MDL-43196 do not load file management for guests and when not managing files 2013-12-27 11:11:55 +08:00
Eloy Lafuente (stronk7)
ebc77165a4 Merge branch 'MDL-42625_master' of git://github.com/dmonllao/moodle 2013-12-10 23:29:06 +01:00
Damyon Wiese
519449c528 MDL-42625 TinyMCE: Hook into API to track the progress of the init script 2013-12-06 13:10:24 +08:00
David Monllao
d1e55a47be MDL-42625 behat: Step definitions + related changes in features
In general aiming for compatibility with multiple browsers,
firefox, chrome and phantomjs to be more specific.

* Removing hardcoded waits
* Adding @_alert, @_switch_window and @_switch_frame tags,
  to label actions that different drivers have problems with.
* Adding missing @_files_upload and @_only_local tags to features that
  uploads files.
* Fixing a few wait for page ready what specified miliseconds.
* New methods to ensure elements (usual selectors), sections and editors
  are ready to interact with
* Changing the select an option implementation to deal with the different
  drivers implementations when listening to JS events.
2013-12-06 13:10:24 +08:00
Marina Glancy
f1d7254954 MDL-43150 tinymce_managefiles: fixed unattractive background 2013-12-02 12:01:27 +11:00
Damyon Wiese
18962add08 Merge branch 'wip-MDL-40850-master' of git://github.com/marinaglancy/moodle 2013-11-26 09:29:44 +08:00
Marina Glancy
1f897a72f3 MDL-40850 editor: Manage files popup correctly sets the course/cm context 2013-11-21 11:55:20 +11:00