MDL-50801 atto_table: Caption node might not be present
authorDavid Monllao <davidm@moodle.com>
Thu, 20 Aug 2015 07:25:44 +0000 (15:25 +0800)
committerDavid Monllao <davidm@moodle.com>
Thu, 20 Aug 2015 07:25:44 +0000 (15:25 +0800)
Users may not use atto table (which always adds a caption) to set
HTML tables, this patch addresses that case.

lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js
lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-min.js
lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button.js
lib/editor/atto/plugins/table/yui/src/button/js/button.js

index 0d557ba..48f3a7a 100644 (file)
Binary files a/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js and b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-debug.js differ
index 5f22b5b..c7b367e 100644 (file)
Binary files a/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-min.js and b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button-min.js differ
index 0d557ba..48f3a7a 100644 (file)
Binary files a/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button.js and b/lib/editor/atto/plugins/table/yui/build/moodle-atto_table-button/moodle-atto_table-button.js differ
index 423b9cc..1c4f4df 100644 (file)
@@ -927,7 +927,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
             captioninput.set('value', '');
         }
 
-        if (captionpositioninput && captionnode.getAttribute('style')) {
+        if (captionpositioninput && captionnode && captionnode.getAttribute('style')) {
             captionpositioninput.set('value', captionnode.getStyle('caption-side'));
         } else {
             // Default to none.