From adca7326d8ac3bdc8ad315a545960265775d6081 Mon Sep 17 00:00:00 2001 From: Damyon Wiese Date: Tue, 28 Jan 2014 13:43:59 +0800 Subject: [PATCH 01/63] MDL-43842: Import atto back into core --- lib/classes/plugin_manager.php | 5 + lib/classes/plugininfo/editor.php | 2 +- lib/editor/atto/LICENSE | 674 +++++++++++++++++ lib/editor/atto/README.txt | 18 + lib/editor/atto/classes/plugininfo/atto.php | 35 + lib/editor/atto/db/install.php | 49 ++ lib/editor/atto/db/subplugins.php | 27 + lib/editor/atto/lang/en/editor_atto.php | 25 + lib/editor/atto/lib.php | 124 ++++ lib/editor/atto/pix/e/abbr.png | Bin 0 -> 316 bytes lib/editor/atto/pix/e/abbr.svg | 20 + lib/editor/atto/pix/e/absolute.png | Bin 0 -> 180 bytes lib/editor/atto/pix/e/absolute.svg | 14 + lib/editor/atto/pix/e/acronym.png | Bin 0 -> 316 bytes lib/editor/atto/pix/e/acronym.svg | 24 + lib/editor/atto/pix/e/advance_hr.png | Bin 0 -> 149 bytes lib/editor/atto/pix/e/advance_hr.svg | 13 + lib/editor/atto/pix/e/align_center.png | Bin 0 -> 159 bytes lib/editor/atto/pix/e/align_center.svg | 13 + lib/editor/atto/pix/e/align_left.png | Bin 0 -> 151 bytes lib/editor/atto/pix/e/align_left.svg | 13 + lib/editor/atto/pix/e/align_right.png | Bin 0 -> 151 bytes lib/editor/atto/pix/e/align_right.svg | 13 + lib/editor/atto/pix/e/anchor.png | Bin 0 -> 209 bytes lib/editor/atto/pix/e/anchor.svg | 13 + lib/editor/atto/pix/e/backward.png | Bin 0 -> 230 bytes lib/editor/atto/pix/e/backward.svg | 15 + lib/editor/atto/pix/e/bold.png | Bin 0 -> 309 bytes lib/editor/atto/pix/e/bold.svg | 16 + lib/editor/atto/pix/e/bullet_list.png | Bin 0 -> 203 bytes lib/editor/atto/pix/e/bullet_list.svg | 17 + lib/editor/atto/pix/e/cell_props.png | Bin 0 -> 166 bytes lib/editor/atto/pix/e/cell_props.svg | 14 + lib/editor/atto/pix/e/cite.png | Bin 0 -> 285 bytes lib/editor/atto/pix/e/cite.svg | 20 + lib/editor/atto/pix/e/cleanup_messy_code.png | Bin 0 -> 313 bytes lib/editor/atto/pix/e/cleanup_messy_code.svg | 15 + lib/editor/atto/pix/e/clear_formatting.png | Bin 0 -> 381 bytes lib/editor/atto/pix/e/clear_formatting.svg | 92 +++ lib/editor/atto/pix/e/copy.png | Bin 0 -> 249 bytes lib/editor/atto/pix/e/copy.svg | 14 + lib/editor/atto/pix/e/cut.png | Bin 0 -> 389 bytes lib/editor/atto/pix/e/cut.svg | 23 + lib/editor/atto/pix/e/decrease_indent.png | Bin 0 -> 205 bytes lib/editor/atto/pix/e/decrease_indent.svg | 13 + lib/editor/atto/pix/e/delete.png | Bin 0 -> 310 bytes lib/editor/atto/pix/e/delete.svg | 17 + lib/editor/atto/pix/e/delete_col.png | Bin 0 -> 211 bytes lib/editor/atto/pix/e/delete_col.svg | 13 + lib/editor/atto/pix/e/delete_row.png | Bin 0 -> 200 bytes lib/editor/atto/pix/e/delete_row.svg | 13 + lib/editor/atto/pix/e/delete_table.png | Bin 0 -> 303 bytes lib/editor/atto/pix/e/delete_table.svg | 15 + lib/editor/atto/pix/e/document_properties.png | Bin 0 -> 369 bytes lib/editor/atto/pix/e/document_properties.svg | 16 + lib/editor/atto/pix/e/dragmath.png | Bin 0 -> 373 bytes lib/editor/atto/pix/e/dragmath.svg | 16 + lib/editor/atto/pix/e/emoticons.png | Bin 0 -> 396 bytes lib/editor/atto/pix/e/emoticons.svg | 20 + lib/editor/atto/pix/e/find_replace.png | Bin 0 -> 398 bytes lib/editor/atto/pix/e/find_replace.svg | 35 + lib/editor/atto/pix/e/forward.png | Bin 0 -> 209 bytes lib/editor/atto/pix/e/forward.svg | 14 + lib/editor/atto/pix/e/fullpage.png | Bin 0 -> 343 bytes lib/editor/atto/pix/e/fullpage.svg | 18 + lib/editor/atto/pix/e/fullscreen.png | Bin 0 -> 314 bytes lib/editor/atto/pix/e/fullscreen.svg | 14 + lib/editor/atto/pix/e/help.png | Bin 0 -> 378 bytes lib/editor/atto/pix/e/help.svg | 17 + lib/editor/atto/pix/e/increase_indent.png | Bin 0 -> 211 bytes lib/editor/atto/pix/e/increase_indent.svg | 13 + lib/editor/atto/pix/e/insert.png | Bin 0 -> 315 bytes lib/editor/atto/pix/e/insert.svg | 16 + lib/editor/atto/pix/e/insert_col_after.png | Bin 0 -> 203 bytes lib/editor/atto/pix/e/insert_col_after.svg | 14 + lib/editor/atto/pix/e/insert_col_before.png | Bin 0 -> 209 bytes lib/editor/atto/pix/e/insert_col_before.svg | 14 + lib/editor/atto/pix/e/insert_date.png | Bin 0 -> 179 bytes lib/editor/atto/pix/e/insert_date.svg | 14 + lib/editor/atto/pix/e/insert_edit_image.png | Bin 0 -> 298 bytes lib/editor/atto/pix/e/insert_edit_image.svg | 15 + lib/editor/atto/pix/e/insert_edit_link.png | Bin 0 -> 345 bytes lib/editor/atto/pix/e/insert_edit_link.svg | 21 + lib/editor/atto/pix/e/insert_edit_video.png | Bin 0 -> 264 bytes lib/editor/atto/pix/e/insert_edit_video.svg | 14 + lib/editor/atto/pix/e/insert_file.png | Bin 0 -> 350 bytes lib/editor/atto/pix/e/insert_file.svg | 18 + .../atto/pix/e/insert_horizontal_ruler.png | Bin 0 -> 134 bytes .../atto/pix/e/insert_horizontal_ruler.svg | 13 + .../atto/pix/e/insert_nonbreaking_space.png | Bin 0 -> 187 bytes .../atto/pix/e/insert_nonbreaking_space.svg | 13 + lib/editor/atto/pix/e/insert_row_after.png | Bin 0 -> 213 bytes lib/editor/atto/pix/e/insert_row_after.svg | 14 + lib/editor/atto/pix/e/insert_row_before.png | Bin 0 -> 216 bytes lib/editor/atto/pix/e/insert_row_before.svg | 14 + lib/editor/atto/pix/e/insert_time.png | Bin 0 -> 443 bytes lib/editor/atto/pix/e/insert_time.svg | 17 + lib/editor/atto/pix/e/italic.png | Bin 0 -> 312 bytes lib/editor/atto/pix/e/italic.svg | 13 + lib/editor/atto/pix/e/justify.png | Bin 0 -> 133 bytes lib/editor/atto/pix/e/justify.svg | 13 + lib/editor/atto/pix/e/layers.png | Bin 0 -> 302 bytes lib/editor/atto/pix/e/layers.svg | 14 + lib/editor/atto/pix/e/layers_over.png | Bin 0 -> 316 bytes lib/editor/atto/pix/e/layers_over.svg | 14 + lib/editor/atto/pix/e/layers_under.png | Bin 0 -> 299 bytes lib/editor/atto/pix/e/layers_under.svg | 14 + lib/editor/atto/pix/e/left_to_right.png | Bin 0 -> 278 bytes lib/editor/atto/pix/e/left_to_right.svg | 14 + lib/editor/atto/pix/e/manage_files.png | Bin 0 -> 295 bytes lib/editor/atto/pix/e/manage_files.svg | 18 + lib/editor/atto/pix/e/merge_cells.png | Bin 0 -> 185 bytes lib/editor/atto/pix/e/merge_cells.svg | 13 + lib/editor/atto/pix/e/new_document.png | Bin 0 -> 240 bytes lib/editor/atto/pix/e/new_document.svg | 17 + lib/editor/atto/pix/e/numbered_list.png | Bin 0 -> 254 bytes lib/editor/atto/pix/e/numbered_list.svg | 14 + lib/editor/atto/pix/e/page_break.png | Bin 0 -> 201 bytes lib/editor/atto/pix/e/page_break.svg | 14 + lib/editor/atto/pix/e/paste.png | Bin 0 -> 265 bytes lib/editor/atto/pix/e/paste.svg | 15 + lib/editor/atto/pix/e/paste_text.png | Bin 0 -> 292 bytes lib/editor/atto/pix/e/paste_text.svg | 17 + lib/editor/atto/pix/e/paste_word.png | Bin 0 -> 322 bytes lib/editor/atto/pix/e/paste_word.svg | 19 + lib/editor/atto/pix/e/prevent_autolink.png | Bin 0 -> 399 bytes lib/editor/atto/pix/e/prevent_autolink.svg | 20 + lib/editor/atto/pix/e/preview.png | Bin 0 -> 369 bytes lib/editor/atto/pix/e/preview.svg | 21 + lib/editor/atto/pix/e/print.png | Bin 0 -> 202 bytes lib/editor/atto/pix/e/print.svg | 16 + lib/editor/atto/pix/e/question.png | Bin 0 -> 272 bytes lib/editor/atto/pix/e/question.svg | 14 + lib/editor/atto/pix/e/redo.png | Bin 0 -> 289 bytes lib/editor/atto/pix/e/redo.svg | 15 + lib/editor/atto/pix/e/remove_link.png | Bin 0 -> 397 bytes lib/editor/atto/pix/e/remove_link.svg | 21 + lib/editor/atto/pix/e/resize.png | Bin 0 -> 205 bytes lib/editor/atto/pix/e/resize.svg | 16 + lib/editor/atto/pix/e/restore_draft.png | Bin 0 -> 319 bytes lib/editor/atto/pix/e/restore_draft.svg | 15 + lib/editor/atto/pix/e/restore_last_draft.png | Bin 0 -> 348 bytes lib/editor/atto/pix/e/restore_last_draft.svg | 15 + lib/editor/atto/pix/e/right_to_left.png | Bin 0 -> 287 bytes lib/editor/atto/pix/e/right_to_left.svg | 14 + lib/editor/atto/pix/e/row_props.png | Bin 0 -> 155 bytes lib/editor/atto/pix/e/row_props.svg | 14 + lib/editor/atto/pix/e/save.png | Bin 0 -> 187 bytes lib/editor/atto/pix/e/save.svg | 13 + lib/editor/atto/pix/e/search.png | Bin 0 -> 215 bytes lib/editor/atto/pix/e/search.svg | 20 + lib/editor/atto/pix/e/select_all.png | Bin 0 -> 410 bytes lib/editor/atto/pix/e/select_all.svg | 27 + .../atto/pix/e/show_invisible_characters.png | Bin 0 -> 220 bytes .../atto/pix/e/show_invisible_characters.svg | 14 + lib/editor/atto/pix/e/source_code.png | Bin 0 -> 241 bytes lib/editor/atto/pix/e/source_code.svg | 13 + lib/editor/atto/pix/e/special_character.png | Bin 0 -> 363 bytes lib/editor/atto/pix/e/special_character.svg | 16 + lib/editor/atto/pix/e/spellcheck.png | Bin 0 -> 306 bytes lib/editor/atto/pix/e/spellcheck.svg | 16 + lib/editor/atto/pix/e/split_cells.png | Bin 0 -> 212 bytes lib/editor/atto/pix/e/split_cells.svg | 14 + lib/editor/atto/pix/e/strikethrough.png | Bin 0 -> 313 bytes lib/editor/atto/pix/e/strikethrough.svg | 17 + lib/editor/atto/pix/e/styleprops.png | Bin 0 -> 312 bytes lib/editor/atto/pix/e/styleprops.svg | 14 + lib/editor/atto/pix/e/subscript.png | Bin 0 -> 316 bytes lib/editor/atto/pix/e/subscript.svg | 14 + lib/editor/atto/pix/e/superscript.png | Bin 0 -> 336 bytes lib/editor/atto/pix/e/superscript.svg | 14 + lib/editor/atto/pix/e/table.png | Bin 0 -> 153 bytes lib/editor/atto/pix/e/table.svg | 14 + lib/editor/atto/pix/e/table_props.png | Bin 0 -> 291 bytes lib/editor/atto/pix/e/table_props.svg | 15 + lib/editor/atto/pix/e/template.png | Bin 0 -> 209 bytes lib/editor/atto/pix/e/template.svg | 15 + lib/editor/atto/pix/e/text_color.png | Bin 0 -> 302 bytes lib/editor/atto/pix/e/text_color.svg | 14 + lib/editor/atto/pix/e/text_highlight.png | Bin 0 -> 309 bytes lib/editor/atto/pix/e/text_highlight.svg | 14 + lib/editor/atto/pix/e/tick.png | Bin 0 -> 274 bytes lib/editor/atto/pix/e/tick.svg | 13 + lib/editor/atto/pix/e/toggle_blockquote.png | Bin 0 -> 290 bytes lib/editor/atto/pix/e/toggle_blockquote.svg | 16 + lib/editor/atto/pix/e/underline.png | Bin 0 -> 256 bytes lib/editor/atto/pix/e/underline.svg | 15 + lib/editor/atto/pix/e/undo.png | Bin 0 -> 298 bytes lib/editor/atto/pix/e/undo.svg | 15 + lib/editor/atto/pix/e/visual_aid.png | Bin 0 -> 179 bytes lib/editor/atto/pix/e/visual_aid.svg | 14 + lib/editor/atto/pix/e/visual_blocks.png | Bin 0 -> 382 bytes lib/editor/atto/pix/e/visual_blocks.svg | 22 + lib/editor/atto/pix/logo.png | Bin 0 -> 2795 bytes lib/editor/atto/pix/logo.svg | 91 +++ .../atto/plugins/bold/lang/en/atto_bold.php | 25 + lib/editor/atto/plugins/bold/lib.php | 48 ++ lib/editor/atto/plugins/bold/version.php | 29 + .../moodle-atto_bold-button-debug.js | 42 ++ .../moodle-atto_bold-button-min.js | 1 + .../moodle-atto_bold-button.js | 42 ++ .../plugins/bold/yui/src/button/build.json | 10 + .../plugins/bold/yui/src/button/js/button.js | 37 + .../bold/yui/src/button/meta/editor.json | 5 + .../atto/plugins/clear/lang/en/atto_clear.php | 25 + lib/editor/atto/plugins/clear/lib.php | 48 ++ lib/editor/atto/plugins/clear/version.php | 29 + .../moodle-atto_clear-button-debug.js | 42 ++ .../moodle-atto_clear-button-min.js | 1 + .../moodle-atto_clear-button.js | 42 ++ .../plugins/clear/yui/src/button/build.json | 10 + .../plugins/clear/yui/src/button/js/button.js | 37 + .../clear/yui/src/button/meta/editor.json | 5 + .../atto/plugins/html/lang/en/atto_html.php | 25 + lib/editor/atto/plugins/html/lib.php | 48 ++ lib/editor/atto/plugins/html/version.php | 29 + .../moodle-atto_html-button-debug.js | 61 ++ .../moodle-atto_html-button-min.js | 1 + .../moodle-atto_html-button.js | 61 ++ .../plugins/html/yui/src/button/build.json | 10 + .../plugins/html/yui/src/button/js/button.js | 56 ++ .../html/yui/src/button/meta/editor.json | 8 + .../atto/plugins/image/lang/en/atto_image.php | 35 + lib/editor/atto/plugins/image/lib.php | 58 ++ lib/editor/atto/plugins/image/version.php | 29 + .../moodle-atto_image-button-debug.js | 250 +++++++ .../moodle-atto_image-button-min.js | 1 + .../moodle-atto_image-button.js | 250 +++++++ .../plugins/image/yui/src/button/build.json | 10 + .../plugins/image/yui/src/button/js/button.js | 245 ++++++ .../image/yui/src/button/meta/editor.json | 8 + .../plugins/indent/lang/en/atto_indent.php | 25 + lib/editor/atto/plugins/indent/lib.php | 48 ++ lib/editor/atto/plugins/indent/version.php | 29 + .../moodle-atto_indent-button-debug.js | 42 ++ .../moodle-atto_indent-button-min.js | 1 + .../moodle-atto_indent-button.js | 42 ++ .../plugins/indent/yui/src/button/build.json | 10 + .../indent/yui/src/button/js/button.js | 37 + .../indent/yui/src/button/meta/editor.json | 5 + .../plugins/italic/lang/en/atto_italic.php | 25 + lib/editor/atto/plugins/italic/lib.php | 48 ++ lib/editor/atto/plugins/italic/version.php | 29 + .../moodle-atto_italic-button-debug.js | 42 ++ .../moodle-atto_italic-button-min.js | 1 + .../moodle-atto_italic-button.js | 42 ++ .../plugins/italic/yui/src/button/build.json | 10 + .../italic/yui/src/button/js/button.js | 37 + .../italic/yui/src/button/meta/editor.json | 5 + .../atto/plugins/link/lang/en/atto_link.php | 30 + lib/editor/atto/plugins/link/lib.php | 55 ++ lib/editor/atto/plugins/link/version.php | 29 + .../moodle-atto_link-button-debug.js | 268 +++++++ .../moodle-atto_link-button-min.js | 1 + .../moodle-atto_link-button.js | 268 +++++++ .../plugins/link/yui/src/button/build.json | 10 + .../plugins/link/yui/src/button/js/button.js | 263 +++++++ .../link/yui/src/button/meta/editor.json | 8 + .../atto/plugins/media/lang/en/atto_media.php | 32 + lib/editor/atto/plugins/media/lib.php | 52 ++ lib/editor/atto/plugins/media/version.php | 29 + .../moodle-atto_media-button-debug.js | 122 +++ .../moodle-atto_media-button-min.js | 1 + .../moodle-atto_media-button.js | 122 +++ .../plugins/media/yui/src/button/build.json | 10 + .../plugins/media/yui/src/button/js/button.js | 117 +++ .../media/yui/src/button/meta/editor.json | 8 + .../orderedlist/lang/en/atto_orderedlist.php | 25 + lib/editor/atto/plugins/orderedlist/lib.php | 48 ++ .../atto/plugins/orderedlist/version.php | 29 + .../moodle-atto_orderedlist-button-debug.js | 42 ++ .../moodle-atto_orderedlist-button-min.js | 1 + .../moodle-atto_orderedlist-button.js | 42 ++ .../orderedlist/yui/src/button/build.json | 10 + .../orderedlist/yui/src/button/js/button.js | 37 + .../yui/src/button/meta/editor.json | 5 + .../plugins/outdent/lang/en/atto_outdent.php | 25 + lib/editor/atto/plugins/outdent/lib.php | 46 ++ lib/editor/atto/plugins/outdent/version.php | 29 + .../moodle-atto_outdent-button-debug.js | 42 ++ .../moodle-atto_outdent-button-min.js | 1 + .../moodle-atto_outdent-button.js | 42 ++ .../plugins/outdent/yui/src/button/build.json | 10 + .../outdent/yui/src/button/js/button.js | 37 + .../outdent/yui/src/button/meta/editor.json | 5 + .../plugins/strike/lang/en/atto_strike.php | 25 + lib/editor/atto/plugins/strike/lib.php | 48 ++ lib/editor/atto/plugins/strike/version.php | 29 + .../moodle-atto_strike-button-debug.js | 42 ++ .../moodle-atto_strike-button-min.js | 1 + .../moodle-atto_strike-button.js | 42 ++ .../plugins/strike/yui/src/button/build.json | 10 + .../strike/yui/src/button/js/button.js | 37 + .../strike/yui/src/button/meta/editor.json | 5 + .../atto/plugins/table/lang/en/atto_table.php | 43 ++ lib/editor/atto/plugins/table/lib.php | 68 ++ lib/editor/atto/plugins/table/styles.css | 7 + lib/editor/atto/plugins/table/version.php | 29 + .../moodle-atto_table-button-debug.js | 624 ++++++++++++++++ .../moodle-atto_table-button-min.js | 2 + .../moodle-atto_table-button.js | 624 ++++++++++++++++ .../plugins/table/yui/src/button/build.json | 10 + .../plugins/table/yui/src/button/js/button.js | 619 +++++++++++++++ .../table/yui/src/button/meta/editor.json | 10 + .../atto/plugins/title/lang/en/atto_title.php | 32 + lib/editor/atto/plugins/title/lib.php | 54 ++ lib/editor/atto/plugins/title/version.php | 29 + .../moodle-atto_title-button-debug.js | 85 +++ .../moodle-atto_title-button-min.js | 1 + .../moodle-atto_title-button.js | 85 +++ .../plugins/title/yui/src/button/build.json | 10 + .../plugins/title/yui/src/button/js/button.js | 80 ++ .../title/yui/src/button/meta/editor.json | 5 + .../underline/lang/en/atto_underline.php | 25 + lib/editor/atto/plugins/underline/lib.php | 48 ++ lib/editor/atto/plugins/underline/version.php | 29 + .../moodle-atto_underline-button-debug.js | 42 ++ .../moodle-atto_underline-button-min.js | 1 + .../moodle-atto_underline-button.js | 42 ++ .../underline/yui/src/button/build.json | 10 + .../underline/yui/src/button/js/button.js | 37 + .../underline/yui/src/button/meta/editor.json | 5 + .../plugins/unlink/lang/en/atto_unlink.php | 25 + lib/editor/atto/plugins/unlink/lib.php | 46 ++ lib/editor/atto/plugins/unlink/version.php | 29 + .../moodle-atto_unlink-button-debug.js | 42 ++ .../moodle-atto_unlink-button-min.js | 1 + .../moodle-atto_unlink-button.js | 42 ++ .../plugins/unlink/yui/src/button/build.json | 10 + .../unlink/yui/src/button/js/button.js | 37 + .../unlink/yui/src/button/meta/editor.json | 5 + .../lang/en/atto_unorderedlist.php | 25 + lib/editor/atto/plugins/unorderedlist/lib.php | 46 ++ .../atto/plugins/unorderedlist/version.php | 29 + .../moodle-atto_unorderedlist-button-debug.js | 42 ++ .../moodle-atto_unorderedlist-button-min.js | 1 + .../moodle-atto_unorderedlist-button.js | 42 ++ .../unorderedlist/yui/src/button/build.json | 10 + .../unorderedlist/yui/src/button/js/button.js | 37 + .../yui/src/button/meta/editor.json | 5 + lib/editor/atto/styles.css | 180 +++++ lib/editor/atto/version.php | 29 + .../moodle-editor_atto-editor-debug.js | 702 ++++++++++++++++++ .../moodle-editor_atto-editor-min.js | 2 + .../moodle-editor_atto-editor.js | 702 ++++++++++++++++++ lib/editor/atto/yui/src/editor/build.json | 11 + .../atto/yui/src/editor/js/controlmenu.js | 75 ++ lib/editor/atto/yui/src/editor/js/editor.js | 622 ++++++++++++++++ .../atto/yui/src/editor/meta/editor.json | 12 + lib/editorlib.php | 4 +- 350 files changed, 12326 insertions(+), 3 deletions(-) create mode 100644 lib/editor/atto/LICENSE create mode 100644 lib/editor/atto/README.txt create mode 100644 lib/editor/atto/classes/plugininfo/atto.php create mode 100644 lib/editor/atto/db/install.php create mode 100644 lib/editor/atto/db/subplugins.php create mode 100644 lib/editor/atto/lang/en/editor_atto.php create mode 100644 lib/editor/atto/lib.php create mode 100644 lib/editor/atto/pix/e/abbr.png create mode 100644 lib/editor/atto/pix/e/abbr.svg create mode 100644 lib/editor/atto/pix/e/absolute.png create mode 100644 lib/editor/atto/pix/e/absolute.svg create mode 100644 lib/editor/atto/pix/e/acronym.png create mode 100644 lib/editor/atto/pix/e/acronym.svg create mode 100644 lib/editor/atto/pix/e/advance_hr.png create mode 100644 lib/editor/atto/pix/e/advance_hr.svg create mode 100644 lib/editor/atto/pix/e/align_center.png create mode 100644 lib/editor/atto/pix/e/align_center.svg create mode 100644 lib/editor/atto/pix/e/align_left.png create mode 100644 lib/editor/atto/pix/e/align_left.svg create mode 100644 lib/editor/atto/pix/e/align_right.png create mode 100644 lib/editor/atto/pix/e/align_right.svg create mode 100644 lib/editor/atto/pix/e/anchor.png create mode 100644 lib/editor/atto/pix/e/anchor.svg create mode 100644 lib/editor/atto/pix/e/backward.png create mode 100644 lib/editor/atto/pix/e/backward.svg create mode 100644 lib/editor/atto/pix/e/bold.png create mode 100644 lib/editor/atto/pix/e/bold.svg create mode 100644 lib/editor/atto/pix/e/bullet_list.png create mode 100644 lib/editor/atto/pix/e/bullet_list.svg create mode 100644 lib/editor/atto/pix/e/cell_props.png create mode 100644 lib/editor/atto/pix/e/cell_props.svg create mode 100644 lib/editor/atto/pix/e/cite.png create mode 100644 lib/editor/atto/pix/e/cite.svg create mode 100644 lib/editor/atto/pix/e/cleanup_messy_code.png create mode 100644 lib/editor/atto/pix/e/cleanup_messy_code.svg create mode 100644 lib/editor/atto/pix/e/clear_formatting.png create mode 100644 lib/editor/atto/pix/e/clear_formatting.svg create mode 100644 lib/editor/atto/pix/e/copy.png create mode 100644 lib/editor/atto/pix/e/copy.svg create mode 100644 lib/editor/atto/pix/e/cut.png create mode 100644 lib/editor/atto/pix/e/cut.svg create mode 100644 lib/editor/atto/pix/e/decrease_indent.png create mode 100644 lib/editor/atto/pix/e/decrease_indent.svg create mode 100644 lib/editor/atto/pix/e/delete.png create mode 100644 lib/editor/atto/pix/e/delete.svg create mode 100644 lib/editor/atto/pix/e/delete_col.png create mode 100644 lib/editor/atto/pix/e/delete_col.svg create mode 100644 lib/editor/atto/pix/e/delete_row.png create mode 100644 lib/editor/atto/pix/e/delete_row.svg create mode 100644 lib/editor/atto/pix/e/delete_table.png create mode 100644 lib/editor/atto/pix/e/delete_table.svg create mode 100644 lib/editor/atto/pix/e/document_properties.png create mode 100644 lib/editor/atto/pix/e/document_properties.svg create mode 100644 lib/editor/atto/pix/e/dragmath.png create mode 100644 lib/editor/atto/pix/e/dragmath.svg create mode 100644 lib/editor/atto/pix/e/emoticons.png create mode 100644 lib/editor/atto/pix/e/emoticons.svg create mode 100644 lib/editor/atto/pix/e/find_replace.png create mode 100644 lib/editor/atto/pix/e/find_replace.svg create mode 100644 lib/editor/atto/pix/e/forward.png create mode 100644 lib/editor/atto/pix/e/forward.svg create mode 100644 lib/editor/atto/pix/e/fullpage.png create mode 100644 lib/editor/atto/pix/e/fullpage.svg create mode 100644 lib/editor/atto/pix/e/fullscreen.png create mode 100644 lib/editor/atto/pix/e/fullscreen.svg create mode 100644 lib/editor/atto/pix/e/help.png create mode 100644 lib/editor/atto/pix/e/help.svg create mode 100644 lib/editor/atto/pix/e/increase_indent.png create mode 100644 lib/editor/atto/pix/e/increase_indent.svg create mode 100644 lib/editor/atto/pix/e/insert.png create mode 100644 lib/editor/atto/pix/e/insert.svg create mode 100644 lib/editor/atto/pix/e/insert_col_after.png create mode 100644 lib/editor/atto/pix/e/insert_col_after.svg create mode 100644 lib/editor/atto/pix/e/insert_col_before.png create mode 100644 lib/editor/atto/pix/e/insert_col_before.svg create mode 100644 lib/editor/atto/pix/e/insert_date.png create mode 100644 lib/editor/atto/pix/e/insert_date.svg create mode 100644 lib/editor/atto/pix/e/insert_edit_image.png create mode 100644 lib/editor/atto/pix/e/insert_edit_image.svg create mode 100644 lib/editor/atto/pix/e/insert_edit_link.png create mode 100644 lib/editor/atto/pix/e/insert_edit_link.svg create mode 100644 lib/editor/atto/pix/e/insert_edit_video.png create mode 100644 lib/editor/atto/pix/e/insert_edit_video.svg create mode 100644 lib/editor/atto/pix/e/insert_file.png create mode 100644 lib/editor/atto/pix/e/insert_file.svg create mode 100644 lib/editor/atto/pix/e/insert_horizontal_ruler.png create mode 100644 lib/editor/atto/pix/e/insert_horizontal_ruler.svg create mode 100644 lib/editor/atto/pix/e/insert_nonbreaking_space.png create mode 100644 lib/editor/atto/pix/e/insert_nonbreaking_space.svg create mode 100644 lib/editor/atto/pix/e/insert_row_after.png create mode 100644 lib/editor/atto/pix/e/insert_row_after.svg create mode 100644 lib/editor/atto/pix/e/insert_row_before.png create mode 100644 lib/editor/atto/pix/e/insert_row_before.svg create mode 100644 lib/editor/atto/pix/e/insert_time.png create mode 100644 lib/editor/atto/pix/e/insert_time.svg create mode 100644 lib/editor/atto/pix/e/italic.png create mode 100644 lib/editor/atto/pix/e/italic.svg create mode 100644 lib/editor/atto/pix/e/justify.png create mode 100644 lib/editor/atto/pix/e/justify.svg create mode 100644 lib/editor/atto/pix/e/layers.png create mode 100644 lib/editor/atto/pix/e/layers.svg create mode 100644 lib/editor/atto/pix/e/layers_over.png create mode 100644 lib/editor/atto/pix/e/layers_over.svg create mode 100644 lib/editor/atto/pix/e/layers_under.png create mode 100644 lib/editor/atto/pix/e/layers_under.svg create mode 100644 lib/editor/atto/pix/e/left_to_right.png create mode 100644 lib/editor/atto/pix/e/left_to_right.svg create mode 100644 lib/editor/atto/pix/e/manage_files.png create mode 100644 lib/editor/atto/pix/e/manage_files.svg create mode 100644 lib/editor/atto/pix/e/merge_cells.png create mode 100644 lib/editor/atto/pix/e/merge_cells.svg create mode 100644 lib/editor/atto/pix/e/new_document.png create mode 100644 lib/editor/atto/pix/e/new_document.svg create mode 100644 lib/editor/atto/pix/e/numbered_list.png create mode 100644 lib/editor/atto/pix/e/numbered_list.svg create mode 100644 lib/editor/atto/pix/e/page_break.png create mode 100644 lib/editor/atto/pix/e/page_break.svg create mode 100644 lib/editor/atto/pix/e/paste.png create mode 100644 lib/editor/atto/pix/e/paste.svg create mode 100644 lib/editor/atto/pix/e/paste_text.png create mode 100644 lib/editor/atto/pix/e/paste_text.svg create mode 100644 lib/editor/atto/pix/e/paste_word.png create mode 100644 lib/editor/atto/pix/e/paste_word.svg create mode 100644 lib/editor/atto/pix/e/prevent_autolink.png create mode 100644 lib/editor/atto/pix/e/prevent_autolink.svg create mode 100644 lib/editor/atto/pix/e/preview.png create mode 100644 lib/editor/atto/pix/e/preview.svg create mode 100644 lib/editor/atto/pix/e/print.png create mode 100644 lib/editor/atto/pix/e/print.svg create mode 100644 lib/editor/atto/pix/e/question.png create mode 100644 lib/editor/atto/pix/e/question.svg create mode 100644 lib/editor/atto/pix/e/redo.png create mode 100644 lib/editor/atto/pix/e/redo.svg create mode 100644 lib/editor/atto/pix/e/remove_link.png create mode 100644 lib/editor/atto/pix/e/remove_link.svg create mode 100644 lib/editor/atto/pix/e/resize.png create mode 100644 lib/editor/atto/pix/e/resize.svg create mode 100644 lib/editor/atto/pix/e/restore_draft.png create mode 100644 lib/editor/atto/pix/e/restore_draft.svg create mode 100644 lib/editor/atto/pix/e/restore_last_draft.png create mode 100644 lib/editor/atto/pix/e/restore_last_draft.svg create mode 100644 lib/editor/atto/pix/e/right_to_left.png create mode 100644 lib/editor/atto/pix/e/right_to_left.svg create mode 100644 lib/editor/atto/pix/e/row_props.png create mode 100644 lib/editor/atto/pix/e/row_props.svg create mode 100644 lib/editor/atto/pix/e/save.png create mode 100644 lib/editor/atto/pix/e/save.svg create mode 100644 lib/editor/atto/pix/e/search.png create mode 100644 lib/editor/atto/pix/e/search.svg create mode 100644 lib/editor/atto/pix/e/select_all.png create mode 100644 lib/editor/atto/pix/e/select_all.svg create mode 100644 lib/editor/atto/pix/e/show_invisible_characters.png create mode 100644 lib/editor/atto/pix/e/show_invisible_characters.svg create mode 100644 lib/editor/atto/pix/e/source_code.png create mode 100644 lib/editor/atto/pix/e/source_code.svg create mode 100644 lib/editor/atto/pix/e/special_character.png create mode 100644 lib/editor/atto/pix/e/special_character.svg create mode 100644 lib/editor/atto/pix/e/spellcheck.png create mode 100644 lib/editor/atto/pix/e/spellcheck.svg create mode 100644 lib/editor/atto/pix/e/split_cells.png create mode 100644 lib/editor/atto/pix/e/split_cells.svg create mode 100644 lib/editor/atto/pix/e/strikethrough.png create mode 100644 lib/editor/atto/pix/e/strikethrough.svg create mode 100644 lib/editor/atto/pix/e/styleprops.png create mode 100644 lib/editor/atto/pix/e/styleprops.svg create mode 100644 lib/editor/atto/pix/e/subscript.png create mode 100644 lib/editor/atto/pix/e/subscript.svg create mode 100644 lib/editor/atto/pix/e/superscript.png create mode 100644 lib/editor/atto/pix/e/superscript.svg create mode 100644 lib/editor/atto/pix/e/table.png create mode 100644 lib/editor/atto/pix/e/table.svg create mode 100644 lib/editor/atto/pix/e/table_props.png create mode 100644 lib/editor/atto/pix/e/table_props.svg create mode 100644 lib/editor/atto/pix/e/template.png create mode 100644 lib/editor/atto/pix/e/template.svg create mode 100644 lib/editor/atto/pix/e/text_color.png create mode 100644 lib/editor/atto/pix/e/text_color.svg create mode 100644 lib/editor/atto/pix/e/text_highlight.png create mode 100644 lib/editor/atto/pix/e/text_highlight.svg create mode 100644 lib/editor/atto/pix/e/tick.png create mode 100644 lib/editor/atto/pix/e/tick.svg create mode 100644 lib/editor/atto/pix/e/toggle_blockquote.png create mode 100644 lib/editor/atto/pix/e/toggle_blockquote.svg create mode 100644 lib/editor/atto/pix/e/underline.png create mode 100644 lib/editor/atto/pix/e/underline.svg create mode 100644 lib/editor/atto/pix/e/undo.png create mode 100644 lib/editor/atto/pix/e/undo.svg create mode 100644 lib/editor/atto/pix/e/visual_aid.png create mode 100644 lib/editor/atto/pix/e/visual_aid.svg create mode 100644 lib/editor/atto/pix/e/visual_blocks.png create mode 100644 lib/editor/atto/pix/e/visual_blocks.svg create mode 100644 lib/editor/atto/pix/logo.png create mode 100644 lib/editor/atto/pix/logo.svg create mode 100644 lib/editor/atto/plugins/bold/lang/en/atto_bold.php create mode 100644 lib/editor/atto/plugins/bold/lib.php create mode 100644 lib/editor/atto/plugins/bold/version.php create mode 100644 lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js create mode 100644 lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js create mode 100644 lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js create mode 100644 lib/editor/atto/plugins/bold/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/bold/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/bold/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/clear/lang/en/atto_clear.php create mode 100644 lib/editor/atto/plugins/clear/lib.php create mode 100644 lib/editor/atto/plugins/clear/version.php create mode 100644 lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js create mode 100644 lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js create mode 100644 lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js create mode 100644 lib/editor/atto/plugins/clear/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/clear/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/clear/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/html/lang/en/atto_html.php create mode 100644 lib/editor/atto/plugins/html/lib.php create mode 100644 lib/editor/atto/plugins/html/version.php create mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-debug.js create mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-min.js create mode 100644 lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button.js create mode 100644 lib/editor/atto/plugins/html/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/html/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/html/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/image/lang/en/atto_image.php create mode 100644 lib/editor/atto/plugins/image/lib.php create mode 100644 lib/editor/atto/plugins/image/version.php create mode 100644 lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-debug.js create mode 100644 lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-min.js create mode 100644 lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button.js create mode 100644 lib/editor/atto/plugins/image/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/image/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/image/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/indent/lang/en/atto_indent.php create mode 100644 lib/editor/atto/plugins/indent/lib.php create mode 100644 lib/editor/atto/plugins/indent/version.php create mode 100644 lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-debug.js create mode 100644 lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-min.js create mode 100644 lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button.js create mode 100644 lib/editor/atto/plugins/indent/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/indent/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/indent/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/italic/lang/en/atto_italic.php create mode 100644 lib/editor/atto/plugins/italic/lib.php create mode 100644 lib/editor/atto/plugins/italic/version.php create mode 100644 lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-debug.js create mode 100644 lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-min.js create mode 100644 lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button.js create mode 100644 lib/editor/atto/plugins/italic/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/italic/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/italic/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/link/lang/en/atto_link.php create mode 100644 lib/editor/atto/plugins/link/lib.php create mode 100644 lib/editor/atto/plugins/link/version.php create mode 100644 lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js create mode 100644 lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js create mode 100644 lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js create mode 100644 lib/editor/atto/plugins/link/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/link/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/link/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/media/lang/en/atto_media.php create mode 100644 lib/editor/atto/plugins/media/lib.php create mode 100644 lib/editor/atto/plugins/media/version.php create mode 100644 lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-debug.js create mode 100644 lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-min.js create mode 100644 lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button.js create mode 100644 lib/editor/atto/plugins/media/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/media/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/media/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/orderedlist/lang/en/atto_orderedlist.php create mode 100644 lib/editor/atto/plugins/orderedlist/lib.php create mode 100644 lib/editor/atto/plugins/orderedlist/version.php create mode 100644 lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-debug.js create mode 100644 lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-min.js create mode 100644 lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button.js create mode 100644 lib/editor/atto/plugins/orderedlist/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/orderedlist/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/orderedlist/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/outdent/lang/en/atto_outdent.php create mode 100644 lib/editor/atto/plugins/outdent/lib.php create mode 100644 lib/editor/atto/plugins/outdent/version.php create mode 100644 lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-debug.js create mode 100644 lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-min.js create mode 100644 lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button.js create mode 100644 lib/editor/atto/plugins/outdent/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/outdent/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/outdent/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/strike/lang/en/atto_strike.php create mode 100644 lib/editor/atto/plugins/strike/lib.php create mode 100644 lib/editor/atto/plugins/strike/version.php create mode 100644 lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-debug.js create mode 100644 lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-min.js create mode 100644 lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button.js create mode 100644 lib/editor/atto/plugins/strike/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/strike/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/strike/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/table/lang/en/atto_table.php create mode 100644 lib/editor/atto/plugins/table/lib.php create mode 100644 lib/editor/atto/plugins/table/styles.css create mode 100644 lib/editor/atto/plugins/table/version.php create mode 100644 lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js create mode 100644 lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-min.js create mode 100644 lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button.js create mode 100644 lib/editor/atto/plugins/table/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/table/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/table/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/title/lang/en/atto_title.php create mode 100644 lib/editor/atto/plugins/title/lib.php create mode 100644 lib/editor/atto/plugins/title/version.php create mode 100644 lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-debug.js create mode 100644 lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-min.js create mode 100644 lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js create mode 100644 lib/editor/atto/plugins/title/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/title/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/title/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/underline/lang/en/atto_underline.php create mode 100644 lib/editor/atto/plugins/underline/lib.php create mode 100644 lib/editor/atto/plugins/underline/version.php create mode 100644 lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js create mode 100644 lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js create mode 100644 lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js create mode 100644 lib/editor/atto/plugins/underline/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/underline/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/underline/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/unlink/lang/en/atto_unlink.php create mode 100644 lib/editor/atto/plugins/unlink/lib.php create mode 100644 lib/editor/atto/plugins/unlink/version.php create mode 100644 lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js create mode 100644 lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js create mode 100644 lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js create mode 100644 lib/editor/atto/plugins/unlink/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/unlink/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/unlink/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/plugins/unorderedlist/lang/en/atto_unorderedlist.php create mode 100644 lib/editor/atto/plugins/unorderedlist/lib.php create mode 100644 lib/editor/atto/plugins/unorderedlist/version.php create mode 100644 lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js create mode 100644 lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js create mode 100644 lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js create mode 100644 lib/editor/atto/plugins/unorderedlist/yui/src/button/build.json create mode 100644 lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js create mode 100644 lib/editor/atto/plugins/unorderedlist/yui/src/button/meta/editor.json create mode 100644 lib/editor/atto/styles.css create mode 100644 lib/editor/atto/version.php create mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js create mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-min.js create mode 100644 lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor.js create mode 100644 lib/editor/atto/yui/src/editor/build.json create mode 100644 lib/editor/atto/yui/src/editor/js/controlmenu.js create mode 100644 lib/editor/atto/yui/src/editor/js/editor.js create mode 100644 lib/editor/atto/yui/src/editor/meta/editor.json diff --git a/lib/classes/plugin_manager.php b/lib/classes/plugin_manager.php index dd0aaa15cf3..3ab3c8ed690 100644 --- a/lib/classes/plugin_manager.php +++ b/lib/classes/plugin_manager.php @@ -930,6 +930,11 @@ class core_plugin_manager { $standard_plugins = array( + 'atto' => array( + 'bold', 'html', 'indent', 'link', 'orderedlist', 'strike', 'title', 'unlink', + 'clear', 'image', 'italic', 'media', 'outdent', 'table', 'underline', 'unorderedlist' + ), + 'assignment' => array( 'offline', 'online', 'upload', 'uploadsingle' ), diff --git a/lib/classes/plugininfo/editor.php b/lib/classes/plugininfo/editor.php index 2873176fe21..a3519d3608b 100644 --- a/lib/classes/plugininfo/editor.php +++ b/lib/classes/plugininfo/editor.php @@ -40,7 +40,7 @@ class editor extends base { global $CFG; if (empty($CFG->texteditors)) { - return array('tinymce'=>'tinymce', 'textarea'=>'textarea'); + return array('atto'=>'atto', 'tinymce'=>'tinymce', 'textarea'=>'textarea'); } $enabled = array(); diff --git a/lib/editor/atto/LICENSE b/lib/editor/atto/LICENSE new file mode 100644 index 00000000000..94a9ed024d3 --- /dev/null +++ b/lib/editor/atto/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/lib/editor/atto/README.txt b/lib/editor/atto/README.txt new file mode 100644 index 00000000000..1fc2cffe5dd --- /dev/null +++ b/lib/editor/atto/README.txt @@ -0,0 +1,18 @@ +Small, fast, accessible, mobile friendly text editor for Moodle + +QUICK INSTALL +============= +Put this entire directory at: + +PATHTOMOODLE/lib/editors/atto + +Visit your site notifications page to install the new plugins. + +Enable the new editor on the page: + +Site administration / â–º Plugins / â–º Text editors / â–º Manage editors + +To make it the default, change the order so this editor is the first in the list. + +In Moodle 2.6 users can also choose this editor from their profile preferences. + diff --git a/lib/editor/atto/classes/plugininfo/atto.php b/lib/editor/atto/classes/plugininfo/atto.php new file mode 100644 index 00000000000..ed52dc48610 --- /dev/null +++ b/lib/editor/atto/classes/plugininfo/atto.php @@ -0,0 +1,35 @@ +. + +/** + * Subplugin info class. + * + * @package editor_atto + * @copyright 2013 Petr Skoda {@link http://skodak.org} + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +namespace editor_atto\plugininfo; + +use core\plugininfo\base; + +defined('MOODLE_INTERNAL') || die(); + + +class atto extends base { + public function is_uninstall_allowed() { + return true; + } +} diff --git a/lib/editor/atto/db/install.php b/lib/editor/atto/db/install.php new file mode 100644 index 00000000000..6fd16b58178 --- /dev/null +++ b/lib/editor/atto/db/install.php @@ -0,0 +1,49 @@ +. + +/** + * Atto text editor installation steps. + * + * @package editor_atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Enable this text editor by default. + * + * @return bool + */ +function xmldb_editor_atto_install() { + global $CFG; + // Get the current list of editors. + $currentconfig = $CFG->texteditors; + if (is_null($currentconfig)) { + $currentconfig = ''; + } + $editors = explode(',', $currentconfig); + // Insert atto in the second position. + array_splice($editors, 1, 0, array('atto')); + // Remove duplicates. + $editors = array_unique($editors); + // Set the new config. + unset_config('texteditors'); + set_config('texteditors', implode(',', $editors)); + + return true; +} diff --git a/lib/editor/atto/db/subplugins.php b/lib/editor/atto/db/subplugins.php new file mode 100644 index 00000000000..de0b440b77c --- /dev/null +++ b/lib/editor/atto/db/subplugins.php @@ -0,0 +1,27 @@ +. + +/** + * Yui Editor + * + * @package editor_atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$subplugins = array('atto' => 'lib/editor/atto/plugins'); diff --git a/lib/editor/atto/lang/en/editor_atto.php b/lib/editor/atto/lang/en/editor_atto.php new file mode 100644 index 00000000000..3ade27d86ca --- /dev/null +++ b/lib/editor/atto/lang/en/editor_atto.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'editor_atto', language 'en'. + * + * @package editor_atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Atto HTML editor'; diff --git a/lib/editor/atto/lib.php b/lib/editor/atto/lib.php new file mode 100644 index 00000000000..f38e5cc584c --- /dev/null +++ b/lib/editor/atto/lib.php @@ -0,0 +1,124 @@ +. + +/** + * YUI text editor integration. + * + * @package editor_atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * This is the texteditor implementation. + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +class atto_texteditor extends texteditor { + + /** + * Is the current browser supported by this editor? + * + * Of course! + * @return bool + */ + public function supported_by_browser() { + return true; + } + + /** + * Returns array of supported text formats. + * @return array + */ + public function get_supported_formats() { + // FORMAT_MOODLE is not supported here, sorry. + return array(FORMAT_HTML => FORMAT_HTML); + } + + /** + * Returns text format preferred by this editor. + * @return int + */ + public function get_preferred_format() { + return FORMAT_HTML; + } + + /** + * Does this editor support picking from repositories? + * @return bool + */ + public function supports_repositories() { + return true; + } + + /** + * Use this editor for give element. + * + * @param string $elementid + * @param array $options + * @param null $fpoptions + */ + public function use_editor($elementid, array $options=null, $fpoptions=null) { + global $PAGE; + $PAGE->requires->yui_module('moodle-editor_atto-editor', + 'M.editor_atto.init', + array($this->get_init_params($elementid, $options, $fpoptions))); + + $plugins = core_component::get_plugin_list('atto'); + + foreach ($plugins as $name => $fulldir) { + $PAGE->requires->string_for_js('pluginname', 'atto_' . $name); + $plugins[$name] = component_callback('atto_' . $name, 'sort_order', array($elementid)); + } + + asort($plugins); + foreach ($plugins as $name => $sort) { + component_callback('atto_' . $name, 'init_editor', array($elementid)); + } + + } + + /** + * Create a params array to init the editor. + * + * @param string $elementid + * @param array $options + * @param array $fpoptions + */ + protected function get_init_params($elementid, array $options=null, array $fpoptions=null) { + global $PAGE; + + $directionality = get_string('thisdirection', 'langconfig'); + $strtime = get_string('strftimetime'); + $strdate = get_string('strftimedaydate'); + $lang = current_language(); + $contentcss = $PAGE->theme->editor_css_url()->out(false); + + $params = array( + 'elementid' => $elementid, + 'content_css' => $contentcss, + 'language' => $lang, + 'directionality' => $directionality, + 'filepickeroptions' => array() + ); + if ($fpoptions) { + $params['filepickeroptions'] = $fpoptions; + } + return $params; + } +} diff --git a/lib/editor/atto/pix/e/abbr.png b/lib/editor/atto/pix/e/abbr.png new file mode 100644 index 0000000000000000000000000000000000000000..93c2f08a59f5556dd90f031e9ff4b91aa9e8f956 GIT binary patch literal 316 zcmV-C0mJ@@P)TD;-D)y!nV7UdiS&O=fG%$QHE# zoOl8WhVvZxB zuu)y~V{J^;(3j}Ak&7`bx)Rleb7lq)LJVBhJm6xaye0hizYt9D5?}zg)ktl{=C O0000 + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/absolute.png b/lib/editor/atto/pix/e/absolute.png new file mode 100644 index 0000000000000000000000000000000000000000..acd5351d3df194ced19b72c0d63ce8e04ad6d2d3 GIT binary patch literal 180 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X!aQ9ZLn>}1{rUgjo|)&&EK}|?p5ETcDGEXch5;NJW(|eU z&dmJ(QB&cG?5S9XOodGkCNW4|V_5Qv^F{uV=dD#rG6CnEyc&4Vl^A3()G + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/acronym.png b/lib/editor/atto/pix/e/acronym.png new file mode 100644 index 0000000000000000000000000000000000000000..73488d8a6d70193710f2c24c17ba03b6c43e4e3d GIT binary patch literal 316 zcmV-C0mJ@@P)qJq z$g$%VSgCebgA(;pla!_bN4i9l#OCF1BD6KH8`9{|WMrDijM}_`v)0AeD@ZW1kD4Nv z4%TIokcF;Mnc%#F>-(NXkBtoy6lkxGxj3GYcwUp3(82w`@^XTY00RKHky1M`M(a=j O0000 + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/advance_hr.png b/lib/editor/atto/pix/e/advance_hr.png new file mode 100644 index 0000000000000000000000000000000000000000..1fcaf187af3a3fa20691b78d4680d32d12f9b234 GIT binary patch literal 149 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X%spKkLn>}1{rUgjo>{e_v(d?bhbLi + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/align_center.png b/lib/editor/atto/pix/e/align_center.png new file mode 100644 index 0000000000000000000000000000000000000000..2d762661d1407995127b5a12ed51f93f2efe024a GIT binary patch literal 159 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X96eneLn>}1{rUgjo>{da_1l}9A~O#haZpTPOmg?)NoZ+h zyr9kJkY#T;D=0Wva^*ADV+-ZEMXD1`#Mqj}8JKt&j3=t@b6l+|2Q-Yq)78&qol`;+ E01xaiEC2ui literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/align_center.svg b/lib/editor/atto/pix/e/align_center.svg new file mode 100644 index 00000000000..f6eae2969f4 --- /dev/null +++ b/lib/editor/atto/pix/e/align_center.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/align_left.png b/lib/editor/atto/pix/e/align_left.png new file mode 100644 index 0000000000000000000000000000000000000000..1d87f1cfd3e717c9cae4ad15a5a7f0e1f8d59d04 GIT binary patch literal 151 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XEInNuLn>}1{rUgjo>{da_1l}9A~O#haZpTPOmg?)z2V<; x=*pE4w^;xLZ;OXk;vd$@?2>?fnG%)}G literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/align_left.svg b/lib/editor/atto/pix/e/align_left.svg new file mode 100644 index 00000000000..b792e41ed3a --- /dev/null +++ b/lib/editor/atto/pix/e/align_left.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/align_right.png b/lib/editor/atto/pix/e/align_right.png new file mode 100644 index 0000000000000000000000000000000000000000..113b73568d1d8a8b67d70cc2552c2ebe35b68cab GIT binary patch literal 151 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XEInNuLn>}1{rUgjo>{da_1l}9A~O#haZpTPOmg?)NjM_P wcBHB|N#B6)Z^VK-+&fgFVdQ&MBb@0M%tMxc~qF literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/align_right.svg b/lib/editor/atto/pix/e/align_right.svg new file mode 100644 index 00000000000..c636b9e5b90 --- /dev/null +++ b/lib/editor/atto/pix/e/align_right.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/anchor.png b/lib/editor/atto/pix/e/anchor.png new file mode 100644 index 0000000000000000000000000000000000000000..ce92365e1e2e1c02f8ce54ee19eb4ace5151cc09 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XialK%Ln>}1{rUgjo|)&&JX`652bqI{gC!Gl#A+tpVA!SV z!z0oZ$jr8v@qmRnL*gc$hAbO~LqB*Dl@?Soi##@IVV$3ru*t8XOSeJlkwXu6fQj>G zccwF{Mr)V3;yDvEtgANbU(gZy4;7YG7bym|Yn6HR;9AdZ6_Tp00i_>zopr E02aPSasU7T literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/anchor.svg b/lib/editor/atto/pix/e/anchor.svg new file mode 100644 index 00000000000..05cf0f397ec --- /dev/null +++ b/lib/editor/atto/pix/e/anchor.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/backward.png b/lib/editor/atto/pix/e/backward.png new file mode 100644 index 0000000000000000000000000000000000000000..eef5fb23c47a20a3d13491a5ab2463e69a7d9748 GIT binary patch literal 230 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XIy_w*Ln>}1&9N*_V`gS{wq-6{V5qCRmNBxSljSVWjVqfJ zHi|R(`X5-9eQix7cSDGcnWdTp^Yk>QA|DN8SJ|O~ aks)19&4i + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/bold.png b/lib/editor/atto/pix/e/bold.png new file mode 100644 index 0000000000000000000000000000000000000000..0f9b1cf4fe97d18894923af7d64b900f6ae5d2a6 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xu6w#ThE&{2`t$$4Ju}CddA7e9CTvPSz-PzwvE|B@D{Lj4 zYHW`f>;qa`PVdQVzA=shrl-u4|u|SdUh{OkmCou|o44Zf_JQ4Ev#B^Z-d&ar| zg_8^mCW|geWGI*2WW&u@%M`G`$z*Z+AI2n}3+#{n-e3}cv6S_Ri!#rN#qO$l%z8{4 zl||T{ex3-N>2QKuzQND7L1co$w`!HjfFC*vx40b++b!7X)VRc;!ELFXnPp5|07F)j z>wJc)SIw64^BF%aIMeL>PN67dl2EVwLP;HlNCAZd3<>`BXMPpmS`YLhgQu&X%Q~lo FCIF1RZ`c3; literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/bold.svg b/lib/editor/atto/pix/e/bold.svg new file mode 100644 index 00000000000..3f460e3f78c --- /dev/null +++ b/lib/editor/atto/pix/e/bold.svg @@ -0,0 +1,16 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/bullet_list.png b/lib/editor/atto/pix/e/bullet_list.png new file mode 100644 index 0000000000000000000000000000000000000000..2335cd236d8afe99ec3656a46798b9e07d748155 GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xay?xfLn>}1%{0vpV`64L%)-W@;o<8W%aC+tp6%_%Mvena zSI_W2^=HVs!(j4+dBWcL63jC$ur8R@$)+GKqEO9vQo${WC*jZk|MtwP4MofaN0~I) xY8<*+`yJLWaCs!;{E_c%y%?cjCdR + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/cell_props.png b/lib/editor/atto/pix/e/cell_props.png new file mode 100644 index 0000000000000000000000000000000000000000..c79aa5b3a2d1fdeddcae70cf651235c8a056737a GIT binary patch literal 166 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XJUm?-Ln>}1{rUgjo>{e_@Y$J}A~O#hanNMg$?$|X#ivW+ zsNRAb3|-6zopr00`hW8vp + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/cite.png b/lib/editor/atto/pix/e/cite.png new file mode 100644 index 0000000000000000000000000000000000000000..e70c73c20a78a33f26e062b6e3dff97c5026e3a3 GIT binary patch literal 285 zcmV+&0pk9NP)^3q@ zQ_HjKx(I#%y?_s@)w}}UQd&rdE!* jo1P2x|F2vwunI5$1erH$^d@c600000NkvXXu0mjfjka;| literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/cite.svg b/lib/editor/atto/pix/e/cite.svg new file mode 100644 index 00000000000..b21b1d551ba --- /dev/null +++ b/lib/editor/atto/pix/e/cite.svg @@ -0,0 +1,20 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/cleanup_messy_code.png b/lib/editor/atto/pix/e/cleanup_messy_code.png new file mode 100644 index 0000000000000000000000000000000000000000..d519b25defc02e162a03cf538b015d49e492f772 GIT binary patch literal 313 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XZhN{ohE&{2`t$$4J+o%QwKb8P4qA+-Y!5iKJ^Ohg$!AIi z8>1N0EHwsAW{vA|-IG{*ZX9A*agotOl)>;s1FyrGe%IopsHj^^Vk*8|0k@eNEabG- zFg#r>&2)_?$>7`^%g+pa&kr7OU6Gy8=EIVur=TkEbzvOi&L_$O^$z{5%qmi!816Q3 z22AcWVtH1+gVBL;!eprqA3pI5tOpVqOjw?DHM>Y`U|7uFVdQ I&MBb@04BO?{{R30 literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/cleanup_messy_code.svg b/lib/editor/atto/pix/e/cleanup_messy_code.svg new file mode 100644 index 00000000000..a3483abc6c1 --- /dev/null +++ b/lib/editor/atto/pix/e/cleanup_messy_code.svg @@ -0,0 +1,15 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/clear_formatting.png b/lib/editor/atto/pix/e/clear_formatting.png new file mode 100644 index 0000000000000000000000000000000000000000..21d8c5c62f6ecbc4e7fb749e56b3f510d0fa2f58 GIT binary patch literal 381 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`EX7WqAsj$Z!;#Vf2?p zUk71ECym(^Ktah8*NBqf{Irtt#G+J&^73-M%)IR4vz~e!0rB;?M@;gAszt*3|TD&V=uHLFl>-zrb~>GF z%*e^km~-Nwz2}qlw=eEnKJ#kd3a#WMw~GyT%M|+_8z-O1j-2Kw(Pm#=8gMxNK=amb zwq1)3&t>KPu|+So)YFPp_JfwLr?&yadewQ)@2=;Q?w|4e=S0J2(iZO;8RME1Dqg=? zpwX56Ac3RooUJ)`w&Ns~@>R1K&6SL9v)&Vk$ew;+eMiiXeg8SmY(L0w>CdUiX>-Fv zzcTtXdOr}0uy{W2SK6fiy92!KLQ6H3Cff-duv8aQ@V$J^t@Ff5fjhSk?vvcxTmMuh W; + + +image/svg+xml + + + + \ No newline at end of file diff --git a/lib/editor/atto/pix/e/copy.png b/lib/editor/atto/pix/e/copy.png new file mode 100644 index 0000000000000000000000000000000000000000..b48b02bf18c65616fc444e929c3a18e9a479542f GIT binary patch literal 249 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XW_!9ghE&{2nq!)Mt)A^pLSj}{78A1_gAoIV#05hSnGSn~ zk4!nA49*;BkhfqcJn-h`X7L9>2b>Nxd=9XZJ3E2fVSO!wp@gF!YmvmqnM_xD?+pPlBi@GAUb~ZQ3hm+=IVZj{$pqvuaQ9^> t$vyB|v}2ORu33&kY$_^=JPZN}3}S5U^LgG0Dgm9z;OXk;vd$@?2>>F=PVE2y literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/copy.svg b/lib/editor/atto/pix/e/copy.svg new file mode 100644 index 00000000000..39a67b0634b --- /dev/null +++ b/lib/editor/atto/pix/e/copy.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/cut.png b/lib/editor/atto/pix/e/cut.png new file mode 100644 index 0000000000000000000000000000000000000000..20c4e4e5a6bb497756790a19e6815de7392fc5c3 GIT binary patch literal 389 zcmV;00eb$4P)RCwBqQ`>cdP!L?Gzz)<7>_AFL zI*<>(4IRV^lKjGlqytLO3bX@5C1fVfdT#K-Vb59EH?t3{?|ZAN>IB|Vp2Lh~4&?;G z%FJ$dr@SbN#wMt)>m6Q4sp}MvMc_XwU`{e=kq`zPKTwu|;|WP5xkJn<`)ve8=GvisvXTZKT;1c}G9YAaf{77tJPD(6P6bm7&}Cf_5Lxh&9n8wj9$iCm}47sdE0+Z3?)9~@*L#Bcs(u(!c| jP+rTI$$Vh$uK)u8fv4GNYX(;B00000NkvXXu0mjfM=+(w literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/cut.svg b/lib/editor/atto/pix/e/cut.svg new file mode 100644 index 00000000000..cd47961efb5 --- /dev/null +++ b/lib/editor/atto/pix/e/cut.svg @@ -0,0 +1,23 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/decrease_indent.png b/lib/editor/atto/pix/e/decrease_indent.png new file mode 100644 index 0000000000000000000000000000000000000000..1609df7fbe97e3e43c77ecdb52965632fc1dd9ba GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X@;zM~Ln>}1{rUgjo>{da_1l}9A~O#haZpTPOmg?)NjM_P zcBHD8)3cdLAYS1#t3xlN!#5^{Xa2svsVb&oY78%Hy!I$K6e=*~dNXWNpYW7bfbq%} z2B`*akFQMJJ&YzSDGiKQFCDyal3S#jQQ-hX>@{=o#PhmWfL1ejy85}Sb4q9e0K;cO AHvj+t literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/decrease_indent.svg b/lib/editor/atto/pix/e/decrease_indent.svg new file mode 100644 index 00000000000..fc8546701e1 --- /dev/null +++ b/lib/editor/atto/pix/e/decrease_indent.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/delete.png b/lib/editor/atto/pix/e/delete.png new file mode 100644 index 0000000000000000000000000000000000000000..84da3f9384efb3c5b28ae25be34df27af35c3440 GIT binary patch literal 310 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XZg{#lhE&{2`tkq2J+q!o@v}2*3U&?tyu!?N0SrgJZB9FD zbYLmNaz+PVPKPe}lM0u37@AmA%4{w;FfQU{&gm$mn>bX%Mc{Yv9pP@{Vn%`H@psi1U=8mN!b+~;PB#^!XUPwQ)H&Y zPVNg#`E~-_Ow1pcr!~y&SNS5a!i~{Z!13ZX!C2#Q9cDdk{J|)9ebH%O z2GxAGgfdpwsrHkOI0n=(=k9HIQWNm!b+X|XWrqev2J2fTw&yE+N`Zc4@O1TaS?83{ F1OOEGYTf_< literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/delete.svg b/lib/editor/atto/pix/e/delete.svg new file mode 100644 index 00000000000..f3fa58d3083 --- /dev/null +++ b/lib/editor/atto/pix/e/delete.svg @@ -0,0 +1,17 @@ + + + +]> + + + + + \ No newline at end of file diff --git a/lib/editor/atto/pix/e/delete_col.png b/lib/editor/atto/pix/e/delete_col.png new file mode 100644 index 0000000000000000000000000000000000000000..1a11e667111e7a451d5903304bae0d90b8e70a5c GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XN}1{rUgjo>|Wz`NX&nKUQkgzks}%ZU@j6F!MlCthhdn84uBz{rsLUgv#j&TB`Y0~kDA{an^L HB{Ts5)GbOl literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/delete_col.svg b/lib/editor/atto/pix/e/delete_col.svg new file mode 100644 index 00000000000..b3b06dfe64c --- /dev/null +++ b/lib/editor/atto/pix/e/delete_col.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/delete_row.png b/lib/editor/atto/pix/e/delete_row.png new file mode 100644 index 0000000000000000000000000000000000000000..f35c139187b4341c7ae785d2c8cb63f906977338 GIT binary patch literal 200 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XvOHZJLn>}1{rUgjo>{eFViI%OxjCK}TDEL4aho$qLHxmC z1?~?gjST}hG|U=S7&!2CM{Z8DWiaAyc*Cn;C}yNHmHp9Ihi1Meo<&Evzd6**6JmDI vGf+9s%|G#Qg2WPLv4oO8@)z!K2qZA1u5T2ZER%l^Xe)!KtDnm{r-UW|2gE{L literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/delete_row.svg b/lib/editor/atto/pix/e/delete_row.svg new file mode 100644 index 00000000000..8942bef70f5 --- /dev/null +++ b/lib/editor/atto/pix/e/delete_row.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/delete_table.png b/lib/editor/atto/pix/e/delete_table.png new file mode 100644 index 0000000000000000000000000000000000000000..d6a53744ed3531474b81815732a27743dc761491 GIT binary patch literal 303 zcmV+~0nq-5P)RCwBA{Qv(y10{fE)~s3hOjroS z2Y`425ElS(0F=D}h#P=7fd!A|k5I+up?sJjAkF+x0}Q|hq@|@XBI^XX3MeK3WhVlu z`A|*skqmbL8OB7&k3fSK0I5ba;R2xe1t6_Y&;Xzd44_U&1{0v-9~o!PocSM57&t%! zksm2c>XGG%34;yL&<_BL9RTtlK*Iv$ssdudAORHGP}^Z)q6nqqnTSa&K*b + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/document_properties.png b/lib/editor/atto/pix/e/document_properties.png new file mode 100644 index 0000000000000000000000000000000000000000..20e3888c9488b677b0d8fe5aab8f20cb1111cc73 GIT binary patch literal 369 zcmV-%0gnEOP)FC$7CQ`siCNpW6&@!()@4~%G2TW6 z?0~abG2#$c&Xzi0hX+!i2PhF$+%oUUX9r}!3)rKpN5X`HgAEh1pfDx6sdLIP&WZ-; z!bbv^tVi|zOapFP+Z7~Bp!eY0#I;S+h`I+gGX)occpVHfoS4rwfYa2+S8ccOv3O*7JuQ7?(}fUPSD8 zJ!QV5)+FM4am*(H?KJH+aG?$3`MgTt$;aDwk^f+(0Xy7U@8HciZvh4X1Kf1EQsx)_ P00000NkvXXu0mjf!p@lI literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/document_properties.svg b/lib/editor/atto/pix/e/document_properties.svg new file mode 100644 index 00000000000..66d874853fa --- /dev/null +++ b/lib/editor/atto/pix/e/document_properties.svg @@ -0,0 +1,16 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/dragmath.png b/lib/editor/atto/pix/e/dragmath.png new file mode 100644 index 0000000000000000000000000000000000000000..3c6405e0121a501e654e0da9b5edd07f723275db GIT binary patch literal 373 zcmV-*0gC>KP)59O$qWrmPYm5hu(xvD6x + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/emoticons.png b/lib/editor/atto/pix/e/emoticons.png new file mode 100644 index 0000000000000000000000000000000000000000..94247afcc47bd2473731a9273d7a1b0c22f9f0c6 GIT binary patch literal 396 zcmV;70dxL|P)*=Avx~m(jc-L!>@ghS z8#A^Bo+U|A`kM^V;n$BXyR)c~(&sp=CnMKqpJ_MjsX6x_6_fm2oLCqQw94fd|Han3&+Q*uN z-BOqK<;k=&@~8VO;ltfQYyNJ7qQHA5$|_Z_nRx}v7@uJ26Tr4qqvxt7m&iWIyxs^M zL8C*0QoYFF06r3O)JRMdh;_}ZYSYV;x-X28LUv{5I + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/find_replace.png b/lib/editor/atto/pix/e/find_replace.png new file mode 100644 index 0000000000000000000000000000000000000000..da59dc48bc35cc2f929c40a9936027e6ddf3a3bf GIT binary patch literal 398 zcmV;90df9`P)toni?t$nJ>wtUGO_#9tjDw^cz@%{T+3T@p9!G|CX$!XgAc zNRxk976@qb*93WRua(4@?{yaNv4tbk!JxQf+=ckutL}JwD?fo$)5T7BLl4Ho6NE0S z_eU`0UEx3S_~@bO@c;k-07*qoM6N<$g7-nRHUIzs literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/find_replace.svg b/lib/editor/atto/pix/e/find_replace.svg new file mode 100644 index 00000000000..cfcaf0a9687 --- /dev/null +++ b/lib/editor/atto/pix/e/find_replace.svg @@ -0,0 +1,35 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/forward.png b/lib/editor/atto/pix/e/forward.png new file mode 100644 index 0000000000000000000000000000000000000000..be8dfe938b34189a16c5c1e52a9751d3864ce207 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XialK%Ln>}1&9N*_V`gS{wq-6{V5qCRmNBxSljSVWjVqfD zNH|QE{P=Q?Y4)}HoJT%9B1~Pp35sEgdit9ld^9%Pc=<$&^Ja#L8-x94JFxuv&U~`5 zL*{(TC6-;>Qkox`9{>OU-_xtISzq;$al?!anJgRz3^TXLy_^0yUjb-6gQu&X%Q~lo FCIGIUN_7AL literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/forward.svg b/lib/editor/atto/pix/e/forward.svg new file mode 100644 index 00000000000..d9a23ae279f --- /dev/null +++ b/lib/editor/atto/pix/e/forward.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/fullpage.png b/lib/editor/atto/pix/e/fullpage.png new file mode 100644 index 0000000000000000000000000000000000000000..e5376b84e582fd81b34ac2d80f3ef9a6e96e7ff1 GIT binary patch literal 343 zcmV-d0jU0oP)TAod;XVk-Z zcmlKQv^FD1!$N5oGuI{JEs&KOlORyswjLF%!(@EA5@mqQnMMIbAKnE*2 pN)(rxK6ahC^9|%YBdz)fFaW + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/fullscreen.png b/lib/editor/atto/pix/e/fullscreen.png new file mode 100644 index 0000000000000000000000000000000000000000..49809362e9d36ec4d49a9acf079fa9140c89aa5a GIT binary patch literal 314 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X?s&R5hE&{2nq!)Mt)9(igMq23DPv^9w>LMr8$xV$IjJR? zG&6+cC>pZKBpl%76G%Q#v!K{8hCy_8|7nH^mxT%?n_P<(1>#u@B^n!dFg#1w;Syc= zrB-F5%Yt954qKTN^bP<0|1Up1_#jtd=Rw933?)1zQ<)5t6wVxRP)wLMZJL;Ync2U_ zXRUvqpPO6FA+o>0n@3BJfy-q=1M`J^`4e0&89{LzzAB$DiazRen=r#pxo=N{;H?%R zAtQ|=9arE@0%m;UxX)IZG1Hh4!@A97#|4SOJ9t40=@yX1hph+z0xT!PC{x JWt~$(698ehZXEys literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/fullscreen.svg b/lib/editor/atto/pix/e/fullscreen.svg new file mode 100644 index 00000000000..81a540b7db4 --- /dev/null +++ b/lib/editor/atto/pix/e/fullscreen.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/help.png b/lib/editor/atto/pix/e/help.png new file mode 100644 index 0000000000000000000000000000000000000000..d29072e0c784a566d00b4699f34e22d091c62aea GIT binary patch literal 378 zcmV-=0fqjFP)jwn(wE&$BRf~QQD#Z?FQeS|nHoKC_h& Y0RBml;IERe8vp43IG5A literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/help.svg b/lib/editor/atto/pix/e/help.svg new file mode 100644 index 00000000000..9daeea5e3d0 --- /dev/null +++ b/lib/editor/atto/pix/e/help.svg @@ -0,0 +1,17 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/increase_indent.png b/lib/editor/atto/pix/e/increase_indent.png new file mode 100644 index 0000000000000000000000000000000000000000..163fd7a49f5d6d9d6df4dfcbcd21a0d3b5f850f4 GIT binary patch literal 211 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XN}1{rUgjo>{da_1l}9A~O#haZpTPOmg?)NjM_P zcBHD8bHxWH0qqHIn<6)-HRk-{IKsJd + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert.png b/lib/editor/atto/pix/e/insert.png new file mode 100644 index 0000000000000000000000000000000000000000..49c7c09933421512ef509509fbeb9cbb6fd17b62 GIT binary patch literal 315 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X?s~d7hE&{2`tkq2J+qlj@iQMr1-%2R{D*ybb~rK#d_O8b*cZdJVrS75VZL`CV4%axaKuU}O#mQCbA+k7z}jd;DgQu&X J%Q~loCIAfaX*>V` literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/insert.svg b/lib/editor/atto/pix/e/insert.svg new file mode 100644 index 00000000000..65411604d13 --- /dev/null +++ b/lib/editor/atto/pix/e/insert.svg @@ -0,0 +1,16 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_col_after.png b/lib/editor/atto/pix/e/insert_col_after.png new file mode 100644 index 0000000000000000000000000000000000000000..e29d46dc5c7101ad5cb0e6e25aa5d86c016f3548 GIT binary patch literal 203 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xay?xfLn>}1{rUgjo_S-!wKb6vT{9&#SQfJx7#K_v;=aMa zz3zo0duC>4k3%VcgHNT(!*-n$ToWEk&*e`QWB6F5!p!Bt#k^plbi)-#jqeH_{(cH# y3YS%+8Mb_7no!ho>4~dyz~{!qDME})JPZ + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_col_before.png b/lib/editor/atto/pix/e/insert_col_before.png new file mode 100644 index 0000000000000000000000000000000000000000..9d20263a22647df646e73082afe258cca207ed02 GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XialK%Ln>}1&9N+gR?lWKVcN7~Cmd7~k`@T`NF6wE;K%>} z^{03k+#WM4==Q686OicT+MIS)DZ@x(S7bv8qriH1A^ii>`9Ef-l|A4Z28JGp{V836IbPc&y9k!gczB4806H{m_ObtyaTkJ!PC{xWt~$( F696LxN5KF9 literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/insert_col_before.svg b/lib/editor/atto/pix/e/insert_col_before.svg new file mode 100644 index 00000000000..6be205ca729 --- /dev/null +++ b/lib/editor/atto/pix/e/insert_col_before.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_date.png b/lib/editor/atto/pix/e/insert_date.png new file mode 100644 index 0000000000000000000000000000000000000000..0f74951f34c1500d3a37d01c4d43e03dfe752806 GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XLOop^Ln>}1&9N+gR?nv3;q9Hwa&dFoS*Fh$8B0tR?3B+i z6fvA&P-Ej_Jj!O!u!n(#XGziwyIU2EBBwS?ICfO7CDEa0b9 + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_edit_image.png b/lib/editor/atto/pix/e/insert_edit_image.png new file mode 100644 index 0000000000000000000000000000000000000000..29f5c9733e8ff8218db4b9b8711016d0c525ce4f GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X&Um^whE&{2`t$$4J+o><>bEyHd8bGmU^((t8$BhK7lIP%9Kh9QXgGm{mAr(A=SONhjR zW`-5I(hY4K2@|thE=`DVD7N!(k~?*k{Sl|b9EQp4Kc$~oP02Wt#B9{TE>*?&>O1d+ z1KI~(v92h7ys=`Xe22b6>=gc9&NYbw4eD!tOuWH8;cy$L?w3x+1qN9M#Mlh#jRa<{ u5O~>e=1%~F@q&p>doG;t$Sh;yFkpD2XY0f$Q!4@V7lWs(pUXO@geCx`*=)i9 literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/insert_edit_image.svg b/lib/editor/atto/pix/e/insert_edit_image.svg new file mode 100644 index 00000000000..3fdf5a84cf3 --- /dev/null +++ b/lib/editor/atto/pix/e/insert_edit_image.svg @@ -0,0 +1,15 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_edit_link.png b/lib/editor/atto/pix/e/insert_edit_link.png new file mode 100644 index 0000000000000000000000000000000000000000..226105a5709af0e318530958dde7cc8461271ff6 GIT binary patch literal 345 zcmV-f0jB|N**jSmi4&@R;wxkKVLZqu|)65TR`phgD%<`-aho;7a0F2`)I>MD0Vy^AunJ!8(M4jHM`K00000NkvXXu0mjfTu+Ly literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/insert_edit_link.svg b/lib/editor/atto/pix/e/insert_edit_link.svg new file mode 100644 index 00000000000..9528b2b0282 --- /dev/null +++ b/lib/editor/atto/pix/e/insert_edit_link.svg @@ -0,0 +1,21 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_edit_video.png b/lib/editor/atto/pix/e/insert_edit_video.png new file mode 100644 index 0000000000000000000000000000000000000000..7505977669b7d9fab8df8355f5afa7e13342b3f3 GIT binary patch literal 264 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XR(ZNOhE&{2`t$$4J+o@V#31H~wDa?PCvxfp+!FM9@1FFS zNx`($p@#9yJk#uJ^%Kk;Bxd$!!xW#i)E@3gcNH5ord21O~Ir8DfhM{#FFKn!(f6 K&t;ucLK6Uzc3PSM literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/insert_edit_video.svg b/lib/editor/atto/pix/e/insert_edit_video.svg new file mode 100644 index 00000000000..5de07d8bb8a --- /dev/null +++ b/lib/editor/atto/pix/e/insert_edit_video.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_file.png b/lib/editor/atto/pix/e/insert_file.png new file mode 100644 index 0000000000000000000000000000000000000000..c50726b986c762ec8ea47946425ede50ccd9c819 GIT binary patch literal 350 zcmV-k0iphhP)wx0q$cKC!>Txc4kTPUb4yi;FV=5X_}5i#K`ePEbJiQZw4tp+O&bcOgYCC=K)^d0bY847{ zL0gTRPe&8h9G~EZe17?gHi09nb3wU6CBup7`v~Msr*WWQg6%4uX$!f|eOK`8PHm!@ zW!Cuv;&+T&Fw;g-k literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/insert_file.svg b/lib/editor/atto/pix/e/insert_file.svg new file mode 100644 index 00000000000..733265c4554 --- /dev/null +++ b/lib/editor/atto/pix/e/insert_file.svg @@ -0,0 +1,18 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_horizontal_ruler.png b/lib/editor/atto/pix/e/insert_horizontal_ruler.png new file mode 100644 index 0000000000000000000000000000000000000000..a51af6a49232eb3be91c5560686f6975a982949b GIT binary patch literal 134 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XG(24#Ln>}1{rUgjo>{e_@JfSY0>kMyH#chS8Ax#- eKE%+#z|1hQMrU`!M8D5KJq(_%elF{r5}E*|j4E0H literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/insert_horizontal_ruler.svg b/lib/editor/atto/pix/e/insert_horizontal_ruler.svg new file mode 100644 index 00000000000..0b0501845b1 --- /dev/null +++ b/lib/editor/atto/pix/e/insert_horizontal_ruler.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_nonbreaking_space.png b/lib/editor/atto/pix/e/insert_nonbreaking_space.png new file mode 100644 index 0000000000000000000000000000000000000000..e23954270976c25b41ea0d96e0cf05ecaa9ef028 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XVm)0PLn>}1{rUgjo>{eF;xe`~^K7McX3m;*s>7RCn7Oqf ziP>NeL$R4&!#mkiu?E@Kbl6v%WcT27Ss)W3&n@u2UD9pQ)88u}v5EyT^_X4c;5qWY iSzGbqU4{k*W`_P)&8fB$p + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_row_after.png b/lib/editor/atto/pix/e/insert_row_after.png new file mode 100644 index 0000000000000000000000000000000000000000..c8d5c4c94669ce16aa3a6bb57e80e043275ea5c8 GIT binary patch literal 213 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X$~|2iLn>}1{rUgjo>{e_@Y$J}EWRGz-pNNaIg1$Wcs4Q2 zw-IJ;ZAfB{NIN^rHBzImjgeV-spdr1`6?Gm86C2i3{oFLfP;GShBQT$lfsu{jk6F_LKihAQfKFiWboFyt I=akR{0CYG+ng9R* literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/insert_row_after.svg b/lib/editor/atto/pix/e/insert_row_after.svg new file mode 100644 index 00000000000..4804dfb73ef --- /dev/null +++ b/lib/editor/atto/pix/e/insert_row_after.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_row_before.png b/lib/editor/atto/pix/e/insert_row_before.png new file mode 100644 index 0000000000000000000000000000000000000000..2554823b87f9574478b51bb41e4c74cb19cfc296 GIT binary patch literal 216 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XsytmBLn>}1{rUgjo>|Wz``Q`?1ye;`U0=o%$5u^XZFggy z;HI!GU4bEDLq-`x&~M2O7M~YP4$tKng4!HvCg?CPXp3P;n&8dU_(Rc-S>hwBl3@dD z_=`n5I|P@joM8R&;ml0q|Bol9CoK>N$YBUfY!L5hV|=P9sBnP6{Cw*JNkN`Speq + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/insert_time.png b/lib/editor/atto/pix/e/insert_time.png new file mode 100644 index 0000000000000000000000000000000000000000..751a86a545fc3f295d363256709d105c41feb1a4 GIT binary patch literal 443 zcmV;s0Yv_ZP)z#WJT+1B-#buUd^75SumcSXw9q`GZ8Sw#J0XKc$PZJy}k_Ywb12Dx4Rv>5ELS_Tc zl?cq~T++Bjkkp!^G|wI!XxoyrWXwE)L()#^*x~MYPL-&kkYkgNeu+(ZDY!fH|8hDe ziJU{sMj7>AoLHbx>3XL72oc9wIpJu5@a=6>^M;LEbI>$ruLVL~HD1ckH11aUY8{iP zbURL%2eF7m1`d-arwijfQM?riGAM5lc~uQ7IIUr%S0U*5FQ|^E{9&qJKH; + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/italic.png b/lib/editor/atto/pix/e/italic.png new file mode 100644 index 0000000000000000000000000000000000000000..fb9951c716b33f9df7d4c597b419bb39ec45eb0b GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XZh5*mhE&{2`t$$4J+qlX^|u^$g{|`$`8|AnQ&SEp*E4p= zHtrDctx*n_~MuwX0bM0VODt7&Lzu|RptMb7sJ~!%`C%7}*$JA97SXGTC_((3cFJu6{1- HoD!M<)VOc7 literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/italic.svg b/lib/editor/atto/pix/e/italic.svg new file mode 100644 index 00000000000..d1265dea501 --- /dev/null +++ b/lib/editor/atto/pix/e/italic.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/justify.png b/lib/editor/atto/pix/e/justify.png new file mode 100644 index 0000000000000000000000000000000000000000..ae3c30b22c4da7e5c43935682c23fe4cb395ee0e GIT binary patch literal 133 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X)ID7sLn>}1{rUgjo>{da_1l}9A~O#haZpT<`Fd!DxZ7R_ eS$zf;35JKy6qMf;wIl(xFnGH9xvX + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/layers.png b/lib/editor/atto/pix/e/layers.png new file mode 100644 index 0000000000000000000000000000000000000000..d1cf1ff472ee5528540a1908a1e3caa989003d7c GIT binary patch literal 302 zcmV+}0nz@6P)zIHc@=*sf9a`j%T2)3pZ;%H_WNh6vjlNr{uu3o>=gZ- + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/layers_over.png b/lib/editor/atto/pix/e/layers_over.png new file mode 100644 index 0000000000000000000000000000000000000000..e987ddadeb0cb9de809bc308d428ce087d95c25f GIT binary patch literal 316 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X?s>X6hE&{2`t$$4J+o?q;B>~#X=l9{f_NQt7>)=#Sm^4$ zWp-qqU~+2l%D)_@OBh!(R+ubmZdWLEXclYWoncw5woz)M)R7|&iVW3^FKPlDWEqlb zmA=NZB(Vo9F!J{FY@D;7=~Zj9gNB5Em@1D3RJYz{JR_L>-{`Q7FCvFFWNhG6( zx|6e9i}b=I@d;NrAACOKm~r5ciG;(?Z#VW#VEEc(HA&p2!9u=6x6y*BKkr@>rNwnc3kbATngiv9vM6(-N03L!VdVLV3A;$P+X;3zUsO+(5DQZ Lu6{1-oD!M<6#{TN literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/layers_over.svg b/lib/editor/atto/pix/e/layers_over.svg new file mode 100644 index 00000000000..9961385b5a3 --- /dev/null +++ b/lib/editor/atto/pix/e/layers_over.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/layers_under.png b/lib/editor/atto/pix/e/layers_under.png new file mode 100644 index 0000000000000000000000000000000000000000..698c532a556f293fc80ddc54d436ff635da47825 GIT binary patch literal 299 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X&U(5yhE&{2`t$$4J+o>9>+~aQA~y>)gfI(mGkjzb@bmWm z-LS4t@Gh%|)YHZv3L!V-I_#ZzGY@1ji1qS19A#fn#1~*W!I6Jq5%&SMGjlA3m%HiQ zJ7mzo>7n89*Het4nlZ!Z#02Jma07u4Ow3oxm;)9x?O~Xt!H`s^Bc{NvWCc_q(#zlQ zgPD){P3I@3D>Kx^hj1V s*=F|OGgBpJXO`#8teKr53<3!Z2KBYY=XhA(0X@dx>FVdQ&MBb@05~sXrT_o{ literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/layers_under.svg b/lib/editor/atto/pix/e/layers_under.svg new file mode 100644 index 00000000000..bc4475735bb --- /dev/null +++ b/lib/editor/atto/pix/e/layers_under.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/left_to_right.png b/lib/editor/atto/pix/e/left_to_right.png new file mode 100644 index 0000000000000000000000000000000000000000..cf92d793e61ce7f70f10dd713369bd14fd3dc76d GIT binary patch literal 278 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xc6hothE&{2`t$$4J+sja+v+mL30VwDb!E>PtQV3uR}sc_xMz%YPg z0`CrnBl4bR46n-B7EHEdSjqWh2g4I{<`s$x^`es=2~A-9mC@$IkThYnj3*~^-3mp{ zDJ)7SCj49?)g;#|zi^}DG)8g9PRmdKI;Vst0A-h3E&u=k literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/left_to_right.svg b/lib/editor/atto/pix/e/left_to_right.svg new file mode 100644 index 00000000000..1642feda3a0 --- /dev/null +++ b/lib/editor/atto/pix/e/left_to_right.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/manage_files.png b/lib/editor/atto/pix/e/manage_files.png new file mode 100644 index 0000000000000000000000000000000000000000..021350389747c47768db730d9d30206382a7d6e1 GIT binary patch literal 295 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XPI|gHhE&{2`t$$4J+sja)9f(j39H(Rq%U8(Bqi~IK}{z~ z;jH+=9rGF)5?FRJWV~ioh@RhQFoUBckkO3U;hzADR~^H~Mib>(+gTc}R4e@BI3nHf ziBlquA=7O;--?TjzI;dc8M^cjh_jtYus34QxWKC7tk!TOV#CWOE6LdwMN^(K7cz45 z&E{Xgt>__E?Lg8Ec8Rl1u0m4^q$E06e0W5f9;PrDc!_jeZCN8G p#=T%pxx9vB*HZ;s9tK7>hV5(opDr`ok_7Y=gQu&X%Q~loCIG+wVmAN) literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/manage_files.svg b/lib/editor/atto/pix/e/manage_files.svg new file mode 100644 index 00000000000..b4bbac6c2ce --- /dev/null +++ b/lib/editor/atto/pix/e/manage_files.svg @@ -0,0 +1,18 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/merge_cells.png b/lib/editor/atto/pix/e/merge_cells.png new file mode 100644 index 0000000000000000000000000000000000000000..6a9accf3afc07cd459c3ecf541ea14c6d6ed4785 GIT binary patch literal 185 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XqCH(4Ln>}1{rUgjo>{e_@Y$J}A~O#haZpTXywsQR=y#_W zb0wn)--#I_hFyCd3Kbr4Ge6?>@b + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/new_document.png b/lib/editor/atto/pix/e/new_document.png new file mode 100644 index 0000000000000000000000000000000000000000..ba31eecc9b50d8669b1390ac83f84fb0effa15a5 GIT binary patch literal 240 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XCV9FzhE&{2`t$$4{oyw^H|rZ17`!kRU=t1w4(6V~DzT95 z5Bnz8#!2!UUNW8HW?1>%;g4X4Im1=e15aio@Wjlz_(Z0`f+6Dp6AyC-qeHWvf}~Mn z3iEb09O@RK^1?3mu%gT2{9%J<{z^ lBd_7u^;E%@hk=oeL0ZLPPtTR + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/numbered_list.png b/lib/editor/atto/pix/e/numbered_list.png new file mode 100644 index 0000000000000000000000000000000000000000..200babea3243add9a71cfd1d0278d29494467561 GIT binary patch literal 254 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X7I?ZihE&{2nq!(B#>~v@Y%5^CY}vA=8$6rS&xbJtDfn>M zBrs+&WjRduXpr*aFflR=;E343>9qHfLl0xm|NsA&pJ8?QZ?5q3yTXMs_8^{y-3%EQ zm;z2r&SE&h%IHwVB*1;(Pwz9WJsTOgT$mO9F>Hx!oMVvS;^i@=^_`Q!o{q;c!x{L(*{$V<&3^12aRNP7zo1*QNV_Ze{Rv^>bP0l+XkK60%fv literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/numbered_list.svg b/lib/editor/atto/pix/e/numbered_list.svg new file mode 100644 index 00000000000..fcd527a3929 --- /dev/null +++ b/lib/editor/atto/pix/e/numbered_list.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/page_break.png b/lib/editor/atto/pix/e/page_break.png new file mode 100644 index 0000000000000000000000000000000000000000..17be9c29fa03f1d6876904dc63494945a7f512b5 GIT binary patch literal 201 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XvOQfKLn>}1{rLaio|)tPEYsKaJ-!^ut5cH}2=JIQr=6dt z>)^q>OUf<4!-@6&^ZZDnSqIiL0-1i(KDN&7-%hnr>mdKI;Vst06i^24gdfE literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/page_break.svg b/lib/editor/atto/pix/e/page_break.svg new file mode 100644 index 00000000000..d657410379c --- /dev/null +++ b/lib/editor/atto/pix/e/page_break.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/paste.png b/lib/editor/atto/pix/e/paste.png new file mode 100644 index 0000000000000000000000000000000000000000..686d9f2016a694171194903749d6d7f3788812dd GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XR(rZQhE&{2`t$$4J+sja+v+mL39sCRw0wMh=N@QaHb@i{ zW_aYbK+R2|R^ZfePKorhv#v5Mc`ez&u5eg7K}Jlav(;e_L%-Vu^Dh@!C-Qc*Crx6o zjC1(N$Gx%6mHogCs|IZ`52nKh7{r1^n3>NpXr^*a$YC%sys7-re1pT{Rg7nsvDIAU zKEmZ7!(hhH@5H*mkuSn1igC(YhAn@X?3fEw-}W1vRp4`IU}W(8q^tHX_7XeL*$kep KelF{r5}E*6rB~bl literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/paste.svg b/lib/editor/atto/pix/e/paste.svg new file mode 100644 index 00000000000..b6d5daae8ff --- /dev/null +++ b/lib/editor/atto/pix/e/paste.svg @@ -0,0 +1,15 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/paste_text.png b/lib/editor/atto/pix/e/paste_text.png new file mode 100644 index 0000000000000000000000000000000000000000..810fc67ffb28a3fb8fac4478996d46a7bf41fd0e GIT binary patch literal 292 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xj(NH`hE&{2`t$$4J+sja)9hF&)Cp$ zl-bmfDbrDTR=+j6LBp2@}|Uztsqc^nNHk4T^R$`oO& nGkuf5 + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/paste_word.png b/lib/editor/atto/pix/e/paste_word.png new file mode 100644 index 0000000000000000000000000000000000000000..d9f65dd3f50fce04d07c0cb7107cd1b2f350d4b4 GIT binary patch literal 322 zcmV-I0lof-P)!N<6_;*c3bq!K6S(*9KPL#J+~v{T0AJpv;Dc=>dLOti-oDw*{Ap#73Tj z$sgq{Q3YlCkq~Ud?zg;3?T=<)s4ARU#Qx4zn4A`r7pz>cd!;&O;yf7n#CHJ(01^05 Un`HX%X8-^I07*qoM6N<$g7932Hvj+t literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/paste_word.svg b/lib/editor/atto/pix/e/paste_word.svg new file mode 100644 index 00000000000..5dfb98b2bb7 --- /dev/null +++ b/lib/editor/atto/pix/e/paste_word.svg @@ -0,0 +1,19 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/prevent_autolink.png b/lib/editor/atto/pix/e/prevent_autolink.png new file mode 100644 index 0000000000000000000000000000000000000000..afd724da5d48b145c371622194f5c93d0f55775a GIT binary patch literal 399 zcmV;A0dW3_P)?&1TTU@o)Yi{^u!Tp@ZI=p6~HMM4Uhs?;DU^qB0K=Ut_p-;OOiQQjL#jAxd3_gC5CeN)2ec%Q#J5@W+|$|G46u;zJt~pGwG5WFim3ulyJgQy z`v+=8ZrE1y&;om$oIt|Nse?2INgt@S$f{B@$IMtW;1l@ZJZ`K&{N9ENJJ?mRlD!g* z-9)VjXA3CL&hD8N>~NmcD&w_XKh*)JeO8-DTm*74Vt}`h>cD}8YXp8-mPQGq + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/preview.png b/lib/editor/atto/pix/e/preview.png new file mode 100644 index 0000000000000000000000000000000000000000..7aa7f9f791b8097f26d34b379c2dd2718857dac5 GIT binary patch literal 369 zcmV-%0gnEOP)gTOs5XLGBWWlSyNJl$5C<98(b3 zNP~5*jR?(+_EK?&)IPjK5CUE0py4KRJ)+IKr`&z^4j{bz=V$sPZUPJd#Ey9nG#HoN P00000NkvXXu0mjf$^e~v literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/preview.svg b/lib/editor/atto/pix/e/preview.svg new file mode 100644 index 00000000000..e1c1d3383c3 --- /dev/null +++ b/lib/editor/atto/pix/e/preview.svg @@ -0,0 +1,21 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/print.png b/lib/editor/atto/pix/e/print.png new file mode 100644 index 0000000000000000000000000000000000000000..da5ca353e86176aaf83cd46e140edf5e8ac9f465 GIT binary patch literal 202 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xay(reLn>}1{rUgjo>{elH8$bfo0}EBKEA%GF3*e&12`f! zbXZPGVtBkJacnd&Nc_;Pe98%i!ti=d#Wzp$P!B%}BZc literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/print.svg b/lib/editor/atto/pix/e/print.svg new file mode 100644 index 00000000000..d8d5b7b6658 --- /dev/null +++ b/lib/editor/atto/pix/e/print.svg @@ -0,0 +1,16 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/question.png b/lib/editor/atto/pix/e/question.png new file mode 100644 index 0000000000000000000000000000000000000000..bc6524853c6f84b067c50178c5c0c0d1cc05ed58 GIT binary patch literal 272 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XHhH=@hE&{2`t$$4Ju}CddA8Dr6!=V*En8;RAmPLFq>)LY zIfnU1B9EAgqdU_qp#}@NSb;o-3;ygMUb3}KWHu{Yw1?qJ4#N_r4JS7WT+m=x;;?XT zzgnr_v4j>^WwEmg_Wllh1`0noj09fX<*eXk$ck%FJs{S!h=0XTX2ZAuha`KJqYUdD z)YJszA9O3m= + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/redo.png b/lib/editor/atto/pix/e/redo.png new file mode 100644 index 0000000000000000000000000000000000000000..f79afeebf39e4a8a333edee8844607860f42afd5 GIT binary patch literal 289 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X4tu&dhE&{2`tkq2J+qxn_B9=Lg}4Uqd7X_G0`}G4-mudZ(XE@o^RmpX^N(C(89YJg;R4;*CgZwqRb+ j)*v*AX(by2iv+{T&vVOd9&>&GdWXT&)z4*}Q$iB}@;zaw literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/redo.svg b/lib/editor/atto/pix/e/redo.svg new file mode 100644 index 00000000000..d9cd7bd13e7 --- /dev/null +++ b/lib/editor/atto/pix/e/redo.svg @@ -0,0 +1,15 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/remove_link.png b/lib/editor/atto/pix/e/remove_link.png new file mode 100644 index 0000000000000000000000000000000000000000..4f5c8225db0c99f60dd0bb1e2c7a49a6d97ab3f2 GIT binary patch literal 397 zcmV;80doF{P)m&<^YXUv3_lTf>-{H_K-CWs{fS#&L|guFJ}@93o}# zjqo|Oud(d7?SUHScQ0gYez6wOg5gXE6>ufCzySZs^W`t#U^$0 zlR-{c)>8wcRWq4HDKX{CvnH{j_6<1cmti@O@w<_ir-RsNRS~3|Q{Y|?*&KjrZ>(04 zlxcFPm0xNVEe$&W + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/resize.png b/lib/editor/atto/pix/e/resize.png new file mode 100644 index 0000000000000000000000000000000000000000..efbdde77f5a589eb34fcafb228a2a013fba92e3a GIT binary patch literal 205 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X@;zM~Ln>}1{rUgjp4l?t+nbvSy*@l5Om0Q749q$z7B?9^ z8b35%xpIZsp^n*;&B64#^G)`IoFE>H1~>Cdc037ztY3_kubfv%H)s0E+iW6L=qh^U zq>HQawG~WFY)Oj+vqLVLNp*H=&2m$AXkcUrZwXt&wSV0_pw$eXu6{1-oD!M<6T?HI literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/resize.svg b/lib/editor/atto/pix/e/resize.svg new file mode 100644 index 00000000000..e1e2c452f23 --- /dev/null +++ b/lib/editor/atto/pix/e/resize.svg @@ -0,0 +1,16 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/restore_draft.png b/lib/editor/atto/pix/e/restore_draft.png new file mode 100644 index 0000000000000000000000000000000000000000..3bcc81888d645aa564be8ade13386ecf64f6790a GIT binary patch literal 319 zcmV-F0l@x=P)A&zsqSJ1(1J?=Gq9+F5HWMQfTy-UWr4TL(z4 zn+6jQcsx(Q5jX=|wQd7&0MRH;%Af|Wlf!bG0rrGpOfjcNrMWm+;0CiSljit)EwEv= zyEKqk#%d?AxmO~DAp(sL?hQ#tjEVPN{bGMWkU_ALLnH!4J3wLeGA>=nIkpA+98 + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/restore_last_draft.png b/lib/editor/atto/pix/e/restore_last_draft.png new file mode 100644 index 0000000000000000000000000000000000000000..f0d64bb578d86efbec18e743bc994d5ce739df26 GIT binary patch literal 348 zcmV-i0i*tjP)x*paboI4sh1YB^UGr;wF>L?e6T(El1Gz{o)_fzC>A;DV$&n zEP)zmfFjGXhph{S3P2RX4OlVM0v!-KWk)nQd^8~0aAF1I?lh_@m_H$x4;zTY4X{V@ z%$O~R5i>Zic@=3AD~FtrTwC%tqoRbzTsgUjz8KrQDB*5)+L3MTikSEd3R5S3XFO(u zH&1bLI~YuDuU!RmpR)HeP9&!e uSss$n6N$$6l=Z~nA(v}Lf2O(i5?}yq?RIjAc*IWt0000 + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/right_to_left.png b/lib/editor/atto/pix/e/right_to_left.png new file mode 100644 index 0000000000000000000000000000000000000000..1dbf423438b682755ce10368b1b80528d9ebd592 GIT binary patch literal 287 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X4tlychE&{2`t$$4{oyw^Hw#NhNJuqA%xg5Tm@#YCD~87# z7);q2UjF1sVG>iA*WjF|C}7X&J20{d6{rMlW}L8#;m9wa z6pPyoQgi>P9A`4Qc+hmRaIg3UVIfa8hQpjoB&Tf9n>2SqLt9OQ)TW7Vrf?XsbT~fT jIAPHe9upNtg#!#v-&%fB39L#1dWON%)z4*}Q$iB}+sI^I literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/right_to_left.svg b/lib/editor/atto/pix/e/right_to_left.svg new file mode 100644 index 00000000000..381a35cb87d --- /dev/null +++ b/lib/editor/atto/pix/e/right_to_left.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/row_props.png b/lib/editor/atto/pix/e/row_props.png new file mode 100644 index 0000000000000000000000000000000000000000..f0c958232b913798567fe5f3ccef2ce36cd9accb GIT binary patch literal 155 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XY&~5ZLn>}1{rUgjo>{da_1c<9k(mdMIB3qWEPhr$!F+Hq)$ literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/row_props.svg b/lib/editor/atto/pix/e/row_props.svg new file mode 100644 index 00000000000..cb4a14212c8 --- /dev/null +++ b/lib/editor/atto/pix/e/row_props.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/save.png b/lib/editor/atto/pix/e/save.png new file mode 100644 index 0000000000000000000000000000000000000000..e0ddbc50a5d93da1ad36604651e17116a5547ffd GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XVm)0PLn>}1%`wfsR?qh7z@aNwuCR!)eRBNs=H_O}83{HE zGJ9@>G#;7wbitce1LqkhHcCAyk(k}t=;W}Gk%d`MBH(|g8AG_kr7PTv*%Xd48SIkL j@MZtaeuSHWk&U74vS``)qi^;CEn@I=^>bP0l+XkKK`=tv literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/save.svg b/lib/editor/atto/pix/e/save.svg new file mode 100644 index 00000000000..580d87f51e7 --- /dev/null +++ b/lib/editor/atto/pix/e/save.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/search.png b/lib/editor/atto/pix/e/search.png new file mode 100644 index 0000000000000000000000000000000000000000..3e56e58cb98714e37c654a34613290456ffe922b GIT binary patch literal 215 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XDm`5sLn>}1{rUgj{_vZdoBtapFs@v=vPVH`zK!sdw;kTb zdX+OIgqd3t9`Gj2G0ncls<767*}rZdkqkD*TBo>-mZUiitqqJ{MOc+IbQdgbca-R5 z&S%gOlWJ_d${@`0Y#*DBVM8eIiH2?kwg86M!>%S~VWtd>Yz+4{s$XGN>pB2*1cRrm KpUXO@geCyp5=V0Y literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/search.svg b/lib/editor/atto/pix/e/search.svg new file mode 100644 index 00000000000..37f3390a7da --- /dev/null +++ b/lib/editor/atto/pix/e/search.svg @@ -0,0 +1,20 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/select_all.png b/lib/editor/atto/pix/e/select_all.png new file mode 100644 index 0000000000000000000000000000000000000000..a9994cf2bf1641fc10c2b2355b86e9966879761b GIT binary patch literal 410 zcmV;L0cHM)P)1z#b^bDgA%Q!t+naa!8cznx?6-X25Gq2J(;~Yf#qpFbopEQN>JU z53=xl;%4zH;DFm#Sl@vS_ayeBWG%tgEK=X7N)$LG(GtbBz(vWz^HIZc%5~g-W*y^g zh`OEW&C*2F-x=T9RZI8LQ;k$1#4nQDL;~&GBY}PAn!zm(*66{UNH7yih=#-&@(twW zj~<+ZA>S!qZNnbq5xHQgQsU&zc#g!kIb8GEKFwaqSvZLk660BzTQ7W>g{xz%pkMij ztl3*a$@(8Y7|%GFd;1%6GhuSzVCG*NJyAuarT+*p0FE7UCQ>y7lmGw#07*qoM6N<$ Eg2m^xJ^%m! literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/select_all.svg b/lib/editor/atto/pix/e/select_all.svg new file mode 100644 index 00000000000..74b75b7bcd6 --- /dev/null +++ b/lib/editor/atto/pix/e/select_all.svg @@ -0,0 +1,27 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/show_invisible_characters.png b/lib/editor/atto/pix/e/show_invisible_characters.png new file mode 100644 index 0000000000000000000000000000000000000000..15e7fa4e6b0134765e7696fa5f7fabf2c0e11eee GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X>O5T>Ln>}1{rUgjo|)s!Jlkjn4_$_&dbURg4qmwu!Y-zA zmc1cjexu6)rlrCK8Fd_`q8wKa=d?wAW4PJCAR}hOV6~a?mDdbL_Jkyb14kSb8zeV0 z1~EJQ+vBl~(ZRl!A&Adm&%`?s4U$3(yaoXpwFVdQ&MBb@0D-YeRR910 literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/show_invisible_characters.svg b/lib/editor/atto/pix/e/show_invisible_characters.svg new file mode 100644 index 00000000000..4532154d360 --- /dev/null +++ b/lib/editor/atto/pix/e/show_invisible_characters.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/source_code.png b/lib/editor/atto/pix/e/source_code.png new file mode 100644 index 0000000000000000000000000000000000000000..9d8444b9200fbf609e60af4efdbfd30736a53aa8 GIT binary patch literal 241 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XCVRR#hE&{2`t$$4J+o><;Ri{B>Thp29ZoTH*e_YOjLqSw z8G|OH!afEOZHKV)Ez2qyC!A`Ry3n9KN_j3G*L9rjEcnJ+Bk&S-1qv0ymz z$6=3v#(W0zh6!mkZ3gFNnRaWO-NBQXv_K%>9qTF(CO9~M;!otF$M lW`dEQ70z-mVQOGtW>C9T6Xz^DGYRNC22WQ%mvv4FO#oMzP+tH5 literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/source_code.svg b/lib/editor/atto/pix/e/source_code.svg new file mode 100644 index 00000000000..a9846eacbcf --- /dev/null +++ b/lib/editor/atto/pix/e/source_code.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/special_character.png b/lib/editor/atto/pix/e/special_character.png new file mode 100644 index 0000000000000000000000000000000000000000..7734bf72a1672d13ab17922f7f478647ff1ed364 GIT binary patch literal 363 zcmV-x0hIoUP)AK0vqZ=))VjwW-!@44A7imzM;6rW~SZ%IyoR^nL}s1 zvMi@4PFy@KuV29oINiK{1$mI13o*l@J_N~TKzdp+(2^*OOU5*1Sl$IF zrDn+?3`0v#M~22%N{-A&$A!+`iT>~|K#8%zyQrRT*fGB8@B)e002ov JPDHLkV1oLVmN) + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/spellcheck.png b/lib/editor/atto/pix/e/spellcheck.png new file mode 100644 index 0000000000000000000000000000000000000000..56b4d87ac7ffebeed0c4647d77b606a9b2cbf336 GIT binary patch literal 306 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xu6VjQhE&{IGU=e;Aq4@~={?_<2w!e2OY)2HRj+y`VttY8 ziqIQ{kcQpA0$o%rej4*^*qr~lyt(MyM8hKg*%6h?xA{pyHS^=$P$<>ZI#*qnS+?uSq5&MrjhkcUvK3c$Bpi?xVp?}A= z`m+rW#XcBWyLdj?dj3Fo-0M5>6OQOQGe79tZanWjGv9CVTAqoG^R~;bQ;*Z0lYgn4 zr(V=yqGFYWSp2>zc1z^S)E}lW-guK>&E5TuiHCvlOjf6=cXB4se+-_kelF{r5}E+1 Co_In4 literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/spellcheck.svg b/lib/editor/atto/pix/e/spellcheck.svg new file mode 100644 index 00000000000..06f37c0d439 --- /dev/null +++ b/lib/editor/atto/pix/e/spellcheck.svg @@ -0,0 +1,16 @@ + + + +]> + + + + + \ No newline at end of file diff --git a/lib/editor/atto/pix/e/split_cells.png b/lib/editor/atto/pix/e/split_cells.png new file mode 100644 index 0000000000000000000000000000000000000000..0383e82746e379d265df984e8cf64581c1d4aadb GIT binary patch literal 212 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X$~;{hLn>}1{rUgjo>{da_1c<9k(mdMI4CAGUh2zu^t)4R zwq^0N`Tz@sk?u%!7)g7ETK35MJhl_io> zI3hP_vUx689xy>FXXUi4xCJ_51sMqnhXUB#yfzy + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/strikethrough.png b/lib/editor/atto/pix/e/strikethrough.png new file mode 100644 index 0000000000000000000000000000000000000000..40a85f3d6b132dc9f59f2a00154c98c7cbadd758 GIT binary patch literal 313 zcmV-90mlA`P)Ba0H*;!%?3c~01)%zu<#=gI{*#2025$AQ?LO^^F*j&Am9MR`A|8K z8Uu7&sD8BY+eOu&4~cnUHV+p!XV}vA_WI1|!y304n;ABO38~0U11m#zH;NFaazH z38n_80Rc#{kdLH^0h|9pfC-rcP2&d8D8m+w2FUq + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/styleprops.png b/lib/editor/atto/pix/e/styleprops.png new file mode 100644 index 0000000000000000000000000000000000000000..888ead7c9f6f12b31194a69572e7da0125057eca GIT binary patch literal 312 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XZh5*mhE&{2`t$$4Ju}alS*F>H6S~@qm@i+tWM&}1;Nvli zb%IH=0~51g181jfgW7X`(P$7z~MqBw*Vam(OQO0KMPlQvLvy`Y&^_zMW(^sSVM>JLAR`$N@KUfWXVK{6yYn{ zd_R)dQyT22>}7})y)sjn<0v2Z6|))!%QCJ7_dFY<`X=#hU~JmxyoT|U1MdQ#&2q7P z%Nc=2<}q*!Zfj0D&Tuwig7*){95tD3+yWi46*&wn5)AhXgH!mH7MTEj$>8bg=d#Wz Gp$Py|S7-nL literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/styleprops.svg b/lib/editor/atto/pix/e/styleprops.svg new file mode 100644 index 00000000000..32bbafd9e84 --- /dev/null +++ b/lib/editor/atto/pix/e/styleprops.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/subscript.png b/lib/editor/atto/pix/e/subscript.png new file mode 100644 index 0000000000000000000000000000000000000000..a3df87d292d076e929d4e140e630e2bcce5168c9 GIT binary patch literal 316 zcmV-C0mJ@@P)MWWzA{ + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/superscript.png b/lib/editor/atto/pix/e/superscript.png new file mode 100644 index 0000000000000000000000000000000000000000..94bd6609dcf4c58a124e211b41e9b2ee5b764abb GIT binary patch literal 336 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XK6$!0hE&{2`t$$4J+o%Qw>LN09K0Bgr6(%L`Y|%H_sZPy^=Lf?PK8HIDN90c$CNN$RRamdFfq{7`V_H#G)+-hn#_$H2f`IUbz05@i znHAQt|72fLz$kWBVPoBjS?mFcl^Xl!35xVOxN=M}-?7Nr)L7 zy2Q9kF+gg4nh5g-i9-$^#%+uN&U^~0Q<@#l^8HxU!s*>`Qx z=PUZ`aFTwN-_&N{?d|=zM=Lq`G57OxbE`R0*cvX`O<2nza=YOj(*!nm1+yb!w*m~E gS4i + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/table.png b/lib/editor/atto/pix/e/table.png new file mode 100644 index 0000000000000000000000000000000000000000..f9950b91e82162f63cb9ab1959d9048bf14ab17a GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XtUX;ELn>}1{rUgjo>{da_1c<9k(mdMIB3qWEPhr$!F+ + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/table_props.png b/lib/editor/atto/pix/e/table_props.png new file mode 100644 index 0000000000000000000000000000000000000000..b67c2753857a9f122f52918ca9f7cf9c15875303 GIT binary patch literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xj(WN{hE&{2`uYFAJ+o%QwKb7U4q1!>&6#2g7&fZauq3f7 z=rJVK&rlHNoWxv)jVgfU#O*_`{?9BfYNdf8d3`w;sv>n=18+ekHE}b_x zt8jq-6Wax*35?P+Jg%H!D6L~UV{mMyar(dGkDqf!m^3pLGG9^U*>UIqV|yC=f?NC- zG+5e2?er6F@LcU-isJ;P>6$p>7_jtXWDj}HIsVRT??m}G3E=GxQQ=;W}G mamS&C3TBV9=Uy-<9AKDrv@nL_zbw!{3=E#GelF{r5}E+ar)l8; literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/table_props.svg b/lib/editor/atto/pix/e/table_props.svg new file mode 100644 index 00000000000..55e468f6422 --- /dev/null +++ b/lib/editor/atto/pix/e/table_props.svg @@ -0,0 +1,15 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/template.png b/lib/editor/atto/pix/e/template.png new file mode 100644 index 0000000000000000000000000000000000000000..76b3c480f7c55da03dd3e240cf04d21858e1881a GIT binary patch literal 209 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XialK%Ln>}1%`wfsR?o)8z}?~D>zk_L{`t+#&Hs%J12`fk z_%?5J)NA@U@utHAjw8P(#-44;k=hhqu(6ThrUP5o-UBUi8V0ijr1=~!aZA3($H7Pgg&ebxsLQ E0MtiEPXGV_ literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/template.svg b/lib/editor/atto/pix/e/template.svg new file mode 100644 index 00000000000..8d8dd2b198d --- /dev/null +++ b/lib/editor/atto/pix/e/template.svg @@ -0,0 +1,15 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/text_color.png b/lib/editor/atto/pix/e/text_color.png new file mode 100644 index 0000000000000000000000000000000000000000..10fad87af5d996189e9c485304cf58181f2927e8 GIT binary patch literal 302 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XE_k{)hE&{|5_Frl*?@;<;s3X622R$D+9@r4M>u*M%ucYS zvbZg{&+8?7QsH#rqJ)#1o*X|~UikU5-HI!5+qcDL9D4s-_)xpK8PfsrHhHEDmYWK9 zGX1z~H=l|QI?Z$-+qS~t{dxwAp0+1Et5X?uKHM*2h}f*k(Ei$8kbRQ8!StMk#!8Zn zvjj^!?sx2K5eVr$elOXN`_a`IlQn$A8Pxm|RbThEh<%^ + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/text_highlight.png b/lib/editor/atto/pix/e/text_highlight.png new file mode 100644 index 0000000000000000000000000000000000000000..93ca46390488c7914795d52b2ec43507784540e6 GIT binary patch literal 309 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xu6w#ThE&{2`t$$4J+sja+v;sh6Ly_%kkweWY?+;dSi+%2 zCmI>e4@@|m=D;Aw%+z6cK)!P>$I%;440suS$=_^iclfWzkSHMCF2y6R;GK8i;IV9m zA_dt42i-V5+#*bv=B6<$Ij4Nma*^ad`OaL9FSl3)npyoh-m42pi(lB=p#Q7DP5lNp zOOQPCzL1kmN56GD#56cxW>L82e#y9z)%!%#qkjx$cO9lTU2?IXG>_BA!I5!`NEt)_ z=7~@LI9AQPkW + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/tick.png b/lib/editor/atto/pix/e/tick.png new file mode 100644 index 0000000000000000000000000000000000000000..a1b2f9b0a1a6996d44308b139287fd65bc0d29b0 GIT binary patch literal 274 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xws^WYhE&{2`t$$4J+o>)1TOu}aMf-8S23s@UCimEvL-P#~>cIC>I;xm>mUFtaNxw9(I zxw+QMGjekFG)kO(;4sHD`x?8#+5Tl2ic^lQmSl-=U~;HoI6I+2$FXstQOnd>X zI~c;werRzyATVcEV2~1@^M|ZsvxFKI^BH)B*_>t-s-><_*-gN}OQ V6eH>O=|J~0c)I$ztaD0e0sz3}Ug7`% literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/tick.svg b/lib/editor/atto/pix/e/tick.svg new file mode 100644 index 00000000000..43f43c6fa60 --- /dev/null +++ b/lib/editor/atto/pix/e/tick.svg @@ -0,0 +1,13 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/toggle_blockquote.png b/lib/editor/atto/pix/e/toggle_blockquote.png new file mode 100644 index 0000000000000000000000000000000000000000..fed739cac89c1aeffe7679ed750b138552fdbe7e GIT binary patch literal 290 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xj(EB_hE&{2`t$$4J+o>XQ8tYi?dHZ|SK zI9n~nR41cJxZ#GJXD+i?uSQnH1Qk98L;H|FiURfr7D+nuK3)^KnPowjqmaDgHm13D zjK0QxrVAW&9E?O$4zudqJGPST3Dbm=pE9Hz&J{D<`o!>xX-?LR4ITy#N4YNih`9Q| zo1N1|rI|%7V}SsZ{Kut7SS_B2JxEx*BC$!Wr#*s+!&0koRik=pf`@g3lczopr0P4GB`~Uy| literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/toggle_blockquote.svg b/lib/editor/atto/pix/e/toggle_blockquote.svg new file mode 100644 index 00000000000..8830393cc15 --- /dev/null +++ b/lib/editor/atto/pix/e/toggle_blockquote.svg @@ -0,0 +1,16 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/underline.png b/lib/editor/atto/pix/e/underline.png new file mode 100644 index 0000000000000000000000000000000000000000..b0b3b06afaf85dc5ee818acd7b4e5ffede018cfe GIT binary patch literal 256 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X7J0fjhE&{2`t$$4Ju}CddA7e9CTwDV)Vy-#NT_vEwdWHP8M>p$PX>+y!uftM|ym&qZ9Aw}=NvT1_Tgcf$` zFSz+hpyTO9oxL1Bt!z8?Fcdv=Q?c9itT(`vCnC1tSvz#!34$fx0%Nzwtwhy_7&CNMDZFeDtYNax?vo(FU-gQu&X%Q~loCIA&u BSF->B literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/underline.svg b/lib/editor/atto/pix/e/underline.svg new file mode 100644 index 00000000000..b1ad768d862 --- /dev/null +++ b/lib/editor/atto/pix/e/underline.svg @@ -0,0 +1,15 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/undo.png b/lib/editor/atto/pix/e/undo.png new file mode 100644 index 0000000000000000000000000000000000000000..c073b1a4350d9c0eb6b968ffc65aea640d9cb0ce GIT binary patch literal 298 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5X&Um^whE&{2`tkq2J+qlj_O&&v4sRN~<=SRSY-qT-IbEM2 z=p&B{gPNB~GlTL8$qEy3rjM)we!jkc8?G}b<M + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/visual_aid.png b/lib/editor/atto/pix/e/visual_aid.png new file mode 100644 index 0000000000000000000000000000000000000000..f3580e7d89f33a49000896901cf4997b31b2592f GIT binary patch literal 179 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`k|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XLOop^Ln>}1&9N+gR?ns~VcN7~7TMQyL=0mdDHyU%V01Xp zz$>hL{D_0%f*TBO6O1*A7`HJrGbTOJ_{PM&%lE}a*5t=s_Zs_;B?@pe%lC?~D>*bU ZGW>l$zwx<=_XeN^44$rjF6*2UngCgPI-LLj literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/e/visual_aid.svg b/lib/editor/atto/pix/e/visual_aid.svg new file mode 100644 index 00000000000..4c6aca2111b --- /dev/null +++ b/lib/editor/atto/pix/e/visual_aid.svg @@ -0,0 +1,14 @@ + + + +]> + + + + + diff --git a/lib/editor/atto/pix/e/visual_blocks.png b/lib/editor/atto/pix/e/visual_blocks.png new file mode 100644 index 0000000000000000000000000000000000000000..fe2c18397b7e71d40008987e8f3766a113f37acc GIT binary patch literal 382 zcmV-^0fGLBP) + + +]> + + + + + diff --git a/lib/editor/atto/pix/logo.png b/lib/editor/atto/pix/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..c7438a9075a9f84a2f41f0de41f1746343e25622 GIT binary patch literal 2795 zcmb7Gc{tQtA3rmO#$+t7Tb2-Glw|i-GWJY^gcvfm#*%#*>)2u{F&A-B$cU096GdfB zb|Kp>TM=2VNcP4u67TQc_xNpV)?G;CqpabUu6|e%Y5sa zUb~SwyuSXU@k5A2$5=AXJyg7(-E>`KD@RSIpWV~*Q7!W>9SM&XnO+8nWjwO!tUl-y zfK!tBX+g0dM;b9HCI#k@Fm=M;b@5&HHB2j*0vRwmhcXAPQHxz87Y8$zrulCYk&_xU zAI#2dTA5(#Q|=}#h=F+kT}+8Fdh;}+AaZ~H!(p;5lv{oZu}#PGksvr6VCD#b}j$?XF^wC zJ?`OH^5!Y?G_2AG-XHnjH(Gfn{UhzvuFq;VIm_z3xRfd~f0S zNucfj!u2o6h55zAl2VT9Os`J0GP_G1UyFYI`n9vK@6GqQ{(z|#&c*RpLK71c8s|qj zcqBNeThfDmW`q<88BG2Q_kN8YT==?c9d$)w<2)YE+5YAYbE0bOGvDO$8!8pW!&5Li zYHJ10GCB6Pt1A_UQ&UUdTpA;cRr?pKx%Zg|1*r)L42_If8XD61$q$NBr3n_Uu2}K2 zfw2wOejKAdmWEaNjmynlG&Nn`WG{YvQBqR!E1mxQ`SV!7p`zeWcV~2LtmL>DH)V5? zguyVGOw5nhcg8JjZAGDVhlVz?;|qaeq|qSxVP)l^Je?Tp-Cm#5t*xyAmRtw~0LI3~ z8lky9GVdhC2~ERHr7K0l!`2wg za~t`8`g~Bf8aurxNm&>yStq|G!QgQC{P-)X7H?-=T5hiCvGlGbIC!8HxycfpdmXt& zMDOt^HGLf@o{bq5f$i?@K7Rh(;$4`puP@Qw-lVp+mS|}?P!?d8qdsK~!y4re4ide* zy`?ev3kzNm+pALJ_2KCdnt!MV1qOEZ_xrD+%AH!d@Ez*Xy64Zwu%h*G2eXifL77%BWF|vC%4yT0>zG-EK-p{7PXd<+-5sN4WZB$8{TZKN;R9Z?gp z!L+X`EW}sLZQaqx^P|(Dr#qCFB6c>-y42>KOSVRcoFHs^W@dJYU|_%^T_KS~1O%?S zx(Z*RL5`=5YixvvMMS(EC^Rq_dFl{k>4ny^$@P{6vNei)8De!P3^C@$0|Z)3bR zD4tGVUtbRv(%lNDZLNHs>1CW5PkWIrb|FLllD+Edz}bXW)%N!Gu#JVg^$pJLsN$-! zTgf8YAWQYCab7r1TS-pty$a??of&6GTN`Ven%I6LHa0eTq?+6eZ;voFO=bp~ zw};-^*RkP@#+f3lQK0mzg#J98Zo-p-0_@^w<-v1tvW%E_`S_Z!H4N6M1vA1yW5gn?$ z0NT3!MBeL~C-M#*h~-7FF&jMfY?Qm8 zIe7{(uc;%!&ku|&wu%Omae=sb%`^RKae@!Z%gr4nPI(clf4wt-39$qz z-p!EbxURKzhO?H2hOJfY7 zGjGri&T5!AK>+&lbd;0`c>GySl$bh2*U`_*t7YiP<&eZ)%KSBgxqp{)g?b2qf3cck zb@_7lY+_=fXG<)%)|ZRM#ulH@!HXYMil`j5IL~DrX%vvndntpFQ&1>`!aG~p3C`Z$ zHV+F^zmKDurWO|z#6k#+Pk8DBE{Jw4i%nB)7Zw&gzVzJlTPeSOj3(6q#1|)CA9+Px zd9(7l@kdW4gOONXt{k(1So*?K32apC4g#7_G-=A!FpcBQZoJZetvXUC`hHW-kw;X;vb^XYu z@e19f&nwW_<>E|)PZ;-D?tVr{d!0S{rJX2xGN$~t4QHRztupi@(h6JEHc!EFZE^B1 zdDH~LGWsM-nkU@SS<6R@ZZ@E;&^ftbkYYg`oqRf!s($&9f^UP(qfHbvC_ n7>!KEEF-7?mrDCP0k_BZAwUpir97hp2~%K%H#K;wPrmUlg%}Fu literal 0 HcmV?d00001 diff --git a/lib/editor/atto/pix/logo.svg b/lib/editor/atto/pix/logo.svg new file mode 100644 index 00000000000..8839120f65d --- /dev/null +++ b/lib/editor/atto/pix/logo.svg @@ -0,0 +1,91 @@ + + + + + + + + + + + + image/svg+xml + + + + + + + + 10-18 + + diff --git a/lib/editor/atto/plugins/bold/lang/en/atto_bold.php b/lib/editor/atto/plugins/bold/lang/en/atto_bold.php new file mode 100644 index 00000000000..025b6d73429 --- /dev/null +++ b/lib/editor/atto/plugins/bold/lang/en/atto_bold.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_bold', language 'en'. + * + * @package atto_bold + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Bold'; diff --git a/lib/editor/atto/plugins/bold/lib.php b/lib/editor/atto/plugins/bold/lib.php new file mode 100644 index 00000000000..41b3a2d60d0 --- /dev/null +++ b/lib/editor/atto/plugins/bold/lib.php @@ -0,0 +1,48 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_bold + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_bold_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/bold', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_bold-button', + 'M.atto_bold.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'style'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_bold_sort_order() { + return 0; +} diff --git a/lib/editor/atto/plugins/bold/version.php b/lib/editor/atto/plugins/bold/version.php new file mode 100644 index 00000000000..0338f98251c --- /dev/null +++ b/lib/editor/atto/plugins/bold/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_bold + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_bold'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js new file mode 100644 index 00000000000..5e00ad397ff --- /dev/null +++ b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_bold-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor bold plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_bold = M.atto_bold || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('bold', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'bold', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js new file mode 100644 index 00000000000..b83c7a8f3ea --- /dev/null +++ b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_bold-button",function(e,t){M.atto_bold=M.atto_bold||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("bold",!1,null),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"bold",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js new file mode 100644 index 00000000000..5e00ad397ff --- /dev/null +++ b/lib/editor/atto/plugins/bold/yui/build/moodle-atto_bold-button/moodle-atto_bold-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_bold-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor bold plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_bold = M.atto_bold || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('bold', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'bold', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/bold/yui/src/button/build.json b/lib/editor/atto/plugins/bold/yui/src/button/build.json new file mode 100644 index 00000000000..112075088a9 --- /dev/null +++ b/lib/editor/atto/plugins/bold/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_bold-button", + "builds": { + "moodle-atto_bold-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/bold/yui/src/button/js/button.js b/lib/editor/atto/plugins/bold/yui/src/button/js/button.js new file mode 100644 index 00000000000..f48b4ec66da --- /dev/null +++ b/lib/editor/atto/plugins/bold/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor bold plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_bold = M.atto_bold || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('bold', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'bold', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/bold/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/bold/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..e668c0ffbdd --- /dev/null +++ b/lib/editor/atto/plugins/bold/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_bold-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/clear/lang/en/atto_clear.php b/lib/editor/atto/plugins/clear/lang/en/atto_clear.php new file mode 100644 index 00000000000..3d5b5acdb2a --- /dev/null +++ b/lib/editor/atto/plugins/clear/lang/en/atto_clear.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_clear', language 'en'. + * + * @package atto_clear + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Clear formatting'; diff --git a/lib/editor/atto/plugins/clear/lib.php b/lib/editor/atto/plugins/clear/lib.php new file mode 100644 index 00000000000..831ba031b4f --- /dev/null +++ b/lib/editor/atto/plugins/clear/lib.php @@ -0,0 +1,48 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_clear + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_clear_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/clear_formatting', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_clear-button', + 'M.atto_clear.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'clear'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_clear_sort_order() { + return 10; +} diff --git a/lib/editor/atto/plugins/clear/version.php b/lib/editor/atto/plugins/clear/version.php new file mode 100644 index 00000000000..3e37bef73c7 --- /dev/null +++ b/lib/editor/atto/plugins/clear/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_clear + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_clear'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js new file mode 100644 index 00000000000..5a4187ca828 --- /dev/null +++ b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_clear-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor clear plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_clear = M.atto_clear || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('removeFormat', false); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'clear', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js new file mode 100644 index 00000000000..a8c661cf363 --- /dev/null +++ b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_clear-button",function(e,t){M.atto_clear=M.atto_clear||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("removeFormat",!1),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"clear",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js new file mode 100644 index 00000000000..5a4187ca828 --- /dev/null +++ b/lib/editor/atto/plugins/clear/yui/build/moodle-atto_clear-button/moodle-atto_clear-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_clear-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor clear plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_clear = M.atto_clear || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('removeFormat', false); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'clear', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/clear/yui/src/button/build.json b/lib/editor/atto/plugins/clear/yui/src/button/build.json new file mode 100644 index 00000000000..aeee2de6040 --- /dev/null +++ b/lib/editor/atto/plugins/clear/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_clear-button", + "builds": { + "moodle-atto_clear-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/clear/yui/src/button/js/button.js b/lib/editor/atto/plugins/clear/yui/src/button/js/button.js new file mode 100644 index 00000000000..5630e0af88c --- /dev/null +++ b/lib/editor/atto/plugins/clear/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor clear plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_clear = M.atto_clear || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('removeFormat', false); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'clear', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/clear/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/clear/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..39aab1ce8c8 --- /dev/null +++ b/lib/editor/atto/plugins/clear/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_clear-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/html/lang/en/atto_html.php b/lib/editor/atto/plugins/html/lang/en/atto_html.php new file mode 100644 index 00000000000..7862697811e --- /dev/null +++ b/lib/editor/atto/plugins/html/lang/en/atto_html.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_html', language 'en'. + * + * @package atto_html + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'HTML'; diff --git a/lib/editor/atto/plugins/html/lib.php b/lib/editor/atto/plugins/html/lib.php new file mode 100644 index 00000000000..cae6aff569b --- /dev/null +++ b/lib/editor/atto/plugins/html/lib.php @@ -0,0 +1,48 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_html + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_html_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/source_code', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_html-button', + 'M.atto_html.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'html'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return array groupname followed by the absolute position within the toolbar + */ +function atto_html_sort_order() { + return 15; +} diff --git a/lib/editor/atto/plugins/html/version.php b/lib/editor/atto/plugins/html/version.php new file mode 100644 index 00000000000..2717c779c81 --- /dev/null +++ b/lib/editor/atto/plugins/html/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_html + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_html'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-debug.js b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-debug.js new file mode 100644 index 00000000000..56e74812689 --- /dev/null +++ b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-debug.js @@ -0,0 +1,61 @@ +YUI.add('moodle-atto_html-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor html plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_html = M.atto_html || { + /** + * Are we in html editing mode or not? + */ + ishtml : false, + + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + var textarea = Y.one('#' + elementid); + var atto = Y.one('#' + elementid + 'editable'); + + if (M.atto_html.ishtml) { + M.editor_atto.enable_all_widgets(elementid); + atto.setHTML(''); + atto.append(textarea.get('value')); + textarea.hide(); + atto.show(); + atto.focus(); + } else { + M.editor_atto.disable_all_widgets(elementid); + M.editor_atto.enable_widget(elementid, 'html'); + M.editor_atto.text_updated(elementid); + atto.hide(); + textarea.show(); + textarea.focus(); + } + + M.atto_html.ishtml = !M.atto_html.ishtml; + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'html', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node", "event-valuechange"]}); diff --git a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-min.js b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-min.js new file mode 100644 index 00000000000..db7828bc120 --- /dev/null +++ b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_html-button",function(e,t){M.atto_html=M.atto_html||{ishtml:!1,init:function(t){var n=function(t,n){t.preventDefault();var r=e.one("#"+n),i=e.one("#"+n+"editable");M.atto_html.ishtml?(M.editor_atto.enable_all_widgets(n),i.setHTML(""),i.append(r.get("value")),r.hide(),i.show(),i.focus()):(M.editor_atto.disable_all_widgets(n),M.editor_atto.enable_widget(n,"html"),M.editor_atto.text_updated(n),i.hide(),r.show(),r.focus()),M.atto_html.ishtml=!M.atto_html.ishtml};M.editor_atto.add_toolbar_button(t.elementid,"html",t.icon,t.group,n)}}},"@VERSION@",{requires:["node","event-valuechange"]}); diff --git a/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button.js b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button.js new file mode 100644 index 00000000000..56e74812689 --- /dev/null +++ b/lib/editor/atto/plugins/html/yui/build/moodle-atto_html-button/moodle-atto_html-button.js @@ -0,0 +1,61 @@ +YUI.add('moodle-atto_html-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor html plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_html = M.atto_html || { + /** + * Are we in html editing mode or not? + */ + ishtml : false, + + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + var textarea = Y.one('#' + elementid); + var atto = Y.one('#' + elementid + 'editable'); + + if (M.atto_html.ishtml) { + M.editor_atto.enable_all_widgets(elementid); + atto.setHTML(''); + atto.append(textarea.get('value')); + textarea.hide(); + atto.show(); + atto.focus(); + } else { + M.editor_atto.disable_all_widgets(elementid); + M.editor_atto.enable_widget(elementid, 'html'); + M.editor_atto.text_updated(elementid); + atto.hide(); + textarea.show(); + textarea.focus(); + } + + M.atto_html.ishtml = !M.atto_html.ishtml; + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'html', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node", "event-valuechange"]}); diff --git a/lib/editor/atto/plugins/html/yui/src/button/build.json b/lib/editor/atto/plugins/html/yui/src/button/build.json new file mode 100644 index 00000000000..96489619d7b --- /dev/null +++ b/lib/editor/atto/plugins/html/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_html-button", + "builds": { + "moodle-atto_html-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/html/yui/src/button/js/button.js b/lib/editor/atto/plugins/html/yui/src/button/js/button.js new file mode 100644 index 00000000000..d739dcaff5e --- /dev/null +++ b/lib/editor/atto/plugins/html/yui/src/button/js/button.js @@ -0,0 +1,56 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor html plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_html = M.atto_html || { + /** + * Are we in html editing mode or not? + */ + ishtml : false, + + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + var textarea = Y.one('#' + elementid); + var atto = Y.one('#' + elementid + 'editable'); + + if (M.atto_html.ishtml) { + M.editor_atto.enable_all_widgets(elementid); + atto.setHTML(''); + atto.append(textarea.get('value')); + textarea.hide(); + atto.show(); + atto.focus(); + } else { + M.editor_atto.disable_all_widgets(elementid); + M.editor_atto.enable_widget(elementid, 'html'); + M.editor_atto.text_updated(elementid); + atto.hide(); + textarea.show(); + textarea.focus(); + } + + M.atto_html.ishtml = !M.atto_html.ishtml; + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'html', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/html/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/html/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..71a63dd799c --- /dev/null +++ b/lib/editor/atto/plugins/html/yui/src/button/meta/editor.json @@ -0,0 +1,8 @@ +{ + "moodle-atto_html-button": { + "requires": [ + "node", + "event-valuechange" + ] + } +} diff --git a/lib/editor/atto/plugins/image/lang/en/atto_image.php b/lib/editor/atto/plugins/image/lang/en/atto_image.php new file mode 100644 index 00000000000..c8f1b834e5e --- /dev/null +++ b/lib/editor/atto/plugins/image/lang/en/atto_image.php @@ -0,0 +1,35 @@ +. + +/** + * Strings for component 'atto_image', language 'en'. + * + * @package atto_image + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['accessibilityhint'] = '

Accessibility recommendation

Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language.

Web Content Accessibility Guidelines 2.0

'; +$string['browserepositories'] = 'Browse repositories...'; +$string['createimage'] = 'Insert image'; +$string['enteralt'] = 'Enter alternative text'; +$string['enterurl'] = 'Enter URL'; +$string['height'] = 'Height'; +$string['presentation'] = 'Presentation content only'; +$string['pluginname'] = 'Image'; +$string['presentationoraltrequired'] = 'Images must be marked as presentation only, or have suitable alternative text.'; +$string['preview'] = 'Preview'; +$string['width'] = 'Width'; diff --git a/lib/editor/atto/plugins/image/lib.php b/lib/editor/atto/plugins/image/lib.php new file mode 100644 index 00000000000..66136465a9b --- /dev/null +++ b/lib/editor/atto/plugins/image/lib.php @@ -0,0 +1,58 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_image + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_image_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/insert_edit_image', 'editor_atto'); + + $PAGE->requires->strings_for_js(array('createimage', + 'enterurl', + 'enteralt', + 'presentation', + 'preview', + 'browserepositories', + 'accessibilityhint', + 'presentationoraltrequired', + 'width', + 'height'), 'atto_image'); + $PAGE->requires->yui_module('moodle-atto_image-button', + 'M.atto_image.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'file'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_image_sort_order() { + return 13; +} diff --git a/lib/editor/atto/plugins/image/version.php b/lib/editor/atto/plugins/image/version.php new file mode 100644 index 00000000000..0c628b727db --- /dev/null +++ b/lib/editor/atto/plugins/image/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_image + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_image'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-debug.js b/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-debug.js new file mode 100644 index 00000000000..58d3ee3b51b --- /dev/null +++ b/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-debug.js @@ -0,0 +1,250 @@ +YUI.add('moodle-atto_image-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor image plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_image = M.atto_image || { + dialogue : null, + selection : null, + init : function(params) { + var display_chooser = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_image.selection = M.editor_atto.get_selection(); + if (M.atto_image.selection !== false) { + var dialogue; + if (!M.atto_image.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_image.dialogue; + } + + dialogue.set('bodyContent', M.atto_image.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createimage', 'atto_image')); + dialogue.render(); + dialogue.centerDialogue(); + M.atto_image.dialogue = dialogue; + + var selectedText = M.editor_atto.get_selection_text(); + var i = 0; + + var images = []; + for (i = 0; i < selectedText.childNodes.length; i++) { + var child = selectedText.childNodes[0]; + if (images.length === 0) { + if (child.nodeName.toLowerCase() === 'img') { + images[0] = child; + } else { + if (child.getElementsByTagName) { + images = child.getElementsByTagName('img'); + } + } + } + } + + if (images.length > 0) { + var image = Y.one(images[0]); + var width = image.getAttribute('width'); + var height = image.getAttribute('height'); + if (width > 0) { + Y.one('#atto_image_widthentry').set('value', width); + } + if (height > 0) { + Y.one('#atto_image_heightentry').set('value', height); + } + Y.one('#atto_image_preview').set('src', image.get('src')); + Y.one('#atto_image_preview').setStyle('display', 'inline'); + Y.one('#atto_image_altentry').set('value', image.get('alt')); + Y.one('#atto_image_urlentry').set('value', image.get('src')); + var role = image.get('role'); + if (role === "presentation") { + Y.one('#atto_image_presentation').set('checked', 'checked'); + } + } + dialogue.show(); + } + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'image', params.icon, params.group, display_chooser, this); + }, + open_filepicker : function(e) { + var elementid = this.getAttribute('data-editor'); + e.preventDefault(); + + M.editor_atto.show_filepicker(elementid, 'image', M.atto_image.filepicker_callback); + }, + filepicker_callback : function(params) { + if (params.url !== '') { + var input = Y.one('#atto_image_urlentry'); + input.set('value', params.url); + + // Auto set the width and height. + var image = new Image(); + image.onload = function() { + Y.one('#atto_image_widthentry').set('value', this.width); + Y.one('#atto_image_heightentry').set('value', this.height); + Y.one('#atto_image_preview').set('src', this.src); + Y.one('#atto_image_preview').setStyle('display', 'inline'); + }; + image.src = params.url; + } + }, + url_changed : function() { + var input = Y.one('#atto_image_urlentry'); + + if (input.get('value') !== '') { + // Auto set the width and height. + var image = new Image(); + image.onload = function() { + var input; + + input = Y.one('#atto_image_widthentry'); + if (input.get('value') === '') { + input.set('value', this.width); + } + input = Y.one('#atto_image_heightentry'); + if (input.get('value') === '') { + input.set('value', this.height); + } + input = Y.one('#atto_image_preview'); + input.set('src', this.src); + input.setStyle('display', 'inline'); + }; + image.src = input.get('value'); + } + }, + set_image : function(e, elementid) { + var input = e.currentTarget.ancestor('.atto_form').one('#atto_image_urlentry'); + + var url = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_altentry'); + var alt = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_widthentry'); + var width = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_heightentry'); + var height = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_presentation'); + var presentation = input.get('checked'); + var alrt; + + e.preventDefault(); + + if (alt === '' && !presentation) { + alrt = e.currentTarget.ancestor('.atto_form').one('#atto_image_altwarning'); + alrt.setStyle('display', 'block'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_altentry'); + input.setAttribute('aria-invalid', true); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_presentation'); + input.setAttribute('aria-invalid', true); + return; + } else { + alrt = e.currentTarget.ancestor('.atto_form').one('#atto_image_altwarning'); + alrt.setStyle('display', 'none'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_altentry'); + input.setAttribute('aria-invalid', false); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_presentation'); + input.setAttribute('aria-invalid', false); + } + + M.atto_image.dialogue.hide(); + + if (url !== '') { + M.editor_atto.set_selection(M.atto_image.selection); + var imagehtml = '' + Y.Escape.html(alt) + '' + + '' + + '' + + '
' + + '' + + '
' + + '' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '' + + '
' + + '' + + '
' + M.util.get_string('accessibilityhint', 'atto_image')); + + content.one('#atto_image_urlentry').on('blur', M.atto_image.url_changed, this); + content.one('#atto_image_urlentrysubmit').on('click', M.atto_image.set_image, this, elementid); + content.one('#openimagebrowser').on('click', M.atto_image.open_filepicker); + return content; + } +}; + + +}, '@VERSION@', {"requires": ["node", "escape"]}); diff --git a/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-min.js b/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-min.js new file mode 100644 index 00000000000..8532ee5fe98 --- /dev/null +++ b/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_image-button",function(e,t){M.atto_image=M.atto_image||{dialogue:null,selection:null,init:function(t){var n=function(t,n){t.preventDefault(),M.editor_atto.is_active(n)||M.editor_atto.focus(n),M.atto_image.selection=M.editor_atto.get_selection();if(M.atto_image.selection!==!1){var r;M.atto_image.dialogue?r=M.atto_image.dialogue:r=new M.core.dialogue({visible:!1,modal:!0,close:!0,draggable:!0}),r.set("bodyContent",M.atto_image.get_form_content(n)),r.set("headerContent",M.util.get_string("createimage","atto_image")),r.render(),r.centerDialogue(),M.atto_image.dialogue=r;var i=M.editor_atto.get_selection_text(),s=0,o=[];for(s=0;s0){var a=e.one(o[0]),f=a.getAttribute("width"),l=a.getAttribute("height");f>0&&e.one("#atto_image_widthentry").set("value",f),l>0&&e.one("#atto_image_heightentry").set("value",l),e.one("#atto_image_preview").set("src",a.get("src")),e.one("#atto_image_preview").setStyle("display","inline"),e.one("#atto_image_altentry").set("value",a.get("alt")),e.one("#atto_image_urlentry").set("value",a.get("src"));var c=a.get("role");c==="presentation"&&e.one("#atto_image_presentation").set("checked","checked")}r.show()}};M.editor_atto.add_toolbar_button(t.elementid,"image",t.icon,t.group,n,this)},open_filepicker:function(e){var t=this.getAttribute("data-editor");e.preventDefault(),M.editor_atto.show_filepicker(t,"image",M.atto_image.filepicker_callback)},filepicker_callback:function(t){if(t.url!==""){var n=e.one("#atto_image_urlentry");n.set("value",t.url);var r=new Image;r.onload=function(){e.one("#atto_image_widthentry").set("value",this.width),e.one("#atto_image_heightentry").set("value",this.height),e.one("#atto_image_preview").set("src",this.src),e.one("#atto_image_preview").setStyle("display","inline")},r.src=t.url}},url_changed:function(){var t=e.one("#atto_image_urlentry");if(t.get("value")!==""){var n=new Image;n.onload=function(){var t;t=e.one("#atto_image_widthentry"),t.get("value")===""&&t.set("value",this.width),t=e.one("#atto_image_heightentry"),t.get("value")===""&&t.set("value",this.height),t=e.one("#atto_image_preview"),t.set("src",this.src),t.setStyle("display","inline")},n.src=t.get("value")}},set_image:function(t,n){var r=t.currentTarget.ancestor(".atto_form").one("#atto_image_urlentry"),i=r.get("value");r=t.currentTarget.ancestor(".atto_form").one("#atto_image_altentry");var s=r.get("value");r=t.currentTarget.ancestor(".atto_form").one("#atto_image_widthentry");var o=r.get("value");r=t.currentTarget.ancestor(".atto_form").one("#atto_image_heightentry");var u=r.get("value");r=t.currentTarget.ancestor(".atto_form").one("#atto_image_presentation");var a=r.get("checked"),f;t.preventDefault();if(s===""&&!a){f=t.currentTarget.ancestor(".atto_form").one("#atto_image_altwarning"),f.setStyle("display","block"),r=t.currentTarget.ancestor(".atto_form").one("#atto_image_altentry"),r.setAttribute("aria-invalid",!0),r=t.currentTarget.ancestor(".atto_form").one("#atto_image_presentation"),r.setAttribute("aria-invalid",!0);return}f=t.currentTarget.ancestor(".atto_form").one("#atto_image_altwarning"),f.setStyle("display","none"),r=t.currentTarget.ancestor(".atto_form").one("#atto_image_altentry"),r.setAttribute("aria-invalid",!1),r=t.currentTarget.ancestor(".atto_form").one("#atto_image_presentation"),r.setAttribute("aria-invalid",!1),M.atto_image.dialogue.hide();if(i!==""){M.editor_atto.set_selection(M.atto_image.selection);var l=''+e.Escape.html(s)+'"+''+"
"+'"+"
"+'"+'"+''+"
"+''+'"+"
"+'"+''+"
"+'"+''+"
"+'"+''+'
'+"
"+'"+"
"+""+"
"+M.util.get_string("accessibilityhint","atto_image"));return n.one("#atto_image_urlentry").on("blur",M.atto_image.url_changed,this),n.one("#atto_image_urlentrysubmit").on("click",M.atto_image.set_image,this,t),n.one("#openimagebrowser").on("click",M.atto_image.open_filepicker),n}}},"@VERSION@",{requires:["node","escape"]}); diff --git a/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button.js b/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button.js new file mode 100644 index 00000000000..58d3ee3b51b --- /dev/null +++ b/lib/editor/atto/plugins/image/yui/build/moodle-atto_image-button/moodle-atto_image-button.js @@ -0,0 +1,250 @@ +YUI.add('moodle-atto_image-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor image plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_image = M.atto_image || { + dialogue : null, + selection : null, + init : function(params) { + var display_chooser = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_image.selection = M.editor_atto.get_selection(); + if (M.atto_image.selection !== false) { + var dialogue; + if (!M.atto_image.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_image.dialogue; + } + + dialogue.set('bodyContent', M.atto_image.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createimage', 'atto_image')); + dialogue.render(); + dialogue.centerDialogue(); + M.atto_image.dialogue = dialogue; + + var selectedText = M.editor_atto.get_selection_text(); + var i = 0; + + var images = []; + for (i = 0; i < selectedText.childNodes.length; i++) { + var child = selectedText.childNodes[0]; + if (images.length === 0) { + if (child.nodeName.toLowerCase() === 'img') { + images[0] = child; + } else { + if (child.getElementsByTagName) { + images = child.getElementsByTagName('img'); + } + } + } + } + + if (images.length > 0) { + var image = Y.one(images[0]); + var width = image.getAttribute('width'); + var height = image.getAttribute('height'); + if (width > 0) { + Y.one('#atto_image_widthentry').set('value', width); + } + if (height > 0) { + Y.one('#atto_image_heightentry').set('value', height); + } + Y.one('#atto_image_preview').set('src', image.get('src')); + Y.one('#atto_image_preview').setStyle('display', 'inline'); + Y.one('#atto_image_altentry').set('value', image.get('alt')); + Y.one('#atto_image_urlentry').set('value', image.get('src')); + var role = image.get('role'); + if (role === "presentation") { + Y.one('#atto_image_presentation').set('checked', 'checked'); + } + } + dialogue.show(); + } + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'image', params.icon, params.group, display_chooser, this); + }, + open_filepicker : function(e) { + var elementid = this.getAttribute('data-editor'); + e.preventDefault(); + + M.editor_atto.show_filepicker(elementid, 'image', M.atto_image.filepicker_callback); + }, + filepicker_callback : function(params) { + if (params.url !== '') { + var input = Y.one('#atto_image_urlentry'); + input.set('value', params.url); + + // Auto set the width and height. + var image = new Image(); + image.onload = function() { + Y.one('#atto_image_widthentry').set('value', this.width); + Y.one('#atto_image_heightentry').set('value', this.height); + Y.one('#atto_image_preview').set('src', this.src); + Y.one('#atto_image_preview').setStyle('display', 'inline'); + }; + image.src = params.url; + } + }, + url_changed : function() { + var input = Y.one('#atto_image_urlentry'); + + if (input.get('value') !== '') { + // Auto set the width and height. + var image = new Image(); + image.onload = function() { + var input; + + input = Y.one('#atto_image_widthentry'); + if (input.get('value') === '') { + input.set('value', this.width); + } + input = Y.one('#atto_image_heightentry'); + if (input.get('value') === '') { + input.set('value', this.height); + } + input = Y.one('#atto_image_preview'); + input.set('src', this.src); + input.setStyle('display', 'inline'); + }; + image.src = input.get('value'); + } + }, + set_image : function(e, elementid) { + var input = e.currentTarget.ancestor('.atto_form').one('#atto_image_urlentry'); + + var url = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_altentry'); + var alt = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_widthentry'); + var width = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_heightentry'); + var height = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_presentation'); + var presentation = input.get('checked'); + var alrt; + + e.preventDefault(); + + if (alt === '' && !presentation) { + alrt = e.currentTarget.ancestor('.atto_form').one('#atto_image_altwarning'); + alrt.setStyle('display', 'block'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_altentry'); + input.setAttribute('aria-invalid', true); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_presentation'); + input.setAttribute('aria-invalid', true); + return; + } else { + alrt = e.currentTarget.ancestor('.atto_form').one('#atto_image_altwarning'); + alrt.setStyle('display', 'none'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_altentry'); + input.setAttribute('aria-invalid', false); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_presentation'); + input.setAttribute('aria-invalid', false); + } + + M.atto_image.dialogue.hide(); + + if (url !== '') { + M.editor_atto.set_selection(M.atto_image.selection); + var imagehtml = '' + Y.Escape.html(alt) + '' + + '' + + '' + + '
' + + '' + + '
' + + '' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '' + + '
' + + '' + + '
' + M.util.get_string('accessibilityhint', 'atto_image')); + + content.one('#atto_image_urlentry').on('blur', M.atto_image.url_changed, this); + content.one('#atto_image_urlentrysubmit').on('click', M.atto_image.set_image, this, elementid); + content.one('#openimagebrowser').on('click', M.atto_image.open_filepicker); + return content; + } +}; + + +}, '@VERSION@', {"requires": ["node", "escape"]}); diff --git a/lib/editor/atto/plugins/image/yui/src/button/build.json b/lib/editor/atto/plugins/image/yui/src/button/build.json new file mode 100644 index 00000000000..15fda37bfd5 --- /dev/null +++ b/lib/editor/atto/plugins/image/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_image-button", + "builds": { + "moodle-atto_image-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/image/yui/src/button/js/button.js b/lib/editor/atto/plugins/image/yui/src/button/js/button.js new file mode 100644 index 00000000000..ea9fa214958 --- /dev/null +++ b/lib/editor/atto/plugins/image/yui/src/button/js/button.js @@ -0,0 +1,245 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor image plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_image = M.atto_image || { + dialogue : null, + selection : null, + init : function(params) { + var display_chooser = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_image.selection = M.editor_atto.get_selection(); + if (M.atto_image.selection !== false) { + var dialogue; + if (!M.atto_image.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_image.dialogue; + } + + dialogue.set('bodyContent', M.atto_image.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createimage', 'atto_image')); + dialogue.render(); + dialogue.centerDialogue(); + M.atto_image.dialogue = dialogue; + + var selectedText = M.editor_atto.get_selection_text(); + var i = 0; + + var images = []; + for (i = 0; i < selectedText.childNodes.length; i++) { + var child = selectedText.childNodes[0]; + if (images.length === 0) { + if (child.nodeName.toLowerCase() === 'img') { + images[0] = child; + } else { + if (child.getElementsByTagName) { + images = child.getElementsByTagName('img'); + } + } + } + } + + if (images.length > 0) { + var image = Y.one(images[0]); + var width = image.getAttribute('width'); + var height = image.getAttribute('height'); + if (width > 0) { + Y.one('#atto_image_widthentry').set('value', width); + } + if (height > 0) { + Y.one('#atto_image_heightentry').set('value', height); + } + Y.one('#atto_image_preview').set('src', image.get('src')); + Y.one('#atto_image_preview').setStyle('display', 'inline'); + Y.one('#atto_image_altentry').set('value', image.get('alt')); + Y.one('#atto_image_urlentry').set('value', image.get('src')); + var role = image.get('role'); + if (role === "presentation") { + Y.one('#atto_image_presentation').set('checked', 'checked'); + } + } + dialogue.show(); + } + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'image', params.icon, params.group, display_chooser, this); + }, + open_filepicker : function(e) { + var elementid = this.getAttribute('data-editor'); + e.preventDefault(); + + M.editor_atto.show_filepicker(elementid, 'image', M.atto_image.filepicker_callback); + }, + filepicker_callback : function(params) { + if (params.url !== '') { + var input = Y.one('#atto_image_urlentry'); + input.set('value', params.url); + + // Auto set the width and height. + var image = new Image(); + image.onload = function() { + Y.one('#atto_image_widthentry').set('value', this.width); + Y.one('#atto_image_heightentry').set('value', this.height); + Y.one('#atto_image_preview').set('src', this.src); + Y.one('#atto_image_preview').setStyle('display', 'inline'); + }; + image.src = params.url; + } + }, + url_changed : function() { + var input = Y.one('#atto_image_urlentry'); + + if (input.get('value') !== '') { + // Auto set the width and height. + var image = new Image(); + image.onload = function() { + var input; + + input = Y.one('#atto_image_widthentry'); + if (input.get('value') === '') { + input.set('value', this.width); + } + input = Y.one('#atto_image_heightentry'); + if (input.get('value') === '') { + input.set('value', this.height); + } + input = Y.one('#atto_image_preview'); + input.set('src', this.src); + input.setStyle('display', 'inline'); + }; + image.src = input.get('value'); + } + }, + set_image : function(e, elementid) { + var input = e.currentTarget.ancestor('.atto_form').one('#atto_image_urlentry'); + + var url = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_altentry'); + var alt = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_widthentry'); + var width = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_heightentry'); + var height = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_presentation'); + var presentation = input.get('checked'); + var alrt; + + e.preventDefault(); + + if (alt === '' && !presentation) { + alrt = e.currentTarget.ancestor('.atto_form').one('#atto_image_altwarning'); + alrt.setStyle('display', 'block'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_altentry'); + input.setAttribute('aria-invalid', true); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_presentation'); + input.setAttribute('aria-invalid', true); + return; + } else { + alrt = e.currentTarget.ancestor('.atto_form').one('#atto_image_altwarning'); + alrt.setStyle('display', 'none'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_altentry'); + input.setAttribute('aria-invalid', false); + input = e.currentTarget.ancestor('.atto_form').one('#atto_image_presentation'); + input.setAttribute('aria-invalid', false); + } + + M.atto_image.dialogue.hide(); + + if (url !== '') { + M.editor_atto.set_selection(M.atto_image.selection); + var imagehtml = '' + Y.Escape.html(alt) + '' + + '' + + '' + + '
' + + '' + + '
' + + '' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '' + + '
' + + '' + + '
' + M.util.get_string('accessibilityhint', 'atto_image')); + + content.one('#atto_image_urlentry').on('blur', M.atto_image.url_changed, this); + content.one('#atto_image_urlentrysubmit').on('click', M.atto_image.set_image, this, elementid); + content.one('#openimagebrowser').on('click', M.atto_image.open_filepicker); + return content; + } +}; diff --git a/lib/editor/atto/plugins/image/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/image/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..3a97310a174 --- /dev/null +++ b/lib/editor/atto/plugins/image/yui/src/button/meta/editor.json @@ -0,0 +1,8 @@ +{ + "moodle-atto_image-button": { + "requires": [ + "node", + "escape" + ] + } +} diff --git a/lib/editor/atto/plugins/indent/lang/en/atto_indent.php b/lib/editor/atto/plugins/indent/lang/en/atto_indent.php new file mode 100644 index 00000000000..9c5a3f0ac3e --- /dev/null +++ b/lib/editor/atto/plugins/indent/lang/en/atto_indent.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_indent', language 'en'. + * + * @package atto_indent + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Indent'; diff --git a/lib/editor/atto/plugins/indent/lib.php b/lib/editor/atto/plugins/indent/lib.php new file mode 100644 index 00000000000..4bf3d743e2e --- /dev/null +++ b/lib/editor/atto/plugins/indent/lib.php @@ -0,0 +1,48 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_indent + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_indent_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/increase_indent', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_indent-button', + 'M.atto_indent.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'list'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_indent_sort_order() { + return 5; +} diff --git a/lib/editor/atto/plugins/indent/version.php b/lib/editor/atto/plugins/indent/version.php new file mode 100644 index 00000000000..e7aeaa0f877 --- /dev/null +++ b/lib/editor/atto/plugins/indent/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_indent + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_indent'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-debug.js b/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-debug.js new file mode 100644 index 00000000000..f952bb08a68 --- /dev/null +++ b/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_indent-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor indent plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_indent = M.atto_indent || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('indent', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'indent', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-min.js b/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-min.js new file mode 100644 index 00000000000..cd35231daca --- /dev/null +++ b/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_indent-button",function(e,t){M.atto_indent=M.atto_indent||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("indent",!1,null),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"indent",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button.js b/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button.js new file mode 100644 index 00000000000..f952bb08a68 --- /dev/null +++ b/lib/editor/atto/plugins/indent/yui/build/moodle-atto_indent-button/moodle-atto_indent-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_indent-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor indent plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_indent = M.atto_indent || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('indent', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'indent', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/indent/yui/src/button/build.json b/lib/editor/atto/plugins/indent/yui/src/button/build.json new file mode 100644 index 00000000000..29b8001d1d0 --- /dev/null +++ b/lib/editor/atto/plugins/indent/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_indent-button", + "builds": { + "moodle-atto_indent-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/indent/yui/src/button/js/button.js b/lib/editor/atto/plugins/indent/yui/src/button/js/button.js new file mode 100644 index 00000000000..79b73a541da --- /dev/null +++ b/lib/editor/atto/plugins/indent/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor indent plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_indent = M.atto_indent || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('indent', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'indent', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/indent/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/indent/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..812a3bc7858 --- /dev/null +++ b/lib/editor/atto/plugins/indent/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_indent-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/italic/lang/en/atto_italic.php b/lib/editor/atto/plugins/italic/lang/en/atto_italic.php new file mode 100644 index 00000000000..74cadb07df5 --- /dev/null +++ b/lib/editor/atto/plugins/italic/lang/en/atto_italic.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_italic', language 'en'. + * + * @package atto_italic + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Italic'; diff --git a/lib/editor/atto/plugins/italic/lib.php b/lib/editor/atto/plugins/italic/lib.php new file mode 100644 index 00000000000..e8e93aafd9b --- /dev/null +++ b/lib/editor/atto/plugins/italic/lib.php @@ -0,0 +1,48 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_italic + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_italic_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/italic', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_italic-button', + 'M.atto_italic.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'style'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_italic_sort_order() { + return 1; +} diff --git a/lib/editor/atto/plugins/italic/version.php b/lib/editor/atto/plugins/italic/version.php new file mode 100644 index 00000000000..d11d1c519ff --- /dev/null +++ b/lib/editor/atto/plugins/italic/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_italic + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_italic'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-debug.js b/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-debug.js new file mode 100644 index 00000000000..1cab99f2fc0 --- /dev/null +++ b/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_italic-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor italic plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_italic = M.atto_italic || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('italic', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'italic', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-min.js b/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-min.js new file mode 100644 index 00000000000..545816717d3 --- /dev/null +++ b/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_italic-button",function(e,t){M.atto_italic=M.atto_italic||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("italic",!1,null),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"italic",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button.js b/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button.js new file mode 100644 index 00000000000..1cab99f2fc0 --- /dev/null +++ b/lib/editor/atto/plugins/italic/yui/build/moodle-atto_italic-button/moodle-atto_italic-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_italic-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor italic plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_italic = M.atto_italic || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('italic', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'italic', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/italic/yui/src/button/build.json b/lib/editor/atto/plugins/italic/yui/src/button/build.json new file mode 100644 index 00000000000..d7df4fc2ee0 --- /dev/null +++ b/lib/editor/atto/plugins/italic/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_italic-button", + "builds": { + "moodle-atto_italic-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/italic/yui/src/button/js/button.js b/lib/editor/atto/plugins/italic/yui/src/button/js/button.js new file mode 100644 index 00000000000..349ad9426da --- /dev/null +++ b/lib/editor/atto/plugins/italic/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor italic plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_italic = M.atto_italic || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('italic', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'italic', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/italic/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/italic/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..4109b10ce61 --- /dev/null +++ b/lib/editor/atto/plugins/italic/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_italic-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/link/lang/en/atto_link.php b/lib/editor/atto/plugins/link/lang/en/atto_link.php new file mode 100644 index 00000000000..83f286877f0 --- /dev/null +++ b/lib/editor/atto/plugins/link/lang/en/atto_link.php @@ -0,0 +1,30 @@ +. + +/** + * Strings for component 'atto_link', language 'en'. + * + * @package atto_link + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['accessibilityhint'] = '

Accessibility recommendation

A mechanism is available to allow the purpose of each link to be identified from link text alone, except where the purpose of the link would be ambiguous to users in general.

Web Content Accessibility Guidelines 2.0

'; +$string['browserepositories'] = 'Browse repositories...'; +$string['createlink'] = 'Create link'; +$string['enterurl'] = 'Enter a URL'; +$string['openinnewwindow'] = 'Open in new window'; +$string['pluginname'] = 'Link'; diff --git a/lib/editor/atto/plugins/link/lib.php b/lib/editor/atto/plugins/link/lib.php new file mode 100644 index 00000000000..6461998a679 --- /dev/null +++ b/lib/editor/atto/plugins/link/lib.php @@ -0,0 +1,55 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_link + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_link_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/insert_edit_link', 'editor_atto'); + + $PAGE->requires->strings_for_js(array('createlink', + 'enterurl', + 'browserepositories', + 'openinnewwindow', + 'accessibilityhint'), + 'atto_link'); + + $PAGE->requires->yui_module('moodle-atto_link-button', + 'M.atto_link.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'link'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_link_sort_order() { + return 11; +} diff --git a/lib/editor/atto/plugins/link/version.php b/lib/editor/atto/plugins/link/version.php new file mode 100644 index 00000000000..120b3bfd9f9 --- /dev/null +++ b/lib/editor/atto/plugins/link/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_link + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_link'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js new file mode 100644 index 00000000000..e51f120a7d1 --- /dev/null +++ b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-debug.js @@ -0,0 +1,268 @@ +YUI.add('moodle-atto_link-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor link plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_link = M.atto_link || { + /** + * The window used to get the link details. + * + * @property dialogue + * @type M.core.dialogue + * @default null + */ + dialogue : null, + + /** + * The selection object returned by the browser. + * + * @property selection + * @type Range + * @default null + */ + selection : null, + + /** + * Display the chooser dialogue. + * + * @method init + * @param Event e + * @param string elementid + */ + display_chooser : function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_link.selection = M.editor_atto.get_selection(); + if (M.atto_link.selection !== false && (!M.atto_link.selection.collapsed)) { + var dialogue; + if (!M.atto_link.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_link.dialogue; + } + + dialogue.render(); + dialogue.set('bodyContent', M.atto_link.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createlink', 'atto_link')); + + M.atto_link.resolve_anchors(); + + dialogue.show(); + M.atto_link.dialogue = dialogue; + } + }, + + /** + * Add this button to the form. + * + * @method init + * @param {Object} params + */ + init : function(params) { + M.editor_atto.add_toolbar_button(params.elementid, 'link', params.icon, params.group, this.display_chooser, this); + }, + + /** + * If there is selected text and it is part of an anchor link, + * extract the url (and target) from the link (and set them in the form). + * + * @method resolve_anchors + */ + resolve_anchors : function() { + // Find the first anchor tag in the selection. + var selectednode = M.editor_atto.get_selection_parent_node(), + anchornodes, + anchornode, + url; + + // Note this is a document fragment and YUI doesn't like them. + if (!selectednode) { + return; + } + + anchornodes = M.atto_link.find_selected_anchors(Y.one(selectednode)); + + if (anchornodes.length > 0) { + anchornode = anchornodes[0]; + M.atto_link.selection = M.editor_atto.get_selection_from_node(anchornode); + url = anchornode.getAttribute('href'); + target = anchornode.getAttribute('target'); + if (url !== '') { + Y.one('#atto_link_urlentry').set('value', url); + } + if (target === '_blank') { + Y.one('#atto_link_openinnewwindow').set('checked', 'checked'); + } else { + Y.one('#atto_link_openinnewwindow').set('checked', ''); + } + } + }, + + /** + * Open the repository file picker. + * + * @method open_filepicker + * @param Event e + */ + open_filepicker : function(e) { + var elementid = this.getAttribute('data-editor'); + e.preventDefault(); + + M.editor_atto.show_filepicker(elementid, 'link', M.atto_link.filepicker_callback); + }, + + /** + * Called by the file picker when a link has been chosen. + * + * @method filepicker_callback + * @param {Object} params - contains selected url. + */ + filepicker_callback : function(params) { + M.atto_link.dialogue.hide(); + if (params.url !== '') { + M.editor_atto.set_selection(M.atto_link.selection); + document.execCommand('unlink', false, null); + document.execCommand('createLink', false, params.url); + } + }, + + /** + * The OK button has been pressed - make the changes to the source. + * + * @method set_link + * @param Event e + */ + set_link : function(e, elementid) { + var input, + target, + selectednode, + anchornodes, + value; + + e.preventDefault(); + M.atto_link.dialogue.hide(); + + input = e.currentTarget.ancestor('.atto_form').one('input[type=url]'); + + value = input.get('value'); + if (value !== '') { + M.editor_atto.set_selection(M.atto_link.selection); + document.execCommand('unlink', false, null); + document.execCommand('createLink', false, value); + + // Now set the target. + selectednode = M.editor_atto.get_selection_parent_node(); + + // Note this is a document fragment and YUI doesn't like them. + if (!selectednode) { + return; + } + + anchornodes = M.atto_link.find_selected_anchors(Y.one(selectednode)); + Y.Array.each(anchornodes, function(anchornode) { + target = e.currentTarget.ancestor('.atto_form').one('input[type=checkbox]'); + if (target.get('checked')) { + anchornode.setAttribute('target', '_blank'); + } else { + anchornode.removeAttribute('target'); + } + }); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + } + }, + + /** + * Look up and down for the nearest anchor tags that are least partly contained in the selection. + * + * @method find_selected_anchors + * @param Node node + * @return Node|false + */ + find_selected_anchors : function(node) { + var tagname = node.get('tagName'), hit, hits; + // Direct hit. + if (tagname && tagname.toLowerCase() === 'a') { + return [node]; + } + // Search down but check that each node is part of the selection. + hits = []; + node.all('a').each(function(n) { + if (!hit && M.editor_atto.selection_contains_node(n)) { + hits.push(n); + } + }); + if (hits.length > 0) { + return hits; + } + // Search up. + hit = node.ancestor('a'); + if (hit) { + return [hit]; + } + return []; + }, + + /** + * Return the HTML of the form to show in the dialogue. + * + * @method get_form_content + * @param string elementid + * @return string + */ + get_form_content : function(elementid) { + var content = Y.Node.create('
' + + '' + + '
' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + M.util.get_string('accessibilityhint', 'atto_link')); + + content.one('#atto_link_urlentrysubmit').on('click', M.atto_link.set_link, this, elementid); + content.one('#openlinkbrowser').on('click', M.atto_link.open_filepicker); + return content; + } +}; + + +}, '@VERSION@', {"requires": ["node", "escape"]}); diff --git a/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js new file mode 100644 index 00000000000..0d59b38f03f --- /dev/null +++ b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_link-button",function(e,t){M.atto_link=M.atto_link||{dialogue:null,selection:null,display_chooser:function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),M.atto_link.selection=M.editor_atto.get_selection();if(M.atto_link.selection!==!1&&!M.atto_link.selection.collapsed){var n;M.atto_link.dialogue?n=M.atto_link.dialogue:n=new M.core.dialogue({visible:!1,modal:!0,close:!0,draggable:!0}),n.render(),n.set("bodyContent",M.atto_link.get_form_content(t)),n.set("headerContent",M.util.get_string("createlink","atto_link")),M.atto_link.resolve_anchors(),n.show(),M.atto_link.dialogue=n}},init:function(e){M.editor_atto.add_toolbar_button(e.elementid,"link",e.icon,e.group,this.display_chooser,this)},resolve_anchors:function(){var t=M.editor_atto.get_selection_parent_node(),n,r,i;if(!t)return;n=M.atto_link.find_selected_anchors(e.one(t)),n.length>0&&(r=n[0],M.atto_link.selection=M.editor_atto.get_selection_from_node(r),i=r.getAttribute("href"),target=r.getAttribute("target"),i!==""&&e.one("#atto_link_urlentry").set("value",i),target==="_blank"?e.one("#atto_link_openinnewwindow").set("checked","checked"):e.one("#atto_link_openinnewwindow").set("checked",""))},open_filepicker:function(e){var t=this.getAttribute("data-editor");e.preventDefault(),M.editor_atto.show_filepicker(t,"link",M.atto_link.filepicker_callback)},filepicker_callback:function(e){M.atto_link.dialogue.hide(),e.url!==""&&(M.editor_atto.set_selection(M.atto_link.selection),document.execCommand("unlink",!1,null),document.execCommand("createLink",!1,e.url))},set_link:function(t,n){var r,i,s,o,u;t.preventDefault(),M.atto_link.dialogue.hide(),r=t.currentTarget.ancestor(".atto_form").one("input[type=url]"),u=r.get("value");if(u!==""){M.editor_atto.set_selection(M.atto_link.selection),document.execCommand("unlink",!1,null),document.execCommand("createLink",!1,u),s=M.editor_atto.get_selection_parent_node();if(!s)return;o=M.atto_link.find_selected_anchors(e.one(s)),e.Array.each(o,function(e){i=t.currentTarget.ancestor(".atto_form").one("input[type=checkbox]"),i.get("checked")?e.setAttribute("target","_blank"):e.removeAttribute("target")}),M.editor_atto.text_updated(n)}},find_selected_anchors:function(e){var t=e.get("tagName"),n,r;return t&&t.toLowerCase()==="a"?[e]:(r=[],e.all("a").each(function(e){!n&&M.editor_atto.selection_contains_node(e)&&r.push(e)}),r.length>0?r:(n=e.ancestor("a"),n?[n]:[]))},get_form_content:function(t){var n=e.Node.create('
"+'
'+'"+"
"+''+'"+"
"+'
'+"
"+'"+"
"+"
"+"
"+M.util.get_string("accessibilityhint","atto_link"));return n.one("#atto_link_urlentrysubmit").on("click",M.atto_link.set_link,this,t),n.one("#openlinkbrowser").on("click",M.atto_link.open_filepicker),n}}},"@VERSION@",{requires:["node","escape"]}); diff --git a/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js new file mode 100644 index 00000000000..e51f120a7d1 --- /dev/null +++ b/lib/editor/atto/plugins/link/yui/build/moodle-atto_link-button/moodle-atto_link-button.js @@ -0,0 +1,268 @@ +YUI.add('moodle-atto_link-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor link plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_link = M.atto_link || { + /** + * The window used to get the link details. + * + * @property dialogue + * @type M.core.dialogue + * @default null + */ + dialogue : null, + + /** + * The selection object returned by the browser. + * + * @property selection + * @type Range + * @default null + */ + selection : null, + + /** + * Display the chooser dialogue. + * + * @method init + * @param Event e + * @param string elementid + */ + display_chooser : function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_link.selection = M.editor_atto.get_selection(); + if (M.atto_link.selection !== false && (!M.atto_link.selection.collapsed)) { + var dialogue; + if (!M.atto_link.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_link.dialogue; + } + + dialogue.render(); + dialogue.set('bodyContent', M.atto_link.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createlink', 'atto_link')); + + M.atto_link.resolve_anchors(); + + dialogue.show(); + M.atto_link.dialogue = dialogue; + } + }, + + /** + * Add this button to the form. + * + * @method init + * @param {Object} params + */ + init : function(params) { + M.editor_atto.add_toolbar_button(params.elementid, 'link', params.icon, params.group, this.display_chooser, this); + }, + + /** + * If there is selected text and it is part of an anchor link, + * extract the url (and target) from the link (and set them in the form). + * + * @method resolve_anchors + */ + resolve_anchors : function() { + // Find the first anchor tag in the selection. + var selectednode = M.editor_atto.get_selection_parent_node(), + anchornodes, + anchornode, + url; + + // Note this is a document fragment and YUI doesn't like them. + if (!selectednode) { + return; + } + + anchornodes = M.atto_link.find_selected_anchors(Y.one(selectednode)); + + if (anchornodes.length > 0) { + anchornode = anchornodes[0]; + M.atto_link.selection = M.editor_atto.get_selection_from_node(anchornode); + url = anchornode.getAttribute('href'); + target = anchornode.getAttribute('target'); + if (url !== '') { + Y.one('#atto_link_urlentry').set('value', url); + } + if (target === '_blank') { + Y.one('#atto_link_openinnewwindow').set('checked', 'checked'); + } else { + Y.one('#atto_link_openinnewwindow').set('checked', ''); + } + } + }, + + /** + * Open the repository file picker. + * + * @method open_filepicker + * @param Event e + */ + open_filepicker : function(e) { + var elementid = this.getAttribute('data-editor'); + e.preventDefault(); + + M.editor_atto.show_filepicker(elementid, 'link', M.atto_link.filepicker_callback); + }, + + /** + * Called by the file picker when a link has been chosen. + * + * @method filepicker_callback + * @param {Object} params - contains selected url. + */ + filepicker_callback : function(params) { + M.atto_link.dialogue.hide(); + if (params.url !== '') { + M.editor_atto.set_selection(M.atto_link.selection); + document.execCommand('unlink', false, null); + document.execCommand('createLink', false, params.url); + } + }, + + /** + * The OK button has been pressed - make the changes to the source. + * + * @method set_link + * @param Event e + */ + set_link : function(e, elementid) { + var input, + target, + selectednode, + anchornodes, + value; + + e.preventDefault(); + M.atto_link.dialogue.hide(); + + input = e.currentTarget.ancestor('.atto_form').one('input[type=url]'); + + value = input.get('value'); + if (value !== '') { + M.editor_atto.set_selection(M.atto_link.selection); + document.execCommand('unlink', false, null); + document.execCommand('createLink', false, value); + + // Now set the target. + selectednode = M.editor_atto.get_selection_parent_node(); + + // Note this is a document fragment and YUI doesn't like them. + if (!selectednode) { + return; + } + + anchornodes = M.atto_link.find_selected_anchors(Y.one(selectednode)); + Y.Array.each(anchornodes, function(anchornode) { + target = e.currentTarget.ancestor('.atto_form').one('input[type=checkbox]'); + if (target.get('checked')) { + anchornode.setAttribute('target', '_blank'); + } else { + anchornode.removeAttribute('target'); + } + }); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + } + }, + + /** + * Look up and down for the nearest anchor tags that are least partly contained in the selection. + * + * @method find_selected_anchors + * @param Node node + * @return Node|false + */ + find_selected_anchors : function(node) { + var tagname = node.get('tagName'), hit, hits; + // Direct hit. + if (tagname && tagname.toLowerCase() === 'a') { + return [node]; + } + // Search down but check that each node is part of the selection. + hits = []; + node.all('a').each(function(n) { + if (!hit && M.editor_atto.selection_contains_node(n)) { + hits.push(n); + } + }); + if (hits.length > 0) { + return hits; + } + // Search up. + hit = node.ancestor('a'); + if (hit) { + return [hit]; + } + return []; + }, + + /** + * Return the HTML of the form to show in the dialogue. + * + * @method get_form_content + * @param string elementid + * @return string + */ + get_form_content : function(elementid) { + var content = Y.Node.create('
' + + '' + + '
' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + M.util.get_string('accessibilityhint', 'atto_link')); + + content.one('#atto_link_urlentrysubmit').on('click', M.atto_link.set_link, this, elementid); + content.one('#openlinkbrowser').on('click', M.atto_link.open_filepicker); + return content; + } +}; + + +}, '@VERSION@', {"requires": ["node", "escape"]}); diff --git a/lib/editor/atto/plugins/link/yui/src/button/build.json b/lib/editor/atto/plugins/link/yui/src/button/build.json new file mode 100644 index 00000000000..0f84aad113e --- /dev/null +++ b/lib/editor/atto/plugins/link/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_link-button", + "builds": { + "moodle-atto_link-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/link/yui/src/button/js/button.js b/lib/editor/atto/plugins/link/yui/src/button/js/button.js new file mode 100644 index 00000000000..7e5023533c5 --- /dev/null +++ b/lib/editor/atto/plugins/link/yui/src/button/js/button.js @@ -0,0 +1,263 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor link plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_link = M.atto_link || { + /** + * The window used to get the link details. + * + * @property dialogue + * @type M.core.dialogue + * @default null + */ + dialogue : null, + + /** + * The selection object returned by the browser. + * + * @property selection + * @type Range + * @default null + */ + selection : null, + + /** + * Display the chooser dialogue. + * + * @method init + * @param Event e + * @param string elementid + */ + display_chooser : function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_link.selection = M.editor_atto.get_selection(); + if (M.atto_link.selection !== false && (!M.atto_link.selection.collapsed)) { + var dialogue; + if (!M.atto_link.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_link.dialogue; + } + + dialogue.render(); + dialogue.set('bodyContent', M.atto_link.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createlink', 'atto_link')); + + M.atto_link.resolve_anchors(); + + dialogue.show(); + M.atto_link.dialogue = dialogue; + } + }, + + /** + * Add this button to the form. + * + * @method init + * @param {Object} params + */ + init : function(params) { + M.editor_atto.add_toolbar_button(params.elementid, 'link', params.icon, params.group, this.display_chooser, this); + }, + + /** + * If there is selected text and it is part of an anchor link, + * extract the url (and target) from the link (and set them in the form). + * + * @method resolve_anchors + */ + resolve_anchors : function() { + // Find the first anchor tag in the selection. + var selectednode = M.editor_atto.get_selection_parent_node(), + anchornodes, + anchornode, + url; + + // Note this is a document fragment and YUI doesn't like them. + if (!selectednode) { + return; + } + + anchornodes = M.atto_link.find_selected_anchors(Y.one(selectednode)); + + if (anchornodes.length > 0) { + anchornode = anchornodes[0]; + M.atto_link.selection = M.editor_atto.get_selection_from_node(anchornode); + url = anchornode.getAttribute('href'); + target = anchornode.getAttribute('target'); + if (url !== '') { + Y.one('#atto_link_urlentry').set('value', url); + } + if (target === '_blank') { + Y.one('#atto_link_openinnewwindow').set('checked', 'checked'); + } else { + Y.one('#atto_link_openinnewwindow').set('checked', ''); + } + } + }, + + /** + * Open the repository file picker. + * + * @method open_filepicker + * @param Event e + */ + open_filepicker : function(e) { + var elementid = this.getAttribute('data-editor'); + e.preventDefault(); + + M.editor_atto.show_filepicker(elementid, 'link', M.atto_link.filepicker_callback); + }, + + /** + * Called by the file picker when a link has been chosen. + * + * @method filepicker_callback + * @param {Object} params - contains selected url. + */ + filepicker_callback : function(params) { + M.atto_link.dialogue.hide(); + if (params.url !== '') { + M.editor_atto.set_selection(M.atto_link.selection); + document.execCommand('unlink', false, null); + document.execCommand('createLink', false, params.url); + } + }, + + /** + * The OK button has been pressed - make the changes to the source. + * + * @method set_link + * @param Event e + */ + set_link : function(e, elementid) { + var input, + target, + selectednode, + anchornodes, + value; + + e.preventDefault(); + M.atto_link.dialogue.hide(); + + input = e.currentTarget.ancestor('.atto_form').one('input[type=url]'); + + value = input.get('value'); + if (value !== '') { + M.editor_atto.set_selection(M.atto_link.selection); + document.execCommand('unlink', false, null); + document.execCommand('createLink', false, value); + + // Now set the target. + selectednode = M.editor_atto.get_selection_parent_node(); + + // Note this is a document fragment and YUI doesn't like them. + if (!selectednode) { + return; + } + + anchornodes = M.atto_link.find_selected_anchors(Y.one(selectednode)); + Y.Array.each(anchornodes, function(anchornode) { + target = e.currentTarget.ancestor('.atto_form').one('input[type=checkbox]'); + if (target.get('checked')) { + anchornode.setAttribute('target', '_blank'); + } else { + anchornode.removeAttribute('target'); + } + }); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + } + }, + + /** + * Look up and down for the nearest anchor tags that are least partly contained in the selection. + * + * @method find_selected_anchors + * @param Node node + * @return Node|false + */ + find_selected_anchors : function(node) { + var tagname = node.get('tagName'), hit, hits; + // Direct hit. + if (tagname && tagname.toLowerCase() === 'a') { + return [node]; + } + // Search down but check that each node is part of the selection. + hits = []; + node.all('a').each(function(n) { + if (!hit && M.editor_atto.selection_contains_node(n)) { + hits.push(n); + } + }); + if (hits.length > 0) { + return hits; + } + // Search up. + hit = node.ancestor('a'); + if (hit) { + return [hit]; + } + return []; + }, + + /** + * Return the HTML of the form to show in the dialogue. + * + * @method get_form_content + * @param string elementid + * @return string + */ + get_form_content : function(elementid) { + var content = Y.Node.create('
' + + '' + + '
' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + M.util.get_string('accessibilityhint', 'atto_link')); + + content.one('#atto_link_urlentrysubmit').on('click', M.atto_link.set_link, this, elementid); + content.one('#openlinkbrowser').on('click', M.atto_link.open_filepicker); + return content; + } +}; diff --git a/lib/editor/atto/plugins/link/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/link/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..41593ed2074 --- /dev/null +++ b/lib/editor/atto/plugins/link/yui/src/button/meta/editor.json @@ -0,0 +1,8 @@ +{ + "moodle-atto_link-button": { + "requires": [ + "node", + "escape" + ] + } +} diff --git a/lib/editor/atto/plugins/media/lang/en/atto_media.php b/lib/editor/atto/plugins/media/lang/en/atto_media.php new file mode 100644 index 00000000000..f7b8d9ef60e --- /dev/null +++ b/lib/editor/atto/plugins/media/lang/en/atto_media.php @@ -0,0 +1,32 @@ +. + +/** + * Strings for component 'atto_media', language 'en'. + * + * @package atto_media + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['accessibilityhint'] = '

Accessibility recommendation

Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language.

Web Content Accessibility Guidelines 2.0

'; +$string['browserepositories'] = 'Browse repositories...'; +$string['createmedia'] = 'Insert media'; +$string['entername'] = 'Enter name'; +$string['enterurl'] = 'Enter URL'; +$string['height'] = 'Height'; +$string['pluginname'] = 'Media'; +$string['width'] = 'Width'; diff --git a/lib/editor/atto/plugins/media/lib.php b/lib/editor/atto/plugins/media/lib.php new file mode 100644 index 00000000000..6133e197d78 --- /dev/null +++ b/lib/editor/atto/plugins/media/lib.php @@ -0,0 +1,52 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_media + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_media_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/insert_edit_video', 'editor_atto'); + + $PAGE->requires->strings_for_js(array('createmedia', + 'enterurl', + 'entername', + 'browserepositories', + 'accessibilityhint'), + 'atto_media'); + $PAGE->requires->yui_module('moodle-atto_media-button', + 'M.atto_media.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'file'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_media_sort_order() { + return 14; +} diff --git a/lib/editor/atto/plugins/media/version.php b/lib/editor/atto/plugins/media/version.php new file mode 100644 index 00000000000..722cd306985 --- /dev/null +++ b/lib/editor/atto/plugins/media/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_media + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_media'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-debug.js b/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-debug.js new file mode 100644 index 00000000000..5d67cc1f325 --- /dev/null +++ b/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-debug.js @@ -0,0 +1,122 @@ +YUI.add('moodle-atto_media-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor media plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_media = M.atto_media || { + dialogue : null, + selection : null, + init : function(params) { + var display_chooser = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_media.selection = M.editor_atto.get_selection(); + if (M.atto_media.selection !== false) { + var dialogue; + if (!M.atto_media.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_media.dialogue; + } + + dialogue.render(); + dialogue.set('bodyContent', M.atto_media.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createmedia', 'atto_media')); + dialogue.centerDialogue(); + dialogue.show(); + M.atto_media.dialogue = dialogue; + } + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'media', params.icon, params.group, display_chooser, this); + }, + open_browser : function(e) { + var elementid = this.getAttribute('data-editor'); + e.preventDefault(); + + M.editor_atto.show_filepicker(elementid, 'media', M.atto_media.filepicker_callback); + }, + filepicker_callback : function(params) { + if (params.url !== '') { + var input = Y.one('#atto_media_urlentry'); + input.set('value', params.url); + input = Y.one('#atto_media_nameentry'); + input.set('value', params.file); + } + }, + set_media : function(e, elementid) { + e.preventDefault(); + M.atto_media.dialogue.hide(); + + var input = e.currentTarget.ancestor('.atto_form').one('#atto_media_urlentry'); + var url = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_media_nameentry'); + var name = input.get('value'); + + if (url !== '' && name !== '') { + M.editor_atto.set_selection(M.atto_media.selection); + var mediahtml = '' + name + ''; + + if (document.selection && document.selection.createRange().pasteHTML) { + document.selection.createRange().pasteHTML(mediahtml); + } else { + document.execCommand('insertHTML', false, mediahtml); + } + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + } + }, + get_form_content : function(elementid) { + var content = Y.Node.create('
' + + '' + + '
' + + '' + + '' + + '' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + M.util.get_string('accessibilityhint', 'atto_media')); + + content.one('#atto_media_urlentrysubmit').on('click', M.atto_media.set_media, this, elementid); + content.one('#openmediabrowser').on('click', M.atto_media.open_browser); + return content; + } +}; + + +}, '@VERSION@', {"requires": ["node", "escape"]}); diff --git a/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-min.js b/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-min.js new file mode 100644 index 00000000000..f00a5b835f8 --- /dev/null +++ b/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_media-button",function(e,t){M.atto_media=M.atto_media||{dialogue:null,selection:null,init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),M.atto_media.selection=M.editor_atto.get_selection();if(M.atto_media.selection!==!1){var n;M.atto_media.dialogue?n=M.atto_media.dialogue:n=new M.core.dialogue({visible:!1,modal:!0,close:!0,draggable:!0}),n.render(),n.set("bodyContent",M.atto_media.get_form_content(t)),n.set("headerContent",M.util.get_string("createmedia","atto_media")),n.centerDialogue(),n.show(),M.atto_media.dialogue=n}};M.editor_atto.add_toolbar_button(e.elementid,"media",e.icon,e.group,t,this)},open_browser:function(e){var t=this.getAttribute("data-editor");e.preventDefault(),M.editor_atto.show_filepicker(t,"media",M.atto_media.filepicker_callback)},filepicker_callback:function(t){if(t.url!==""){var n=e.one("#atto_media_urlentry");n.set("value",t.url),n=e.one("#atto_media_nameentry"),n.set("value",t.file)}},set_media:function(t,n){t.preventDefault(),M.atto_media.dialogue.hide();var r=t.currentTarget.ancestor(".atto_form").one("#atto_media_urlentry"),i=r.get("value");r=t.currentTarget.ancestor(".atto_form").one("#atto_media_nameentry");var s=r.get("value");if(i!==""&&s!==""){M.editor_atto.set_selection(M.atto_media.selection);var o=''+s+"";document.selection&&document.selection.createRange().pasteHTML?document.selection.createRange().pasteHTML(o):document.execCommand("insertHTML",!1,o),M.editor_atto.text_updated(n)}},get_form_content:function(t){var n=e.Node.create('
"+'
'+'"+'"+''+'
'+"
"+'"+"
"+"
"+"
"+M.util.get_string("accessibilityhint","atto_media"));return n.one("#atto_media_urlentrysubmit").on("click",M.atto_media.set_media,this,t),n.one("#openmediabrowser").on("click",M.atto_media.open_browser),n}}},"@VERSION@",{requires:["node","escape"]}); diff --git a/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button.js b/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button.js new file mode 100644 index 00000000000..5d67cc1f325 --- /dev/null +++ b/lib/editor/atto/plugins/media/yui/build/moodle-atto_media-button/moodle-atto_media-button.js @@ -0,0 +1,122 @@ +YUI.add('moodle-atto_media-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor media plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_media = M.atto_media || { + dialogue : null, + selection : null, + init : function(params) { + var display_chooser = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_media.selection = M.editor_atto.get_selection(); + if (M.atto_media.selection !== false) { + var dialogue; + if (!M.atto_media.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_media.dialogue; + } + + dialogue.render(); + dialogue.set('bodyContent', M.atto_media.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createmedia', 'atto_media')); + dialogue.centerDialogue(); + dialogue.show(); + M.atto_media.dialogue = dialogue; + } + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'media', params.icon, params.group, display_chooser, this); + }, + open_browser : function(e) { + var elementid = this.getAttribute('data-editor'); + e.preventDefault(); + + M.editor_atto.show_filepicker(elementid, 'media', M.atto_media.filepicker_callback); + }, + filepicker_callback : function(params) { + if (params.url !== '') { + var input = Y.one('#atto_media_urlentry'); + input.set('value', params.url); + input = Y.one('#atto_media_nameentry'); + input.set('value', params.file); + } + }, + set_media : function(e, elementid) { + e.preventDefault(); + M.atto_media.dialogue.hide(); + + var input = e.currentTarget.ancestor('.atto_form').one('#atto_media_urlentry'); + var url = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_media_nameentry'); + var name = input.get('value'); + + if (url !== '' && name !== '') { + M.editor_atto.set_selection(M.atto_media.selection); + var mediahtml = '' + name + ''; + + if (document.selection && document.selection.createRange().pasteHTML) { + document.selection.createRange().pasteHTML(mediahtml); + } else { + document.execCommand('insertHTML', false, mediahtml); + } + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + } + }, + get_form_content : function(elementid) { + var content = Y.Node.create('
' + + '' + + '
' + + '' + + '' + + '' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + M.util.get_string('accessibilityhint', 'atto_media')); + + content.one('#atto_media_urlentrysubmit').on('click', M.atto_media.set_media, this, elementid); + content.one('#openmediabrowser').on('click', M.atto_media.open_browser); + return content; + } +}; + + +}, '@VERSION@', {"requires": ["node", "escape"]}); diff --git a/lib/editor/atto/plugins/media/yui/src/button/build.json b/lib/editor/atto/plugins/media/yui/src/button/build.json new file mode 100644 index 00000000000..b20a6f5c438 --- /dev/null +++ b/lib/editor/atto/plugins/media/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_media-button", + "builds": { + "moodle-atto_media-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/media/yui/src/button/js/button.js b/lib/editor/atto/plugins/media/yui/src/button/js/button.js new file mode 100644 index 00000000000..29033965ba8 --- /dev/null +++ b/lib/editor/atto/plugins/media/yui/src/button/js/button.js @@ -0,0 +1,117 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor media plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_media = M.atto_media || { + dialogue : null, + selection : null, + init : function(params) { + var display_chooser = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_media.selection = M.editor_atto.get_selection(); + if (M.atto_media.selection !== false) { + var dialogue; + if (!M.atto_media.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_media.dialogue; + } + + dialogue.render(); + dialogue.set('bodyContent', M.atto_media.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createmedia', 'atto_media')); + dialogue.centerDialogue(); + dialogue.show(); + M.atto_media.dialogue = dialogue; + } + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'media', params.icon, params.group, display_chooser, this); + }, + open_browser : function(e) { + var elementid = this.getAttribute('data-editor'); + e.preventDefault(); + + M.editor_atto.show_filepicker(elementid, 'media', M.atto_media.filepicker_callback); + }, + filepicker_callback : function(params) { + if (params.url !== '') { + var input = Y.one('#atto_media_urlentry'); + input.set('value', params.url); + input = Y.one('#atto_media_nameentry'); + input.set('value', params.file); + } + }, + set_media : function(e, elementid) { + e.preventDefault(); + M.atto_media.dialogue.hide(); + + var input = e.currentTarget.ancestor('.atto_form').one('#atto_media_urlentry'); + var url = input.get('value'); + input = e.currentTarget.ancestor('.atto_form').one('#atto_media_nameentry'); + var name = input.get('value'); + + if (url !== '' && name !== '') { + M.editor_atto.set_selection(M.atto_media.selection); + var mediahtml = '' + name + ''; + + if (document.selection && document.selection.createRange().pasteHTML) { + document.selection.createRange().pasteHTML(mediahtml); + } else { + document.execCommand('insertHTML', false, mediahtml); + } + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + } + }, + get_form_content : function(elementid) { + var content = Y.Node.create('
' + + '' + + '
' + + '' + + '' + + '' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + M.util.get_string('accessibilityhint', 'atto_media')); + + content.one('#atto_media_urlentrysubmit').on('click', M.atto_media.set_media, this, elementid); + content.one('#openmediabrowser').on('click', M.atto_media.open_browser); + return content; + } +}; diff --git a/lib/editor/atto/plugins/media/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/media/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..3632bf78635 --- /dev/null +++ b/lib/editor/atto/plugins/media/yui/src/button/meta/editor.json @@ -0,0 +1,8 @@ +{ + "moodle-atto_media-button": { + "requires": [ + "node", + "escape" + ] + } +} diff --git a/lib/editor/atto/plugins/orderedlist/lang/en/atto_orderedlist.php b/lib/editor/atto/plugins/orderedlist/lang/en/atto_orderedlist.php new file mode 100644 index 00000000000..d4d8cc2395a --- /dev/null +++ b/lib/editor/atto/plugins/orderedlist/lang/en/atto_orderedlist.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_orderedlist', language 'en'. + * + * @package atto_orderedlist + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Ordered list'; diff --git a/lib/editor/atto/plugins/orderedlist/lib.php b/lib/editor/atto/plugins/orderedlist/lib.php new file mode 100644 index 00000000000..f9e45bcd3fc --- /dev/null +++ b/lib/editor/atto/plugins/orderedlist/lib.php @@ -0,0 +1,48 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_orderedlist + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_orderedlist_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/numbered_list', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_orderedlist-button', + 'M.atto_orderedlist.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'list'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return array groupname followed by the absolute position within the toolbar + */ +function atto_orderedlist_sort_order() { + return 6; +} diff --git a/lib/editor/atto/plugins/orderedlist/version.php b/lib/editor/atto/plugins/orderedlist/version.php new file mode 100644 index 00000000000..bcd6bf33195 --- /dev/null +++ b/lib/editor/atto/plugins/orderedlist/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_orderedlist + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_orderedlist'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-debug.js b/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-debug.js new file mode 100644 index 00000000000..4b19e1e757f --- /dev/null +++ b/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_orderedlist-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor orderedlist plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_orderedlist = M.atto_orderedlist || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('insertOrderedList', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'orderedlist', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-min.js b/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-min.js new file mode 100644 index 00000000000..c1863bd3a6e --- /dev/null +++ b/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_orderedlist-button",function(e,t){M.atto_orderedlist=M.atto_orderedlist||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("insertOrderedList",!1,null),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"orderedlist",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button.js b/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button.js new file mode 100644 index 00000000000..4b19e1e757f --- /dev/null +++ b/lib/editor/atto/plugins/orderedlist/yui/build/moodle-atto_orderedlist-button/moodle-atto_orderedlist-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_orderedlist-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor orderedlist plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_orderedlist = M.atto_orderedlist || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('insertOrderedList', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'orderedlist', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/orderedlist/yui/src/button/build.json b/lib/editor/atto/plugins/orderedlist/yui/src/button/build.json new file mode 100644 index 00000000000..2326ff6dcb1 --- /dev/null +++ b/lib/editor/atto/plugins/orderedlist/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_orderedlist-button", + "builds": { + "moodle-atto_orderedlist-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/orderedlist/yui/src/button/js/button.js b/lib/editor/atto/plugins/orderedlist/yui/src/button/js/button.js new file mode 100644 index 00000000000..eb3f83423a0 --- /dev/null +++ b/lib/editor/atto/plugins/orderedlist/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor orderedlist plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_orderedlist = M.atto_orderedlist || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('insertOrderedList', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'orderedlist', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/orderedlist/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/orderedlist/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..08ed48a0e44 --- /dev/null +++ b/lib/editor/atto/plugins/orderedlist/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_orderedlist-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/outdent/lang/en/atto_outdent.php b/lib/editor/atto/plugins/outdent/lang/en/atto_outdent.php new file mode 100644 index 00000000000..6fb8976ac1b --- /dev/null +++ b/lib/editor/atto/plugins/outdent/lang/en/atto_outdent.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_outdent', language 'en'. + * + * @package atto_outdent + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Outdent'; diff --git a/lib/editor/atto/plugins/outdent/lib.php b/lib/editor/atto/plugins/outdent/lib.php new file mode 100644 index 00000000000..66d832ac902 --- /dev/null +++ b/lib/editor/atto/plugins/outdent/lib.php @@ -0,0 +1,46 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_outdent + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_outdent_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/decrease_indent', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_outdent-button', + 'M.atto_outdent.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'list'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_outdent_sort_order() { + return 4; +} diff --git a/lib/editor/atto/plugins/outdent/version.php b/lib/editor/atto/plugins/outdent/version.php new file mode 100644 index 00000000000..40db5bdd047 --- /dev/null +++ b/lib/editor/atto/plugins/outdent/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_outdent + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_outdent'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-debug.js b/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-debug.js new file mode 100644 index 00000000000..4224011908d --- /dev/null +++ b/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_outdent-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor outdent plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_outdent = M.atto_outdent || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('outdent', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'outdent', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-min.js b/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-min.js new file mode 100644 index 00000000000..f86a8cda522 --- /dev/null +++ b/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_outdent-button",function(e,t){M.atto_outdent=M.atto_outdent||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("outdent",!1,null),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"outdent",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button.js b/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button.js new file mode 100644 index 00000000000..4224011908d --- /dev/null +++ b/lib/editor/atto/plugins/outdent/yui/build/moodle-atto_outdent-button/moodle-atto_outdent-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_outdent-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor outdent plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_outdent = M.atto_outdent || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('outdent', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'outdent', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/outdent/yui/src/button/build.json b/lib/editor/atto/plugins/outdent/yui/src/button/build.json new file mode 100644 index 00000000000..177e1c7f1d4 --- /dev/null +++ b/lib/editor/atto/plugins/outdent/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_outdent-button", + "builds": { + "moodle-atto_outdent-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/outdent/yui/src/button/js/button.js b/lib/editor/atto/plugins/outdent/yui/src/button/js/button.js new file mode 100644 index 00000000000..d3d67afddf2 --- /dev/null +++ b/lib/editor/atto/plugins/outdent/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor outdent plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_outdent = M.atto_outdent || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('outdent', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'outdent', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/outdent/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/outdent/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..5c46b6c399e --- /dev/null +++ b/lib/editor/atto/plugins/outdent/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_outdent-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/strike/lang/en/atto_strike.php b/lib/editor/atto/plugins/strike/lang/en/atto_strike.php new file mode 100644 index 00000000000..1e4ca1a207a --- /dev/null +++ b/lib/editor/atto/plugins/strike/lang/en/atto_strike.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_strike', language 'en'. + * + * @package atto_strike + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Strike through'; diff --git a/lib/editor/atto/plugins/strike/lib.php b/lib/editor/atto/plugins/strike/lib.php new file mode 100644 index 00000000000..7e68784a00c --- /dev/null +++ b/lib/editor/atto/plugins/strike/lib.php @@ -0,0 +1,48 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_strike + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_strike_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/strikethrough', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_strike-button', + 'M.atto_strike.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'style'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int absolute position within the toolbar + */ +function atto_strike_sort_order() { + return 3; +} diff --git a/lib/editor/atto/plugins/strike/version.php b/lib/editor/atto/plugins/strike/version.php new file mode 100644 index 00000000000..25442063cb2 --- /dev/null +++ b/lib/editor/atto/plugins/strike/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_strike + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_strike'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-debug.js b/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-debug.js new file mode 100644 index 00000000000..d2a09428ff4 --- /dev/null +++ b/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_strike-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor strike plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_strike = M.atto_strike || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('strikeThrough', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'strike', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-min.js b/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-min.js new file mode 100644 index 00000000000..067c1db0312 --- /dev/null +++ b/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_strike-button",function(e,t){M.atto_strike=M.atto_strike||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("strikeThrough",!1,null),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"strike",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button.js b/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button.js new file mode 100644 index 00000000000..d2a09428ff4 --- /dev/null +++ b/lib/editor/atto/plugins/strike/yui/build/moodle-atto_strike-button/moodle-atto_strike-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_strike-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor strike plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_strike = M.atto_strike || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('strikeThrough', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'strike', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/strike/yui/src/button/build.json b/lib/editor/atto/plugins/strike/yui/src/button/build.json new file mode 100644 index 00000000000..b24dfb52af7 --- /dev/null +++ b/lib/editor/atto/plugins/strike/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_strike-button", + "builds": { + "moodle-atto_strike-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/strike/yui/src/button/js/button.js b/lib/editor/atto/plugins/strike/yui/src/button/js/button.js new file mode 100644 index 00000000000..8e8505e2c57 --- /dev/null +++ b/lib/editor/atto/plugins/strike/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor strike plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_strike = M.atto_strike || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('strikeThrough', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'strike', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/strike/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/strike/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..71772d22ca9 --- /dev/null +++ b/lib/editor/atto/plugins/strike/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_strike-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/table/lang/en/atto_table.php b/lib/editor/atto/plugins/table/lang/en/atto_table.php new file mode 100644 index 00000000000..388e14e3690 --- /dev/null +++ b/lib/editor/atto/plugins/table/lang/en/atto_table.php @@ -0,0 +1,43 @@ +. + +/** + * Strings for component 'atto_table', language 'en'. + * + * @package atto_table + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['accessibilityhint'] = '

Accessible tables recommendation

An accessible HTML table should have :

  • a caption describing the content of the table
  • row and/or column headers
  • no empty table headers
  • no merged table cells
.

'; +$string['createtable'] = 'Create table'; +$string['pluginname'] = 'Table'; +$string['numberofcolumns'] = 'Number of columns'; +$string['numberofrows'] = 'Number of rows'; +$string['caption'] = 'Caption'; +$string['headers'] = 'Define headers on'; +$string['columns'] = 'Columns'; +$string['rows'] = 'Rows'; +$string['both'] = 'Both'; +$string['edittable'] = 'Edit table'; +$string['addrowafter'] = 'Add row after'; +$string['addcolumnafter'] = 'Add column after'; +$string['moverowup'] = 'Move row up'; +$string['moverowdown'] = 'Move row down'; +$string['movecolumnleft'] = 'Move column left'; +$string['movecolumnright'] = 'Move column right'; +$string['deleterow'] = 'Delete row'; +$string['deletecolumn'] = 'Delete column'; diff --git a/lib/editor/atto/plugins/table/lib.php b/lib/editor/atto/plugins/table/lib.php new file mode 100644 index 00000000000..b3a64895d08 --- /dev/null +++ b/lib/editor/atto/plugins/table/lib.php @@ -0,0 +1,68 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_table + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_table_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/table', 'editor_atto'); + + $PAGE->requires->strings_for_js(array('createtable', + 'accessibilityhint', + 'headers', + 'caption', + 'columns', + 'rows', + 'numberofcolumns', + 'numberofrows', + 'both', + 'edittable', + 'addcolumnafter', + 'addrowafter', + 'movecolumnright', + 'movecolumnleft', + 'moverowdown', + 'moverowup', + 'deleterow', + 'deletecolumn'), + 'atto_table'); + + $PAGE->requires->yui_module('moodle-atto_table-button', + 'M.atto_table.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'list'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_table_sort_order() { + return 11; +} diff --git a/lib/editor/atto/plugins/table/styles.css b/lib/editor/atto/plugins/table/styles.css new file mode 100644 index 00000000000..763ee9c746f --- /dev/null +++ b/lib/editor/atto/plugins/table/styles.css @@ -0,0 +1,7 @@ +div.editor_atto_content td, +div.editor_atto_content th { + border: 1px dashed #BBB; + position: relative; + min-width: 30px; + height: 13px; +} diff --git a/lib/editor/atto/plugins/table/version.php b/lib/editor/atto/plugins/table/version.php new file mode 100644 index 00000000000..222d7a6ac76 --- /dev/null +++ b/lib/editor/atto/plugins/table/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_table + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_table'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js new file mode 100644 index 00000000000..d627f07167e --- /dev/null +++ b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js @@ -0,0 +1,624 @@ +YUI.add('moodle-atto_table-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor table plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_table = M.atto_table || { + + /** + * The window used to get the table details. + * + * @property dialogue + * @type M.core.dialogue + * @default null + */ + dialogue : null, + + /** + * The selection object returned by the browser. + * + * @property selection + * @type Range + * @default null + */ + selection : null, + + /** + * Yui image for table editing controls. + * + * @property menunode + * @type Y.Node + * @default null + */ + menunode : null, + + /** + * Popup menu for table controls + * + * @property controlmenu + * @type M.editor_atto.controlmenu + * @default null + */ + controlmenu : null, + + /** + * Last clicked cell that opened the context menu. + * + * @property lasttarget + * @type Y.Node + * @default null + */ + lasttarget : null, + + /** + * Display the chooser dialogue. + * + * @method init + * @param Event e + * @param string elementid + */ + display_chooser : function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_table.selection = M.editor_atto.get_selection(); + if (M.atto_table.selection !== false && (!M.atto_table.selection.collapsed)) { + var dialogue; + if (!M.atto_table.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_table.dialogue; + } + + dialogue.render(); + dialogue.set('bodyContent', M.atto_table.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createtable', 'atto_table')); + + dialogue.show(); + M.atto_table.dialogue = dialogue; + } + + }, + + /** + * Show the context menu + * + * @method show_menu + * @param Event e + * @param string elementid + */ + show_menu : function(e, elementid) { + var addhandlers = false; + + e.preventDefault(); + + if (this.controlmenu === null) { + addhandlers = true; + // Add event handlers for table control menus. + var bodycontent = ''; + + this.controlmenu = new M.editor_atto.controlmenu({ + headerText : M.util.get_string('edittable', 'atto_table'), + bodyContent : bodycontent + }); + } + // We store the cell of the last click (the control node is transient). + this.lasttarget = e.target.ancestor('td, th'); + this.controlmenu.show(); + this.controlmenu.align(e.target, [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.BL]); + + if (addhandlers) { + var bodynode = this.controlmenu.get('boundingBox'); + bodynode.delegate('click', this.handle_table_control, 'a', this, elementid); + bodynode.delegate('key', this.handle_table_control, 'down:enter,space', 'a', this, elementid); + } + }, + + /** + * Determine the index of a row in a table column. + * + * @method get_row_index + * @param Y.Node node + */ + get_row_index : function(cell) { + var tablenode = cell.ancestor('table'), + rownode = cell.ancestor('tr'); + + if (!tablenode || !rownode) { + return; + } + + var rows = tablenode.all('tr'); + + return rows.indexOf(rownode); + }, + + /** + * Determine the index of a column in a table row. + * + * @method get_column_index + * @param Y.Node node + */ + get_column_index : function(cellnode) { + var rownode = cellnode.ancestor('tr'); + + if (!rownode) { + return; + } + + var cells = rownode.all('td, th'); + + return cells.indexOf(cellnode); + }, + + /** + * Delete the current row + * + * @method delete_row + * @param string elementid + */ + delete_row : function(elementid) { + var row = this.lasttarget.ancestor('tr'); + + if (row) { + // We do not remove rows with no cells (all headers). + if (row.one('td')) { + row.remove(true); + } + } + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move row up + * + * @method move_row_up + * @param string elementid + */ + move_row_up : function(elementid) { + var row = this.lasttarget.ancestor('tr'); + var prevrow = row.previous('tr'); + if (!row || !prevrow) { + return; + } + + row.swap(prevrow); + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move column left + * + * @method move_column_left + * @param string elementid + */ + move_column_left : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + var rows = this.lasttarget.ancestor('table').all('tr'); + var columncells = new Y.NodeList(); + var prevcells = new Y.NodeList(); + var hastd = false; + + rows.each(function(row) { + var cells = row.all('td, th'); + var cell = cells.item(columnindex), + cellprev = cells.item(columnindex-1); + columncells.push(cell); + if (cellprev) { + if (cellprev.get('tagName') === 'TD') { + hastd = true; + } + prevcells.push(cellprev); + } + }); + + if (hastd && prevcells.size() > 0) { + var i = 0; + for (i = 0; i < columncells.size(); i++) { + var cell = columncells.item(i); + var prevcell = prevcells.item(i); + + cell.swap(prevcell); + } + } + // Cleanup. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move column right + * + * @method move_column_right + * @param string elementid + */ + move_column_right : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + var rows = this.lasttarget.ancestor('table').all('tr'); + var columncells = new Y.NodeList(); + var nextcells = new Y.NodeList(); + var hastd = false; + + rows.each(function(row) { + var cells = row.all('td, th'); + var cell = cells.item(columnindex), + cellnext = cells.item(columnindex+1); + if (cell.get('tagName') === 'TD') { + hastd = true; + } + columncells.push(cell); + if (cellnext) { + nextcells.push(cellnext); + } + }); + + if (hastd && nextcells.size() > 0) { + var i = 0; + for (i = 0; i < columncells.size(); i++) { + var cell = columncells.item(i); + var nextcell = nextcells.item(i); + + cell.swap(nextcell); + } + } + // Cleanup. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move row down + * + * @method move_row_down + * @param string elementid + */ + move_row_down : function(elementid) { + var row = this.lasttarget.ancestor('tr'); + var nextrow = row.next('tr'); + if (!row || !nextrow) { + return; + } + + row.swap(nextrow); + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Delete the current column + * + * @method delete_column + * @param string elementid + */ + delete_column : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + var rows = this.lasttarget.ancestor('table').all('tr'); + var columncells = new Y.NodeList(); + var hastd = false; + + rows.each(function(row) { + var cells = row.all('td, th'); + var cell = cells.item(columnindex); + if (cell.get('tagName') === 'TD') { + hastd = true; + } + columncells.push(cell); + }); + + if (hastd) { + columncells.remove(true); + } + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Add a row after the current row. + * + * @method add_row_after + * @param string elementid + */ + add_row_after : function(elementid) { + var rowindex = this.get_row_index(this.lasttarget); + + var tablebody = this.lasttarget.ancestor('table').one('tbody'); + if (!tablebody) { + // Not all tables have tbody. + tablebody = this.lasttarget.ancestor('table'); + rowindex += 1; + } + + var firstrow = tablebody.one('tr'); + if (!firstrow) { + firstrow = this.lasttarget.ancestor('table').one('tr'); + } + if (!firstrow) { + // Table has no rows. Boo. + return; + } + newrow = firstrow.cloneNode(true); + newrow.all('th, td').each(function (tablecell) { + if (tablecell.get('tagName') === 'TH') { + if (tablecell.getAttribute('scope') !== 'row') { + var newcell = Y.Node.create(''); + tablecell.replace(newcell); + tablecell = newcell; + } + } + tablecell.setHTML(' '); + }); + + tablebody.insert(newrow, rowindex); + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Add a column after the current column. + * + * @method add_column_after + * @param string elementid + */ + add_column_after : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + + var tablecell = this.lasttarget.ancestor('table'); + var rows = tablecell.all('tr'); + Y.each(rows, function(row) { + // Clone the first cell from the row so it has the same type/attributes (e.g. scope). + var newcell = row.one('td, th').cloneNode(true); + // Clear the content of the cell. + newcell.setHTML(' '); + + row.insert(newcell, columnindex + 1); + }, this); + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Handle a selection from the table control menu. + * + * @method handle_table_control + * @param Y.Event event + * @param string elementid + */ + handle_table_control : function(event, elementid) { + event.preventDefault(); + + this.controlmenu.hide(); + + switch (event.target.get('id')) { + case 'addcolumnafter': + this.add_column_after(elementid); + break; + case 'addrowafter': + this.add_row_after(elementid); + break; + case 'deleterow': + this.delete_row(elementid); + break; + case 'deletecolumn': + this.delete_column(elementid); + break; + case 'moverowdown': + this.move_row_down(elementid); + break; + case 'moverowup': + this.move_row_up(elementid); + break; + case 'movecolumnleft': + this.move_column_left(elementid); + break; + case 'movecolumnright': + this.move_column_right(elementid); + break; + } + }, + + /** + * Add this button to the form. + * + * @method init + * @param {Object} params + */ + init : function(params) { + + if (!M.atto_table.menunode) { + // Used for inline table editing controls. + var img = Y.Node.create(''); + img.setAttrs({ + alt : M.util.get_string('edittable', 'atto_table'), + src : M.util.image_url('t/contextmenu', 'core'), + width : '12', + height : '12' + }); + var anchor = Y.Node.create(''); + anchor.appendChild(img); + anchor.addClass('atto_control'); + M.atto_table.menunode = anchor; + } + + M.editor_atto.add_toolbar_button(params.elementid, 'table', params.icon, params.group, this.display_chooser, this); + //Y.one('#' + params.elementid + 'editable').on('valuechange', this.insert_table_controls, this, params.elementid); + + var contenteditable = Y.one('#' + params.elementid + 'editable'); + contenteditable.delegate('click', this.show_menu, 'td > .atto_control, th > .atto_control', this, params.elementid); + contenteditable.delegate('key', this.show_menu, 'down:enter,space', 'td > .atto_control, th > .atto_control', this, params.elementid); + // Disable mozilla table controls. + if (Y.UA.gecko) { + document.execCommand("enableInlineTableEditing", false, "false"); + document.execCommand("enableObjectResizing", false, false); + } + + this.insert_table_controls(params.elementid); + + // Re-add the table controls whenever the content is updated. + M.editor_atto.add_text_updated_handler(params.elementid, this.insert_table_controls); + }, + + /** + * Add the table editing controls to the content area. + * + * @method insert_table_controls + * @param String elementid - The id of the text area backed by the content editable field. + */ + insert_table_controls : function(elementid) { + var contenteditable = Y.one('#' + elementid + 'editable'), + allcells = contenteditable.all('td .atto_control,th .atto_control'), + cells = contenteditable.all('td:last-child,th:last-child,tbody tr:last-child > td, tbody tr:last-child > th'); + + allcells.each(function(node) { + if (cells.indexOf(node) === -1) { + node.remove(true); + } + }); + + cells.each(function(node) { + if (!node.one('.atto_control')) { + node.append(M.atto_table.menunode.cloneNode(true)); + } + }, this); + }, + + /** + * The OK button has been pressed - make the changes to the source. + * + * @method set_table + * @param Event e + */ + set_table : function(e, elementid) { + var caption, + rows, + cols, + headers, + tablehtml, + i, j; + + e.preventDefault(); + M.atto_table.dialogue.hide(); + + caption = e.currentTarget.ancestor('.atto_form').one('#atto_table_caption'); + rows = e.currentTarget.ancestor('.atto_form').one('#atto_table_rows'); + cols = e.currentTarget.ancestor('.atto_form').one('#atto_table_columns'); + headers = e.currentTarget.ancestor('.atto_form').one('#atto_table_headers'); + + M.editor_atto.set_selection(M.atto_table.selection); + + // Note there are some spaces inserted in the cells and before and after, so that users have somewhere to click. + tablehtml = '
'; + tablehtml += ''; + + i = 0; + if (headers.get('value') === 'columns' || headers.get('value') === 'both') { + i = 1; + tablehtml += ''; + for (j = 0; j < parseInt(cols.get('value'), 10); j++) { + tablehtml += ''; + } + tablehtml += ''; + } + tablehtml += ''; + for (; i < parseInt(rows.get('value'), 10); i++) { + tablehtml += ''; + for (j = 0; j < parseInt(cols.get('value'), 10); j++) { + if (j === 0 && (headers.get('value') === 'rows' || headers.get('value') === 'both')) { + tablehtml += ''; + } else { + tablehtml += ''; + } + } + tablehtml += ''; + } + tablehtml += ''; + tablehtml += '
' + Y.Escape.html(caption.get('value')) + '

'; + + document.execCommand('insertHTML', false, tablehtml); + + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Return the HTML of the form to show in the dialogue. + * + * @method get_form_content + * @param string elementid + * @return string + */ + get_form_content : function(elementid) { + var content = Y.Node.create('
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + M.util.get_string('accessibilityhint', 'atto_table')); + + content.one('#atto_table_submit').on('click', M.atto_table.set_table, this, elementid); + return content; + } +}; + + +}, '@VERSION@', {"requires": ["node", "escape", "event", "event-valuechange"]}); diff --git a/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-min.js b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-min.js new file mode 100644 index 00000000000..fe9e7b4f755 --- /dev/null +++ b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-min.js @@ -0,0 +1,2 @@ +YUI.add("moodle-atto_table-button",function(e,t){M.atto_table=M.atto_table||{dialogue:null,selection:null,menunode:null,controlmenu:null,lasttarget:null,display_chooser:function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),M.atto_table.selection=M.editor_atto.get_selection();if(M.atto_table.selection!==!1&&!M.atto_table.selection.collapsed){var n;M.atto_table.dialogue?n=M.atto_table.dialogue:n=new M.core.dialogue({visible:!1,modal:!0,close:!0,draggable:!0}),n.render(),n.set("bodyContent",M.atto_table.get_form_content(t)),n.set("headerContent",M.util.get_string("createtable","atto_table")),n.show(),M.atto_table.dialogue=n}},show_menu:function(t,n){var r=!1;t.preventDefault();if(this.controlmenu===null){r=!0;var i="
",this.controlmenu=new M.editor_atto.controlmenu({headerText:M.util.get_string("edittable","atto_table"),bodyContent:i})}this.lasttarget=t.target.ancestor("td, th"),this.controlmenu.show(),this.controlmenu.align(t.target,[e.WidgetPositionAlign.TL,e.WidgetPositionAlign.BL]);if(r){var s=this.controlmenu.get("boundingBox");s.delegate("click",this.handle_table_control,"a",this,n),s.delegate("key",this.handle_table_control,"down:enter,space","a",this,n)}},get_row_index:function(e){var t=e.ancestor("table"),n=e.ancestor("tr");if(!t||!n)return;var r=t.all("tr");return r.indexOf(n)},get_column_index:function(e){var t=e.ancestor("tr");if(!t)return;var n=t.all("td, th");return n.indexOf(e)},delete_row:function(e){var t=this.lasttarget.ancestor("tr");t&&t.one("td")&&t.remove(!0),M.editor_atto.text_updated(e)},move_row_up:function(e){var t=this.lasttarget.ancestor("tr"),n=t.previous("tr");if(!t||!n)return;t.swap(n),M.editor_atto.text_updated(e)},move_column_left:function(t){var n=this.get_column_index(this.lasttarget),r=this.lasttarget.ancestor("table").all("tr"),i=new e.NodeList,s=new e.NodeList,o=!1;r.each(function(e){var t=e.all("td, th"),r=t.item(n),u=t.item(n-1);i.push(r),u&&(u.get("tagName")==="TD"&&(o=!0),s.push(u))});if(o&&s.size()>0){var u=0;for(u=0;u0){var u=0;for(u=0;u");t.replace(n),t=n}t.setHTML(" ")}),r.insert(newrow,n),M.editor_atto.text_updated(t)},add_column_after:function(t){var n=this.get_column_index(this.lasttarget),r=this.lasttarget.ancestor("table"),i=r.all("tr");e.each(i,function(e){var t=e.one("td, th").cloneNode(!0);t.setHTML(" "),e.insert(t,n+1)},this),M.editor_atto.text_updated(t)},handle_table_control:function(e,t){e.preventDefault(),this.controlmenu.hide();switch(e.target.get("id")){case"addcolumnafter":this.add_column_after(t);break;case"addrowafter":this.add_row_after(t);break;case"deleterow":this.delete_row(t);break;case"deletecolumn":this.delete_column(t);break;case"moverowdown":this.move_row_down(t);break;case"moverowup":this.move_row_up(t);break;case"movecolumnleft":this.move_column_left(t);break;case"movecolumnright":this.move_column_right(t)}},init:function(t){if(!M.atto_table.menunode){var n=e.Node.create("");n.setAttrs({alt:M.util.get_string("edittable","atto_table"),src:M.util.image_url("t/contextmenu","core"),width:"12",height:"12"});var r=e.Node.create('');r.appendChild(n),r.addClass("atto_control"),M.atto_table.menunode=r}M.editor_atto.add_toolbar_button(t.elementid,"table",t.icon,t.group,this.display_chooser,this);var i=e.one("#"+t.elementid+"editable");i.delegate("click",this.show_menu,"td > .atto_control, th > .atto_control",this,t.elementid),i.delegate("key",this.show_menu,"down:enter,space","td > .atto_control, th > .atto_control",this,t.elementid),e.UA.gecko&&(document.execCommand("enableInlineTableEditing",!1,"false"),document.execCommand("enableObjectResizing",!1,!1)),this.insert_table_controls(t.elementid),M.editor_atto.add_text_updated_handler(t.elementid,this.insert_table_controls)},insert_table_controls:function(t){var n=e.one("#"+t+"editable"),r=n.all("td .atto_control,th .atto_control"),i=n.all("td:last-child,th:last-child,tbody tr:last-child > td, tbody tr:last-child > th" +);r.each(function(e){i.indexOf(e)===-1&&e.remove(!0)}),i.each(function(e){e.one(".atto_control")||e.append(M.atto_table.menunode.cloneNode(!0))},this)},set_table:function(t,n){var r,i,s,o,u,a,f;t.preventDefault(),M.atto_table.dialogue.hide(),r=t.currentTarget.ancestor(".atto_form").one("#atto_table_caption"),i=t.currentTarget.ancestor(".atto_form").one("#atto_table_rows"),s=t.currentTarget.ancestor(".atto_form").one("#atto_table_columns"),o=t.currentTarget.ancestor(".atto_form").one("#atto_table_headers"),M.editor_atto.set_selection(M.atto_table.selection),u="
",u+="",a=0;if(o.get("value")==="columns"||o.get("value")==="both"){a=1,u+="";for(f=0;f';u+=""}u+="";for(;a";for(f=0;f":u+='';u+=""}u+="",u+="
"+e.Escape.html(r.get("value"))+"

",document.execCommand("insertHTML",!1,u),M.editor_atto.text_updated(n)},get_form_content:function(t){var n=e.Node.create('
"+''+"
"+'"+'"+"
"+'"+''+"
"+'"+''+"
"+'
'+"
"+'"+"
"+"
"+"
"+M.util.get_string("accessibilityhint","atto_table"));return n.one("#atto_table_submit").on("click",M.atto_table.set_table,this,t),n}}},"@VERSION@",{requires:["node","escape","event","event-valuechange"]}); diff --git a/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button.js b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button.js new file mode 100644 index 00000000000..d627f07167e --- /dev/null +++ b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button.js @@ -0,0 +1,624 @@ +YUI.add('moodle-atto_table-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor table plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_table = M.atto_table || { + + /** + * The window used to get the table details. + * + * @property dialogue + * @type M.core.dialogue + * @default null + */ + dialogue : null, + + /** + * The selection object returned by the browser. + * + * @property selection + * @type Range + * @default null + */ + selection : null, + + /** + * Yui image for table editing controls. + * + * @property menunode + * @type Y.Node + * @default null + */ + menunode : null, + + /** + * Popup menu for table controls + * + * @property controlmenu + * @type M.editor_atto.controlmenu + * @default null + */ + controlmenu : null, + + /** + * Last clicked cell that opened the context menu. + * + * @property lasttarget + * @type Y.Node + * @default null + */ + lasttarget : null, + + /** + * Display the chooser dialogue. + * + * @method init + * @param Event e + * @param string elementid + */ + display_chooser : function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_table.selection = M.editor_atto.get_selection(); + if (M.atto_table.selection !== false && (!M.atto_table.selection.collapsed)) { + var dialogue; + if (!M.atto_table.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_table.dialogue; + } + + dialogue.render(); + dialogue.set('bodyContent', M.atto_table.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createtable', 'atto_table')); + + dialogue.show(); + M.atto_table.dialogue = dialogue; + } + + }, + + /** + * Show the context menu + * + * @method show_menu + * @param Event e + * @param string elementid + */ + show_menu : function(e, elementid) { + var addhandlers = false; + + e.preventDefault(); + + if (this.controlmenu === null) { + addhandlers = true; + // Add event handlers for table control menus. + var bodycontent = '
'; + + this.controlmenu = new M.editor_atto.controlmenu({ + headerText : M.util.get_string('edittable', 'atto_table'), + bodyContent : bodycontent + }); + } + // We store the cell of the last click (the control node is transient). + this.lasttarget = e.target.ancestor('td, th'); + this.controlmenu.show(); + this.controlmenu.align(e.target, [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.BL]); + + if (addhandlers) { + var bodynode = this.controlmenu.get('boundingBox'); + bodynode.delegate('click', this.handle_table_control, 'a', this, elementid); + bodynode.delegate('key', this.handle_table_control, 'down:enter,space', 'a', this, elementid); + } + }, + + /** + * Determine the index of a row in a table column. + * + * @method get_row_index + * @param Y.Node node + */ + get_row_index : function(cell) { + var tablenode = cell.ancestor('table'), + rownode = cell.ancestor('tr'); + + if (!tablenode || !rownode) { + return; + } + + var rows = tablenode.all('tr'); + + return rows.indexOf(rownode); + }, + + /** + * Determine the index of a column in a table row. + * + * @method get_column_index + * @param Y.Node node + */ + get_column_index : function(cellnode) { + var rownode = cellnode.ancestor('tr'); + + if (!rownode) { + return; + } + + var cells = rownode.all('td, th'); + + return cells.indexOf(cellnode); + }, + + /** + * Delete the current row + * + * @method delete_row + * @param string elementid + */ + delete_row : function(elementid) { + var row = this.lasttarget.ancestor('tr'); + + if (row) { + // We do not remove rows with no cells (all headers). + if (row.one('td')) { + row.remove(true); + } + } + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move row up + * + * @method move_row_up + * @param string elementid + */ + move_row_up : function(elementid) { + var row = this.lasttarget.ancestor('tr'); + var prevrow = row.previous('tr'); + if (!row || !prevrow) { + return; + } + + row.swap(prevrow); + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move column left + * + * @method move_column_left + * @param string elementid + */ + move_column_left : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + var rows = this.lasttarget.ancestor('table').all('tr'); + var columncells = new Y.NodeList(); + var prevcells = new Y.NodeList(); + var hastd = false; + + rows.each(function(row) { + var cells = row.all('td, th'); + var cell = cells.item(columnindex), + cellprev = cells.item(columnindex-1); + columncells.push(cell); + if (cellprev) { + if (cellprev.get('tagName') === 'TD') { + hastd = true; + } + prevcells.push(cellprev); + } + }); + + if (hastd && prevcells.size() > 0) { + var i = 0; + for (i = 0; i < columncells.size(); i++) { + var cell = columncells.item(i); + var prevcell = prevcells.item(i); + + cell.swap(prevcell); + } + } + // Cleanup. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move column right + * + * @method move_column_right + * @param string elementid + */ + move_column_right : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + var rows = this.lasttarget.ancestor('table').all('tr'); + var columncells = new Y.NodeList(); + var nextcells = new Y.NodeList(); + var hastd = false; + + rows.each(function(row) { + var cells = row.all('td, th'); + var cell = cells.item(columnindex), + cellnext = cells.item(columnindex+1); + if (cell.get('tagName') === 'TD') { + hastd = true; + } + columncells.push(cell); + if (cellnext) { + nextcells.push(cellnext); + } + }); + + if (hastd && nextcells.size() > 0) { + var i = 0; + for (i = 0; i < columncells.size(); i++) { + var cell = columncells.item(i); + var nextcell = nextcells.item(i); + + cell.swap(nextcell); + } + } + // Cleanup. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move row down + * + * @method move_row_down + * @param string elementid + */ + move_row_down : function(elementid) { + var row = this.lasttarget.ancestor('tr'); + var nextrow = row.next('tr'); + if (!row || !nextrow) { + return; + } + + row.swap(nextrow); + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Delete the current column + * + * @method delete_column + * @param string elementid + */ + delete_column : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + var rows = this.lasttarget.ancestor('table').all('tr'); + var columncells = new Y.NodeList(); + var hastd = false; + + rows.each(function(row) { + var cells = row.all('td, th'); + var cell = cells.item(columnindex); + if (cell.get('tagName') === 'TD') { + hastd = true; + } + columncells.push(cell); + }); + + if (hastd) { + columncells.remove(true); + } + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Add a row after the current row. + * + * @method add_row_after + * @param string elementid + */ + add_row_after : function(elementid) { + var rowindex = this.get_row_index(this.lasttarget); + + var tablebody = this.lasttarget.ancestor('table').one('tbody'); + if (!tablebody) { + // Not all tables have tbody. + tablebody = this.lasttarget.ancestor('table'); + rowindex += 1; + } + + var firstrow = tablebody.one('tr'); + if (!firstrow) { + firstrow = this.lasttarget.ancestor('table').one('tr'); + } + if (!firstrow) { + // Table has no rows. Boo. + return; + } + newrow = firstrow.cloneNode(true); + newrow.all('th, td').each(function (tablecell) { + if (tablecell.get('tagName') === 'TH') { + if (tablecell.getAttribute('scope') !== 'row') { + var newcell = Y.Node.create(''); + tablecell.replace(newcell); + tablecell = newcell; + } + } + tablecell.setHTML(' '); + }); + + tablebody.insert(newrow, rowindex); + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Add a column after the current column. + * + * @method add_column_after + * @param string elementid + */ + add_column_after : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + + var tablecell = this.lasttarget.ancestor('table'); + var rows = tablecell.all('tr'); + Y.each(rows, function(row) { + // Clone the first cell from the row so it has the same type/attributes (e.g. scope). + var newcell = row.one('td, th').cloneNode(true); + // Clear the content of the cell. + newcell.setHTML(' '); + + row.insert(newcell, columnindex + 1); + }, this); + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Handle a selection from the table control menu. + * + * @method handle_table_control + * @param Y.Event event + * @param string elementid + */ + handle_table_control : function(event, elementid) { + event.preventDefault(); + + this.controlmenu.hide(); + + switch (event.target.get('id')) { + case 'addcolumnafter': + this.add_column_after(elementid); + break; + case 'addrowafter': + this.add_row_after(elementid); + break; + case 'deleterow': + this.delete_row(elementid); + break; + case 'deletecolumn': + this.delete_column(elementid); + break; + case 'moverowdown': + this.move_row_down(elementid); + break; + case 'moverowup': + this.move_row_up(elementid); + break; + case 'movecolumnleft': + this.move_column_left(elementid); + break; + case 'movecolumnright': + this.move_column_right(elementid); + break; + } + }, + + /** + * Add this button to the form. + * + * @method init + * @param {Object} params + */ + init : function(params) { + + if (!M.atto_table.menunode) { + // Used for inline table editing controls. + var img = Y.Node.create(''); + img.setAttrs({ + alt : M.util.get_string('edittable', 'atto_table'), + src : M.util.image_url('t/contextmenu', 'core'), + width : '12', + height : '12' + }); + var anchor = Y.Node.create(''); + anchor.appendChild(img); + anchor.addClass('atto_control'); + M.atto_table.menunode = anchor; + } + + M.editor_atto.add_toolbar_button(params.elementid, 'table', params.icon, params.group, this.display_chooser, this); + //Y.one('#' + params.elementid + 'editable').on('valuechange', this.insert_table_controls, this, params.elementid); + + var contenteditable = Y.one('#' + params.elementid + 'editable'); + contenteditable.delegate('click', this.show_menu, 'td > .atto_control, th > .atto_control', this, params.elementid); + contenteditable.delegate('key', this.show_menu, 'down:enter,space', 'td > .atto_control, th > .atto_control', this, params.elementid); + // Disable mozilla table controls. + if (Y.UA.gecko) { + document.execCommand("enableInlineTableEditing", false, "false"); + document.execCommand("enableObjectResizing", false, false); + } + + this.insert_table_controls(params.elementid); + + // Re-add the table controls whenever the content is updated. + M.editor_atto.add_text_updated_handler(params.elementid, this.insert_table_controls); + }, + + /** + * Add the table editing controls to the content area. + * + * @method insert_table_controls + * @param String elementid - The id of the text area backed by the content editable field. + */ + insert_table_controls : function(elementid) { + var contenteditable = Y.one('#' + elementid + 'editable'), + allcells = contenteditable.all('td .atto_control,th .atto_control'), + cells = contenteditable.all('td:last-child,th:last-child,tbody tr:last-child > td, tbody tr:last-child > th'); + + allcells.each(function(node) { + if (cells.indexOf(node) === -1) { + node.remove(true); + } + }); + + cells.each(function(node) { + if (!node.one('.atto_control')) { + node.append(M.atto_table.menunode.cloneNode(true)); + } + }, this); + }, + + /** + * The OK button has been pressed - make the changes to the source. + * + * @method set_table + * @param Event e + */ + set_table : function(e, elementid) { + var caption, + rows, + cols, + headers, + tablehtml, + i, j; + + e.preventDefault(); + M.atto_table.dialogue.hide(); + + caption = e.currentTarget.ancestor('.atto_form').one('#atto_table_caption'); + rows = e.currentTarget.ancestor('.atto_form').one('#atto_table_rows'); + cols = e.currentTarget.ancestor('.atto_form').one('#atto_table_columns'); + headers = e.currentTarget.ancestor('.atto_form').one('#atto_table_headers'); + + M.editor_atto.set_selection(M.atto_table.selection); + + // Note there are some spaces inserted in the cells and before and after, so that users have somewhere to click. + tablehtml = '
'; + tablehtml += ''; + + i = 0; + if (headers.get('value') === 'columns' || headers.get('value') === 'both') { + i = 1; + tablehtml += ''; + for (j = 0; j < parseInt(cols.get('value'), 10); j++) { + tablehtml += ''; + } + tablehtml += ''; + } + tablehtml += ''; + for (; i < parseInt(rows.get('value'), 10); i++) { + tablehtml += ''; + for (j = 0; j < parseInt(cols.get('value'), 10); j++) { + if (j === 0 && (headers.get('value') === 'rows' || headers.get('value') === 'both')) { + tablehtml += ''; + } else { + tablehtml += ''; + } + } + tablehtml += ''; + } + tablehtml += ''; + tablehtml += '
' + Y.Escape.html(caption.get('value')) + '

'; + + document.execCommand('insertHTML', false, tablehtml); + + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Return the HTML of the form to show in the dialogue. + * + * @method get_form_content + * @param string elementid + * @return string + */ + get_form_content : function(elementid) { + var content = Y.Node.create('
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + M.util.get_string('accessibilityhint', 'atto_table')); + + content.one('#atto_table_submit').on('click', M.atto_table.set_table, this, elementid); + return content; + } +}; + + +}, '@VERSION@', {"requires": ["node", "escape", "event", "event-valuechange"]}); diff --git a/lib/editor/atto/plugins/table/yui/src/button/build.json b/lib/editor/atto/plugins/table/yui/src/button/build.json new file mode 100644 index 00000000000..4eef4d2c514 --- /dev/null +++ b/lib/editor/atto/plugins/table/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_table-button", + "builds": { + "moodle-atto_table-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/table/yui/src/button/js/button.js b/lib/editor/atto/plugins/table/yui/src/button/js/button.js new file mode 100644 index 00000000000..8fd7aa28798 --- /dev/null +++ b/lib/editor/atto/plugins/table/yui/src/button/js/button.js @@ -0,0 +1,619 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor table plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_table = M.atto_table || { + + /** + * The window used to get the table details. + * + * @property dialogue + * @type M.core.dialogue + * @default null + */ + dialogue : null, + + /** + * The selection object returned by the browser. + * + * @property selection + * @type Range + * @default null + */ + selection : null, + + /** + * Yui image for table editing controls. + * + * @property menunode + * @type Y.Node + * @default null + */ + menunode : null, + + /** + * Popup menu for table controls + * + * @property controlmenu + * @type M.editor_atto.controlmenu + * @default null + */ + controlmenu : null, + + /** + * Last clicked cell that opened the context menu. + * + * @property lasttarget + * @type Y.Node + * @default null + */ + lasttarget : null, + + /** + * Display the chooser dialogue. + * + * @method init + * @param Event e + * @param string elementid + */ + display_chooser : function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + M.atto_table.selection = M.editor_atto.get_selection(); + if (M.atto_table.selection !== false && (!M.atto_table.selection.collapsed)) { + var dialogue; + if (!M.atto_table.dialogue) { + dialogue = new M.core.dialogue({ + visible: false, + modal: true, + close: true, + draggable: true + }); + } else { + dialogue = M.atto_table.dialogue; + } + + dialogue.render(); + dialogue.set('bodyContent', M.atto_table.get_form_content(elementid)); + dialogue.set('headerContent', M.util.get_string('createtable', 'atto_table')); + + dialogue.show(); + M.atto_table.dialogue = dialogue; + } + + }, + + /** + * Show the context menu + * + * @method show_menu + * @param Event e + * @param string elementid + */ + show_menu : function(e, elementid) { + var addhandlers = false; + + e.preventDefault(); + + if (this.controlmenu === null) { + addhandlers = true; + // Add event handlers for table control menus. + var bodycontent = '
'; + + this.controlmenu = new M.editor_atto.controlmenu({ + headerText : M.util.get_string('edittable', 'atto_table'), + bodyContent : bodycontent + }); + } + // We store the cell of the last click (the control node is transient). + this.lasttarget = e.target.ancestor('td, th'); + this.controlmenu.show(); + this.controlmenu.align(e.target, [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.BL]); + + if (addhandlers) { + var bodynode = this.controlmenu.get('boundingBox'); + bodynode.delegate('click', this.handle_table_control, 'a', this, elementid); + bodynode.delegate('key', this.handle_table_control, 'down:enter,space', 'a', this, elementid); + } + }, + + /** + * Determine the index of a row in a table column. + * + * @method get_row_index + * @param Y.Node node + */ + get_row_index : function(cell) { + var tablenode = cell.ancestor('table'), + rownode = cell.ancestor('tr'); + + if (!tablenode || !rownode) { + return; + } + + var rows = tablenode.all('tr'); + + return rows.indexOf(rownode); + }, + + /** + * Determine the index of a column in a table row. + * + * @method get_column_index + * @param Y.Node node + */ + get_column_index : function(cellnode) { + var rownode = cellnode.ancestor('tr'); + + if (!rownode) { + return; + } + + var cells = rownode.all('td, th'); + + return cells.indexOf(cellnode); + }, + + /** + * Delete the current row + * + * @method delete_row + * @param string elementid + */ + delete_row : function(elementid) { + var row = this.lasttarget.ancestor('tr'); + + if (row) { + // We do not remove rows with no cells (all headers). + if (row.one('td')) { + row.remove(true); + } + } + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move row up + * + * @method move_row_up + * @param string elementid + */ + move_row_up : function(elementid) { + var row = this.lasttarget.ancestor('tr'); + var prevrow = row.previous('tr'); + if (!row || !prevrow) { + return; + } + + row.swap(prevrow); + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move column left + * + * @method move_column_left + * @param string elementid + */ + move_column_left : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + var rows = this.lasttarget.ancestor('table').all('tr'); + var columncells = new Y.NodeList(); + var prevcells = new Y.NodeList(); + var hastd = false; + + rows.each(function(row) { + var cells = row.all('td, th'); + var cell = cells.item(columnindex), + cellprev = cells.item(columnindex-1); + columncells.push(cell); + if (cellprev) { + if (cellprev.get('tagName') === 'TD') { + hastd = true; + } + prevcells.push(cellprev); + } + }); + + if (hastd && prevcells.size() > 0) { + var i = 0; + for (i = 0; i < columncells.size(); i++) { + var cell = columncells.item(i); + var prevcell = prevcells.item(i); + + cell.swap(prevcell); + } + } + // Cleanup. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move column right + * + * @method move_column_right + * @param string elementid + */ + move_column_right : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + var rows = this.lasttarget.ancestor('table').all('tr'); + var columncells = new Y.NodeList(); + var nextcells = new Y.NodeList(); + var hastd = false; + + rows.each(function(row) { + var cells = row.all('td, th'); + var cell = cells.item(columnindex), + cellnext = cells.item(columnindex+1); + if (cell.get('tagName') === 'TD') { + hastd = true; + } + columncells.push(cell); + if (cellnext) { + nextcells.push(cellnext); + } + }); + + if (hastd && nextcells.size() > 0) { + var i = 0; + for (i = 0; i < columncells.size(); i++) { + var cell = columncells.item(i); + var nextcell = nextcells.item(i); + + cell.swap(nextcell); + } + } + // Cleanup. + M.editor_atto.text_updated(elementid); + }, + + /** + * Move row down + * + * @method move_row_down + * @param string elementid + */ + move_row_down : function(elementid) { + var row = this.lasttarget.ancestor('tr'); + var nextrow = row.next('tr'); + if (!row || !nextrow) { + return; + } + + row.swap(nextrow); + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Delete the current column + * + * @method delete_column + * @param string elementid + */ + delete_column : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + var rows = this.lasttarget.ancestor('table').all('tr'); + var columncells = new Y.NodeList(); + var hastd = false; + + rows.each(function(row) { + var cells = row.all('td, th'); + var cell = cells.item(columnindex); + if (cell.get('tagName') === 'TD') { + hastd = true; + } + columncells.push(cell); + }); + + if (hastd) { + columncells.remove(true); + } + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Add a row after the current row. + * + * @method add_row_after + * @param string elementid + */ + add_row_after : function(elementid) { + var rowindex = this.get_row_index(this.lasttarget); + + var tablebody = this.lasttarget.ancestor('table').one('tbody'); + if (!tablebody) { + // Not all tables have tbody. + tablebody = this.lasttarget.ancestor('table'); + rowindex += 1; + } + + var firstrow = tablebody.one('tr'); + if (!firstrow) { + firstrow = this.lasttarget.ancestor('table').one('tr'); + } + if (!firstrow) { + // Table has no rows. Boo. + return; + } + newrow = firstrow.cloneNode(true); + newrow.all('th, td').each(function (tablecell) { + if (tablecell.get('tagName') === 'TH') { + if (tablecell.getAttribute('scope') !== 'row') { + var newcell = Y.Node.create(''); + tablecell.replace(newcell); + tablecell = newcell; + } + } + tablecell.setHTML(' '); + }); + + tablebody.insert(newrow, rowindex); + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Add a column after the current column. + * + * @method add_column_after + * @param string elementid + */ + add_column_after : function(elementid) { + var columnindex = this.get_column_index(this.lasttarget); + + var tablecell = this.lasttarget.ancestor('table'); + var rows = tablecell.all('tr'); + Y.each(rows, function(row) { + // Clone the first cell from the row so it has the same type/attributes (e.g. scope). + var newcell = row.one('td, th').cloneNode(true); + // Clear the content of the cell. + newcell.setHTML(' '); + + row.insert(newcell, columnindex + 1); + }, this); + + // Clean the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Handle a selection from the table control menu. + * + * @method handle_table_control + * @param Y.Event event + * @param string elementid + */ + handle_table_control : function(event, elementid) { + event.preventDefault(); + + this.controlmenu.hide(); + + switch (event.target.get('id')) { + case 'addcolumnafter': + this.add_column_after(elementid); + break; + case 'addrowafter': + this.add_row_after(elementid); + break; + case 'deleterow': + this.delete_row(elementid); + break; + case 'deletecolumn': + this.delete_column(elementid); + break; + case 'moverowdown': + this.move_row_down(elementid); + break; + case 'moverowup': + this.move_row_up(elementid); + break; + case 'movecolumnleft': + this.move_column_left(elementid); + break; + case 'movecolumnright': + this.move_column_right(elementid); + break; + } + }, + + /** + * Add this button to the form. + * + * @method init + * @param {Object} params + */ + init : function(params) { + + if (!M.atto_table.menunode) { + // Used for inline table editing controls. + var img = Y.Node.create(''); + img.setAttrs({ + alt : M.util.get_string('edittable', 'atto_table'), + src : M.util.image_url('t/contextmenu', 'core'), + width : '12', + height : '12' + }); + var anchor = Y.Node.create(''); + anchor.appendChild(img); + anchor.addClass('atto_control'); + M.atto_table.menunode = anchor; + } + + M.editor_atto.add_toolbar_button(params.elementid, 'table', params.icon, params.group, this.display_chooser, this); + //Y.one('#' + params.elementid + 'editable').on('valuechange', this.insert_table_controls, this, params.elementid); + + var contenteditable = Y.one('#' + params.elementid + 'editable'); + contenteditable.delegate('click', this.show_menu, 'td > .atto_control, th > .atto_control', this, params.elementid); + contenteditable.delegate('key', this.show_menu, 'down:enter,space', 'td > .atto_control, th > .atto_control', this, params.elementid); + // Disable mozilla table controls. + if (Y.UA.gecko) { + document.execCommand("enableInlineTableEditing", false, "false"); + document.execCommand("enableObjectResizing", false, false); + } + + this.insert_table_controls(params.elementid); + + // Re-add the table controls whenever the content is updated. + M.editor_atto.add_text_updated_handler(params.elementid, this.insert_table_controls); + }, + + /** + * Add the table editing controls to the content area. + * + * @method insert_table_controls + * @param String elementid - The id of the text area backed by the content editable field. + */ + insert_table_controls : function(elementid) { + var contenteditable = Y.one('#' + elementid + 'editable'), + allcells = contenteditable.all('td .atto_control,th .atto_control'), + cells = contenteditable.all('td:last-child,th:last-child,tbody tr:last-child > td, tbody tr:last-child > th'); + + allcells.each(function(node) { + if (cells.indexOf(node) === -1) { + node.remove(true); + } + }); + + cells.each(function(node) { + if (!node.one('.atto_control')) { + node.append(M.atto_table.menunode.cloneNode(true)); + } + }, this); + }, + + /** + * The OK button has been pressed - make the changes to the source. + * + * @method set_table + * @param Event e + */ + set_table : function(e, elementid) { + var caption, + rows, + cols, + headers, + tablehtml, + i, j; + + e.preventDefault(); + M.atto_table.dialogue.hide(); + + caption = e.currentTarget.ancestor('.atto_form').one('#atto_table_caption'); + rows = e.currentTarget.ancestor('.atto_form').one('#atto_table_rows'); + cols = e.currentTarget.ancestor('.atto_form').one('#atto_table_columns'); + headers = e.currentTarget.ancestor('.atto_form').one('#atto_table_headers'); + + M.editor_atto.set_selection(M.atto_table.selection); + + // Note there are some spaces inserted in the cells and before and after, so that users have somewhere to click. + tablehtml = '
'; + tablehtml += ''; + + i = 0; + if (headers.get('value') === 'columns' || headers.get('value') === 'both') { + i = 1; + tablehtml += ''; + for (j = 0; j < parseInt(cols.get('value'), 10); j++) { + tablehtml += ''; + } + tablehtml += ''; + } + tablehtml += ''; + for (; i < parseInt(rows.get('value'), 10); i++) { + tablehtml += ''; + for (j = 0; j < parseInt(cols.get('value'), 10); j++) { + if (j === 0 && (headers.get('value') === 'rows' || headers.get('value') === 'both')) { + tablehtml += ''; + } else { + tablehtml += ''; + } + } + tablehtml += ''; + } + tablehtml += ''; + tablehtml += '
' + Y.Escape.html(caption.get('value')) + '

'; + + document.execCommand('insertHTML', false, tablehtml); + + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }, + + /** + * Return the HTML of the form to show in the dialogue. + * + * @method get_form_content + * @param string elementid + * @return string + */ + get_form_content : function(elementid) { + var content = Y.Node.create('
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '' + + '' + + '
' + + '
' + + '
' + + '' + + '
' + + '
' + + '
' + M.util.get_string('accessibilityhint', 'atto_table')); + + content.one('#atto_table_submit').on('click', M.atto_table.set_table, this, elementid); + return content; + } +}; diff --git a/lib/editor/atto/plugins/table/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/table/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..b36d2785778 --- /dev/null +++ b/lib/editor/atto/plugins/table/yui/src/button/meta/editor.json @@ -0,0 +1,10 @@ +{ + "moodle-atto_table-button": { + "requires": [ + "node", + "escape", + "event", + "event-valuechange" + ] + } +} diff --git a/lib/editor/atto/plugins/title/lang/en/atto_title.php b/lib/editor/atto/plugins/title/lang/en/atto_title.php new file mode 100644 index 00000000000..4435b2bb021 --- /dev/null +++ b/lib/editor/atto/plugins/title/lang/en/atto_title.php @@ -0,0 +1,32 @@ +. + +/** + * Strings for component 'atto_title', language 'en'. + * + * @package atto_title + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['blockquote'] = 'Quoted'; +$string['h3'] = 'Heading 1'; +$string['h4'] = 'Heading 2'; +$string['h5'] = 'Heading 3'; +$string['p'] = 'Plain'; +$string['pluginname'] = 'Paragraph styles'; +$string['pre'] = 'Pre-formatted'; +$string['title'] = 'Paragraph styles'; diff --git a/lib/editor/atto/plugins/title/lib.php b/lib/editor/atto/plugins/title/lib.php new file mode 100644 index 00000000000..2a5369c3c0d --- /dev/null +++ b/lib/editor/atto/plugins/title/lib.php @@ -0,0 +1,54 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_title + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_title_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/styleprops', 'editor_atto'); + + $PAGE->requires->strings_for_js(array('h3', + 'h4', + 'h5', + 'blockquote', + 'pre', + 'p'), 'atto_title'); + $PAGE->requires->yui_module('moodle-atto_title-button', + 'M.atto_title.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'title'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_title_sort_order() { + return 9; +} diff --git a/lib/editor/atto/plugins/title/version.php b/lib/editor/atto/plugins/title/version.php new file mode 100644 index 00000000000..2cad843b64e --- /dev/null +++ b/lib/editor/atto/plugins/title/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_title + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_title'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-debug.js b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-debug.js new file mode 100644 index 00000000000..a66644fe626 --- /dev/null +++ b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-debug.js @@ -0,0 +1,85 @@ +YUI.add('moodle-atto_title-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor title plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_title = M.atto_title || { + init : function(params) { + var click_h3 = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + var click_h4 = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + var click_h5 = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + var click_pre = function(e, elementid) { + M.atto_title.change_title(e, elementid, '
');
+        };
+        var click_blockquote = function(e, elementid) {
+            M.atto_title.change_title(e, elementid, '
'); + }; + var click_p = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + + var h3 = M.util.get_string('h3', 'atto_title'); + var h4 = M.util.get_string('h4', 'atto_title'); + var h5 = M.util.get_string('h5', 'atto_title'); + var pre = M.util.get_string('pre', 'atto_title'); + var blockquote = M.util.get_string('blockquote', 'atto_title'); + var p = M.util.get_string('p', 'atto_title'); + + M.editor_atto.add_toolbar_menu(params.elementid, + 'title', + params.icon, + params.group, + [ + {'text' : h3, 'handler' : click_h3}, + {'text' : h4, 'handler' : click_h4}, + {'text' : h5, 'handler' : click_h5}, + {'text' : pre, 'handler' : click_pre}, + {'text' : blockquote, 'handler' : click_blockquote}, + {'text' : p, 'handler' : click_p} + ]); + }, + + /** + * Handle a choice from the menu (insert the node in the text editor matching elementid). + * @param event e - The event that triggered this. + * @param string elementid - The id of the editor + * @param string node - The html to insert + */ + change_title : function(e, elementid, node) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('formatBlock', false, node); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-min.js b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-min.js new file mode 100644 index 00000000000..32aae116bd8 --- /dev/null +++ b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_title-button",function(e,t){M.atto_title=M.atto_title||{init:function(e){var t=function(e,t){M.atto_title.change_title(e,t,"

")},n=function(e,t){M.atto_title.change_title(e,t,"

")},r=function(e,t){M.atto_title.change_title(e,t,"

")},i=function(e,t){M.atto_title.change_title(e,t,"
")},s=function(e,t){M.atto_title.change_title(e,t,"
")},o=function(e,t){M.atto_title.change_title(e,t,"

")},u=M.util.get_string("h3","atto_title"),a=M.util.get_string("h4","atto_title"),f=M.util.get_string("h5","atto_title"),l=M.util.get_string("pre","atto_title"),c=M.util.get_string("blockquote","atto_title"),h=M.util.get_string("p","atto_title");M.editor_atto.add_toolbar_menu(e.elementid,"title",e.icon,e.group,[{text:u,handler:t},{text:a,handler:n},{text:f,handler:r},{text:l,handler:i},{text:c,handler:s},{text:h,handler:o}])},change_title:function(e,t,n){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("formatBlock",!1,n),M.editor_atto.text_updated(t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js new file mode 100644 index 00000000000..a66644fe626 --- /dev/null +++ b/lib/editor/atto/plugins/title/yui/build/moodle-atto_title-button/moodle-atto_title-button.js @@ -0,0 +1,85 @@ +YUI.add('moodle-atto_title-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor title plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_title = M.atto_title || { + init : function(params) { + var click_h3 = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + var click_h4 = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + var click_h5 = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + var click_pre = function(e, elementid) { + M.atto_title.change_title(e, elementid, '
');
+        };
+        var click_blockquote = function(e, elementid) {
+            M.atto_title.change_title(e, elementid, '
'); + }; + var click_p = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + + var h3 = M.util.get_string('h3', 'atto_title'); + var h4 = M.util.get_string('h4', 'atto_title'); + var h5 = M.util.get_string('h5', 'atto_title'); + var pre = M.util.get_string('pre', 'atto_title'); + var blockquote = M.util.get_string('blockquote', 'atto_title'); + var p = M.util.get_string('p', 'atto_title'); + + M.editor_atto.add_toolbar_menu(params.elementid, + 'title', + params.icon, + params.group, + [ + {'text' : h3, 'handler' : click_h3}, + {'text' : h4, 'handler' : click_h4}, + {'text' : h5, 'handler' : click_h5}, + {'text' : pre, 'handler' : click_pre}, + {'text' : blockquote, 'handler' : click_blockquote}, + {'text' : p, 'handler' : click_p} + ]); + }, + + /** + * Handle a choice from the menu (insert the node in the text editor matching elementid). + * @param event e - The event that triggered this. + * @param string elementid - The id of the editor + * @param string node - The html to insert + */ + change_title : function(e, elementid, node) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('formatBlock', false, node); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/title/yui/src/button/build.json b/lib/editor/atto/plugins/title/yui/src/button/build.json new file mode 100644 index 00000000000..8ee3ce0e4b8 --- /dev/null +++ b/lib/editor/atto/plugins/title/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_title-button", + "builds": { + "moodle-atto_title-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/title/yui/src/button/js/button.js b/lib/editor/atto/plugins/title/yui/src/button/js/button.js new file mode 100644 index 00000000000..1f5de116cb2 --- /dev/null +++ b/lib/editor/atto/plugins/title/yui/src/button/js/button.js @@ -0,0 +1,80 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor title plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_title = M.atto_title || { + init : function(params) { + var click_h3 = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + var click_h4 = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + var click_h5 = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + var click_pre = function(e, elementid) { + M.atto_title.change_title(e, elementid, '
');
+        };
+        var click_blockquote = function(e, elementid) {
+            M.atto_title.change_title(e, elementid, '
'); + }; + var click_p = function(e, elementid) { + M.atto_title.change_title(e, elementid, '

'); + }; + + var h3 = M.util.get_string('h3', 'atto_title'); + var h4 = M.util.get_string('h4', 'atto_title'); + var h5 = M.util.get_string('h5', 'atto_title'); + var pre = M.util.get_string('pre', 'atto_title'); + var blockquote = M.util.get_string('blockquote', 'atto_title'); + var p = M.util.get_string('p', 'atto_title'); + + M.editor_atto.add_toolbar_menu(params.elementid, + 'title', + params.icon, + params.group, + [ + {'text' : h3, 'handler' : click_h3}, + {'text' : h4, 'handler' : click_h4}, + {'text' : h5, 'handler' : click_h5}, + {'text' : pre, 'handler' : click_pre}, + {'text' : blockquote, 'handler' : click_blockquote}, + {'text' : p, 'handler' : click_p} + ]); + }, + + /** + * Handle a choice from the menu (insert the node in the text editor matching elementid). + * @param event e - The event that triggered this. + * @param string elementid - The id of the editor + * @param string node - The html to insert + */ + change_title : function(e, elementid, node) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('formatBlock', false, node); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + } +}; diff --git a/lib/editor/atto/plugins/title/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/title/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..c073041342e --- /dev/null +++ b/lib/editor/atto/plugins/title/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_title-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/underline/lang/en/atto_underline.php b/lib/editor/atto/plugins/underline/lang/en/atto_underline.php new file mode 100644 index 00000000000..74c9e3f4703 --- /dev/null +++ b/lib/editor/atto/plugins/underline/lang/en/atto_underline.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_underline', language 'en'. + * + * @package atto_underline + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Underline'; diff --git a/lib/editor/atto/plugins/underline/lib.php b/lib/editor/atto/plugins/underline/lib.php new file mode 100644 index 00000000000..cc66d3a74b3 --- /dev/null +++ b/lib/editor/atto/plugins/underline/lib.php @@ -0,0 +1,48 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_underline + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_underline_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/underline', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_underline-button', + 'M.atto_underline.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'style'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_underline_sort_order() { + return 2; +} diff --git a/lib/editor/atto/plugins/underline/version.php b/lib/editor/atto/plugins/underline/version.php new file mode 100644 index 00000000000..efc7eda869a --- /dev/null +++ b/lib/editor/atto/plugins/underline/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_underline + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_underline'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js new file mode 100644 index 00000000000..1566a0f2813 --- /dev/null +++ b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_underline-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor underline plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_underline = M.atto_underline || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('underline', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js new file mode 100644 index 00000000000..5880711bb21 --- /dev/null +++ b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_underline-button",function(e,t){M.atto_underline=M.atto_underline||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("underline",!1,null),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"underline",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js new file mode 100644 index 00000000000..1566a0f2813 --- /dev/null +++ b/lib/editor/atto/plugins/underline/yui/build/moodle-atto_underline-button/moodle-atto_underline-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_underline-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor underline plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_underline = M.atto_underline || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('underline', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/underline/yui/src/button/build.json b/lib/editor/atto/plugins/underline/yui/src/button/build.json new file mode 100644 index 00000000000..761727315e1 --- /dev/null +++ b/lib/editor/atto/plugins/underline/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_underline-button", + "builds": { + "moodle-atto_underline-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/underline/yui/src/button/js/button.js b/lib/editor/atto/plugins/underline/yui/src/button/js/button.js new file mode 100644 index 00000000000..1ea68b08940 --- /dev/null +++ b/lib/editor/atto/plugins/underline/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor underline plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_underline = M.atto_underline || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('underline', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'underline', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/underline/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/underline/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..e96b89bcddb --- /dev/null +++ b/lib/editor/atto/plugins/underline/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_underline-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/unlink/lang/en/atto_unlink.php b/lib/editor/atto/plugins/unlink/lang/en/atto_unlink.php new file mode 100644 index 00000000000..bbf03b7a181 --- /dev/null +++ b/lib/editor/atto/plugins/unlink/lang/en/atto_unlink.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_unlink', language 'en'. + * + * @package atto_unlink + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Unlink'; diff --git a/lib/editor/atto/plugins/unlink/lib.php b/lib/editor/atto/plugins/unlink/lib.php new file mode 100644 index 00000000000..8c9f059f3ba --- /dev/null +++ b/lib/editor/atto/plugins/unlink/lib.php @@ -0,0 +1,46 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_unlink + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_unlink_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/remove_link', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_unlink-button', + 'M.atto_unlink.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'link'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_unlink_sort_order() { + return 12; +} diff --git a/lib/editor/atto/plugins/unlink/version.php b/lib/editor/atto/plugins/unlink/version.php new file mode 100644 index 00000000000..5e5b14395f2 --- /dev/null +++ b/lib/editor/atto/plugins/unlink/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_unlink + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_unlink'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js new file mode 100644 index 00000000000..b3d87f52cf5 --- /dev/null +++ b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_unlink-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor unlink plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_unlink = M.atto_unlink || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('unlink', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js new file mode 100644 index 00000000000..ebfb57b9cfd --- /dev/null +++ b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_unlink-button",function(e,t){M.atto_unlink=M.atto_unlink||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("unlink",!1,null),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"unlink",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js new file mode 100644 index 00000000000..b3d87f52cf5 --- /dev/null +++ b/lib/editor/atto/plugins/unlink/yui/build/moodle-atto_unlink-button/moodle-atto_unlink-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_unlink-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor unlink plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_unlink = M.atto_unlink || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('unlink', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/unlink/yui/src/button/build.json b/lib/editor/atto/plugins/unlink/yui/src/button/build.json new file mode 100644 index 00000000000..57ceaa51efb --- /dev/null +++ b/lib/editor/atto/plugins/unlink/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_unlink-button", + "builds": { + "moodle-atto_unlink-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/unlink/yui/src/button/js/button.js b/lib/editor/atto/plugins/unlink/yui/src/button/js/button.js new file mode 100644 index 00000000000..e8cc4fd819a --- /dev/null +++ b/lib/editor/atto/plugins/unlink/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor unlink plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_unlink = M.atto_unlink || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('unlink', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'unlink', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/unlink/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/unlink/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..448646904ac --- /dev/null +++ b/lib/editor/atto/plugins/unlink/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_unlink-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/plugins/unorderedlist/lang/en/atto_unorderedlist.php b/lib/editor/atto/plugins/unorderedlist/lang/en/atto_unorderedlist.php new file mode 100644 index 00000000000..d8cac218f2e --- /dev/null +++ b/lib/editor/atto/plugins/unorderedlist/lang/en/atto_unorderedlist.php @@ -0,0 +1,25 @@ +. + +/** + * Strings for component 'atto_unorderedlist', language 'en'. + * + * @package atto_unorderedlist + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +$string['pluginname'] = 'Unordered list'; diff --git a/lib/editor/atto/plugins/unorderedlist/lib.php b/lib/editor/atto/plugins/unorderedlist/lib.php new file mode 100644 index 00000000000..64f07e65e7b --- /dev/null +++ b/lib/editor/atto/plugins/unorderedlist/lib.php @@ -0,0 +1,46 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_unorderedlist + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/** + * Initialise this plugin + * @param string $elementid + */ +function atto_unorderedlist_init_editor($elementid) { + global $PAGE, $OUTPUT; + + $icon = array('e/bullet_list', 'editor_atto'); + + $PAGE->requires->yui_module('moodle-atto_unorderedlist-button', + 'M.atto_unorderedlist.init', + array(array('elementid'=>$elementid, 'icon'=>$icon, 'group'=>'list'))); + +} + +/** + * Return the order this plugin should be displayed in the toolbar + * @return int the absolute position within the toolbar + */ +function atto_unorderedlist_sort_order() { + return 7; +} diff --git a/lib/editor/atto/plugins/unorderedlist/version.php b/lib/editor/atto/plugins/unorderedlist/version.php new file mode 100644 index 00000000000..bbc36d26dbf --- /dev/null +++ b/lib/editor/atto/plugins/unorderedlist/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package atto_unorderedlist + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'atto_unorderedlist'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js new file mode 100644 index 00000000000..6b9309a051a --- /dev/null +++ b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-debug.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_unorderedlist-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor unorderedlist plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_unorderedlist = M.atto_unorderedlist || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('insertUnorderedList', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js new file mode 100644 index 00000000000..1498365a7c8 --- /dev/null +++ b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button-min.js @@ -0,0 +1 @@ +YUI.add("moodle-atto_unorderedlist-button",function(e,t){M.atto_unorderedlist=M.atto_unorderedlist||{init:function(e){var t=function(e,t){e.preventDefault(),M.editor_atto.is_active(t)||M.editor_atto.focus(t),document.execCommand("insertUnorderedList",!1,null),M.editor_atto.text_updated(t)};M.editor_atto.add_toolbar_button(e.elementid,"unorderedlist",e.icon,e.group,t)}}},"@VERSION@",{requires:["node"]}); diff --git a/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js new file mode 100644 index 00000000000..6b9309a051a --- /dev/null +++ b/lib/editor/atto/plugins/unorderedlist/yui/build/moodle-atto_unorderedlist-button/moodle-atto_unorderedlist-button.js @@ -0,0 +1,42 @@ +YUI.add('moodle-atto_unorderedlist-button', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor unorderedlist plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_unorderedlist = M.atto_unorderedlist || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('insertUnorderedList', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, params.group, click); + } +}; + + +}, '@VERSION@', {"requires": ["node"]}); diff --git a/lib/editor/atto/plugins/unorderedlist/yui/src/button/build.json b/lib/editor/atto/plugins/unorderedlist/yui/src/button/build.json new file mode 100644 index 00000000000..eced221fea8 --- /dev/null +++ b/lib/editor/atto/plugins/unorderedlist/yui/src/button/build.json @@ -0,0 +1,10 @@ +{ + "name": "moodle-atto_unorderedlist-button", + "builds": { + "moodle-atto_unorderedlist-button": { + "jsfiles": [ + "button.js" + ] + } + } +} diff --git a/lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js b/lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js new file mode 100644 index 00000000000..9a3895d1247 --- /dev/null +++ b/lib/editor/atto/plugins/unorderedlist/yui/src/button/js/button.js @@ -0,0 +1,37 @@ +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto text editor unorderedlist plugin. + * + * @package editor-atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.atto_unorderedlist = M.atto_unorderedlist || { + init : function(params) { + var click = function(e, elementid) { + e.preventDefault(); + if (!M.editor_atto.is_active(elementid)) { + M.editor_atto.focus(elementid); + } + document.execCommand('insertUnorderedList', false, null); + // Clean the YUI ids from the HTML. + M.editor_atto.text_updated(elementid); + }; + + M.editor_atto.add_toolbar_button(params.elementid, 'unorderedlist', params.icon, params.group, click); + } +}; diff --git a/lib/editor/atto/plugins/unorderedlist/yui/src/button/meta/editor.json b/lib/editor/atto/plugins/unorderedlist/yui/src/button/meta/editor.json new file mode 100644 index 00000000000..58307eb3208 --- /dev/null +++ b/lib/editor/atto/plugins/unorderedlist/yui/src/button/meta/editor.json @@ -0,0 +1,5 @@ +{ + "moodle-atto_unorderedlist-button": { + "requires": ["node"] + } +} diff --git a/lib/editor/atto/styles.css b/lib/editor/atto/styles.css new file mode 100644 index 00000000000..e71092dff9a --- /dev/null +++ b/lib/editor/atto/styles.css @@ -0,0 +1,180 @@ +.editor_atto_content_wrap { + background-color: white; +} +.editor_atto_content { + padding: 4px; +} + +.editor_atto_content_wrap, +.editor_atto + textarea { + width: 100%; + padding: 0; + border: 1px solid #BBB; + border-top: none; +} + +.editor_atto + textarea { + border-radius: 0; + resize: vertical; + margin-top: -1px; +} + +div.editor_atto_toolbar { + display: block; + background: #F2F2F2; + min-height: 35px; + border: 1px solid #BBB; + width: 100%; + padding: 0 0 9px 0; +} + +div.editor_atto_toolbar button { + padding: 3px 9px; + background: none; + border: 0px; + margin: 0; + border-radius: 0; + cursor: pointer; + } + +div.editor_atto_toolbar button + button { + border-left: 1px solid #CCC; +} + +div.editor_atto_toolbar button[disabled] { + opacity: .45; + background: none; + cursor: default; +} + +.editor_atto_toolbar button:hover { + background-image: radial-gradient(ellipse at center, #ffffff 60%,#dfdfdf 100%); + background-color: #ebebeb; +} + +.editor_atto_toolbar button:active { + background-image: radial-gradient(ellipse at center, #ffffff 40%,#dfdfdf 100%); + background-color: #dfdfdf; +} + +div.editor_atto_toolbar button img { + padding: 1px; +} + + +div.editor_atto_toolbar div.atto_group { + display: inline-block; + border: 1px solid #CCC; + border-bottom: 1px solid #B3B3B3; + border-radius: 4px; + margin: 9px 0px 0px 9px; + background: #FFF; +} + +.editor_atto_content img { + resize: both; overflow: auto; +} + +.atto_menuentry img { + width: 16px; + height: 16px; +} + +.atto_menu { + min-width: 12em; + background: white; + padding: 1px; +} + +.atto_menu a { + color: black; +} +.atto_menuentry { + border-bottom: 1px solid #eee; + padding: 2px; + clear: left; +} + +.atto_menuentry h1, +.atto_menuentry h2, +.atto_menuentry p { + margin: 4px; +} + + +.atto_form label.sameline { + display: inline-block; + min-width: 4em; +} +.atto_form textarea.fullwidth, +.atto_form input.fullwidth { + width: 100%; +} +.atto_form { + padding-left: 30px; + padding-right: 30px; +} +.atto_form label { + display: block; + margin: 5px; +} + +/* RTL Rules */ +body.dir-rtl div.editor_atto_toolbar button + button { + border-left: 0; + border-right: 1px solid #CCC; +} + +body.dir-rtl div.editor_atto_toolbar img.icon { + padding: 0; +} + +body.dir-rtl div.editor_atto_toolbar div.atto_group { + margin: 9px 9px 0px 0px; +} + +.atto_control { + position: absolute; + right: -6px; + bottom: -6px; + display: none; + cursor: pointer; +} +.atto_control img { + background-color: white; +} +div.editor_atto_content:focus .atto_control, +div.editor_atto_content:hover .atto_control { + display: block; +} + +.yui3-controlmenu-hidden { + display: none; +} +.editor_atto_controlmenu li { + list-style-type: none; + padding: 0px; + margin; 0px; +} +.editor_atto_controlmenu ul { + padding: 0px; + margin: 0px; +} +.editor_atto_controlmenu .moodle-dialogue-hd, +.editor_atto_controlmenu .moodle-dialogue-ft { + display: none; +} + +.editor_atto_controlmenu ul li a:active, +.editor_atto_controlmenu ul li a:hover { + background-color: #0088cc; + color: white; +} +.editor_atto_controlmenu ul li a { + color: #333; + padding: 2px; + padding-left: 6px; + padding-right: 6px; + border-radius: 2px; + display: block; +} diff --git a/lib/editor/atto/version.php b/lib/editor/atto/version.php new file mode 100644 index 00000000000..c2112cb401c --- /dev/null +++ b/lib/editor/atto/version.php @@ -0,0 +1,29 @@ +. + +/** + * Atto text editor integration version file. + * + * @package editor_atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +defined('MOODLE_INTERNAL') || die(); + +$plugin->version = 2014012800; // The current plugin version (Date: YYYYMMDDXX). +$plugin->requires = 2013110500; // Requires this Moodle version. +$plugin->component = 'editor_atto'; // Full name of the plugin (used for diagnostics). diff --git a/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js new file mode 100644 index 00000000000..d5293faf3f5 --- /dev/null +++ b/lib/editor/atto/yui/build/moodle-editor_atto-editor/moodle-editor_atto-editor-debug.js @@ -0,0 +1,702 @@ +YUI.add('moodle-editor_atto-editor', function (Y, NAME) { + +// This file is part of Moodle - http://moodle.org/ +// +// Moodle is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Moodle is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Moodle. If not, see . + +/** + * Atto editor. + * + * @package editor_atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ + +/** + * Classes constants. + */ +CSS = { + CONTENT: 'editor_atto_content', + CONTENTWRAPPER: 'editor_atto_content_wrap', + TOOLBAR: 'editor_atto_toolbar', + WRAPPER: 'editor_atto' +}; + +/** + * Atto editor main class. + * Common functions required by editor plugins. + * + * @package editor_atto + * @copyright 2013 Damyon Wiese + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +M.editor_atto = M.editor_atto || { + + /** + * List of attached button handlers to prevent duplicates. + */ + buttonhandlers : {}, + + /** + * List of attached handlers to add inline editing controls to content. + */ + textupdatedhandlers : {}, + + /** + * List of YUI overlays for custom menus. + */ + menus : {}, + + /** + * List of attached menu handlers to prevent duplicates. + */ + menuhandlers : {}, + + /** + * List of file picker options for specific editor instances. + */ + filepickeroptions : {}, + + /** + * List of buttons and menus that have been added to the toolbar. + */ + widgets : {}, + + /** + * Toggle a menu. + * @param event e + */ + showhide_menu_handler : function(e) { + e.preventDefault(); + var disabled = this.getAttribute('disabled'); + var overlayid = this.getAttribute('data-menu'); + var overlay = M.editor_atto.menus[overlayid]; + var menu = overlay.get('bodyContent'); + if (overlay.get('visible') || disabled) { + overlay.hide(); + menu.detach('clickoutside'); + } else { + menu.on('clickoutside', function(ev) { + if ((ev.target.ancestor() !== this) && (ev.target !== this)) { + if (overlay.get('visible')) { + menu.detach('clickoutside'); + overlay.hide(); + } + } + }, this); + overlay.show(); + overlay.bodyNode.one('a').focus(); + } + }, + + /** + * Handle clicks on editor buttons. + * @param event e + */ + buttonclicked_handler : function(e) { + var elementid = this.getAttribute('data-editor'); + var plugin = this.getAttribute('data-plugin'); + var handler = this.getAttribute('data-handler'); + var overlay = M.editor_atto.menus[plugin + '_' + elementid]; + + if (overlay) { + overlay.hide(); + } + + if (M.editor_atto.is_enabled(elementid, plugin)) { + // Pass it on. + handler = M.editor_atto.buttonhandlers[handler]; + return handler(e, elementid); + } + }, + + /** + * Determine if the specified toolbar button/menu is enabled. + * @param string elementid, the element id of this editor. + * @param string plugin, the plugin that created the button/menu. + */ + is_enabled : function(elementid, plugin) { + var element = Y.one('#' + elementid + '_toolbar .atto_' + plugin + '_button'); + + return !element.hasAttribute('disabled'); + }, + /** + * Disable all buttons and menus in the toolbar. + * @param string elementid, the element id of this editor. + */ + disable_all_widgets : function(elementid) { + var plugin, element; + for (plugin in M.editor_atto.widgets) { + element = Y.one('#' + elementid + '_toolbar .atto_' + plugin + '_button'); + + if (element) { + element.setAttribute('disabled', 'true'); + } + } + }, + + /** + * Enable a single widget in the toolbar. + * @param string elementid, the element id of this editor. + * @param string plugin, the name of the plugin that created the widget. + */ + enable_widget : function(elementid, plugin) { + var element = Y.one('#' + elementid + '_toolbar .atto_' + plugin + '_button'); + + if (element) { + element.removeAttribute('disabled'); + } + }, + + /** + * Enable all buttons and menus in the toolbar. + * @param string elementid, the element id of this editor. + */ + enable_all_widgets : function(elementid) { + var plugin, element; + for (plugin in M.editor_atto.widgets) { + element = Y.one('#' + elementid + '_toolbar .atto_' + plugin + '_button'); + + if (element) { + element.removeAttribute('disabled'); + } + } + }, + + /** + * Add a content update handler to be called whenever the content is updated. + * This is used to add inline editing controls to the content that are cleaned on submission. + * + * @param string elementid - the id of the textarea we created this editor from. + * @handler function callback - The function to do the cleaning. + * @param object context - the context to set for the callback. + * @handler function handler - A function to call when the button is clicked. + */ + add_text_updated_handler : function(elementid, callback) { + if (!(elementid in M.editor_atto.textupdatedhandlers)) { + M.editor_atto.textupdatedhandlers[elementid] = []; + } + M.editor_atto.textupdatedhandlers[elementid].push(callback); + }, + + /** + * Add a button to the toolbar belonging to the editor for element with id "elementid". + * @param string elementid - the id of the textarea we created this editor from. + * @param string plugin - the plugin defining the button + * @param string icon - the html used for the content of the button + * @param string groupname - the group the button should be appended to. + * @param array entries - List of menu entries with the string (entry.text) and the handlers (entry.handler). + */ + add_toolbar_menu : function(elementid, plugin, icon, groupname, entries) { + var toolbar = Y.one('#' + elementid + '_toolbar'), + group = Y.one('#' + elementid + '_toolbar .atto_group.' + groupname + '_group'), + currentfocus, + button, + imgurl, + expimgurl; + + if (!group) { + group = Y.Node.create('

'); + toolbar.append(group); + } + imgurl = M.util.image_url(icon[0], icon[1]); + expimgurl = M.util.image_url('t/expanded', 'moodle'); + button = Y.Node.create(''); + + group.append(button); + + currentfocus = toolbar.getAttribute('aria-activedescendant'); + if (!currentfocus) { + button.setAttribute('tabindex', '0'); + toolbar.setAttribute('aria-activedescendant', button.generateID()); + } + + // Save the name of the plugin. + M.editor_atto.widgets[plugin] = plugin; + + var menu = Y.Node.create('
'); + var i = 0, entry = {}; + + for (i = 0; i < entries.length; i++) { + entry = entries[i]; + + menu.append(Y.Node.create('')); + if (!M.editor_atto.buttonhandlers[plugin + '_action_' + i]) { + Y.one('body').delegate('click', M.editor_atto.buttonclicked_handler, '.atto_' + plugin + '_action_' + i); + Y.one('body').delegate('key', M.editor_atto.buttonclicked_handler, 'space,enter', '.atto_' + plugin + '_action_' + i); + M.editor_atto.buttonhandlers[plugin + '_action_' + i] = entry.handler; + } + } + + if (!M.editor_atto.buttonhandlers[plugin]) { + Y.one('body').delegate('click', M.editor_atto.showhide_menu_handler, '.atto_' + plugin + '_button'); + M.editor_atto.buttonhandlers[plugin] = true; + } + + var overlay = new M.core.dialogue({ + bodyContent : menu, + visible : false, + width: '14em', + zindex: 100, + lightbox: false, + closeButton: false, + centered : false, + align: {node: button, points: [Y.WidgetPositionAlign.TL, Y.WidgetPositionAlign.BL]} + }); + + M.editor_atto.menus[plugin + '_' + elementid] = overlay; + overlay.render(); + overlay.hide(); + overlay.headerNode.hide(); + }, + + /** + * Add a button to the toolbar belonging to the editor for element with id "elementid". + * @param string elementid - the id of the textarea we created this editor from. + * @param string plugin - the plugin defining the button. + * @param string icon - the html used for the content of the button. + * @param string groupname - the group the button should be appended to. + * @handler function handler- A function to call when the button is clicked. + */ + add_toolbar_button : function(elementid, plugin, icon, groupname, handler) { + var toolbar = Y.one('#' + elementid + '_toolbar'), + group = Y.one('#' + elementid + '_toolbar .atto_group.' + groupname + '_group'), + button, + currentfocus, + imgurl; + + if (!group) { + group = Y.Node.create('
'); + toolbar.append(group); + } + imgurl = M.util.image_url(icon[0], icon[1]); + button = Y.Node.create(''); + + group.append(button); + + currentfocus = toolbar.getAttribute('aria-activedescendant'); + if (!currentfocus) { + button.setAttribute('tabindex', '0'); + toolbar.setAttribute('aria-activedescendant', button.generateID()); + } + + // We only need to attach this once. + if (!M.editor_atto.buttonhandlers[plugin]) { + Y.one('body').delegate('click', M.editor_atto.buttonclicked_handler, '.atto_' + plugin + '_button'); + M.editor_atto.buttonhandlers[plugin] = handler; + } + + // Save the name of the plugin. + M.editor_atto.widgets[plugin] = plugin; + + }, + + /** + * Work out if the cursor is in the editable area for this editor instance. + * @param string elementid of this editor + * @return bool + */ + is_active : function(elementid) { + var selection = M.editor_atto.get_selection(); + + if (selection.length) { + selection = selection.pop(); + } + + var node = null; + if (selection.parentElement) { + node = Y.one(selection.parentElement()); + } else { + node = Y.one(selection.startContainer); + } + + return node && node.ancestor('#' + elementid + 'editable') !== null; + }, + + /** + * Focus on the editable area for this editor. + * @param string elementid of this editor + */ + focus : function(elementid) { + Y.one('#' + elementid + 'editable').focus(); + }, + + /** + * Initialise the editor + * @param object params for this editor instance. + */ + init : function(params) { + var textarea = Y.one('#' +params.elementid); + var wrapper = Y.Node.create('
'); + var atto = Y.Node.create('
'); + + var cssfont = ''; + var toolbar = Y.Node.create('