Merge branch 'MDL-61733-34' of https://github.com/MartinGauk/moodle into MOODLE_34_STABLE

This commit is contained in:
Andrew Nicols
2018-03-26 15:02:04 +08:00
4 changed files with 13 additions and 10 deletions
@@ -317,7 +317,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
* @return {boolean} whether or not the parameter node exists within the editor.
*/
_stopAtContentEditableFilter: function(node) {
this.editor.contains(node);
return this.editor.contains(node);
},
/**
@@ -411,12 +411,13 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
_getSuitableTableCell: function() {
var targetcell = null,
host = this.get('host');
var stopAtContentEditableFilter = Y.bind(this._stopAtContentEditableFilter, this);
host.getSelectedNodes().some(function(node) {
if (node.ancestor('td, th, caption', true, this._stopAtContentEditableFilter)) {
if (node.ancestor('td, th, caption', true, stopAtContentEditableFilter)) {
targetcell = node;
var caption = node.ancestor('caption', true, this._stopAtContentEditableFilter);
var caption = node.ancestor('caption', true, stopAtContentEditableFilter);
if (caption) {
var table = caption.get('parentNode');
if (table) {
File diff suppressed because one or more lines are too long
@@ -317,7 +317,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
* @return {boolean} whether or not the parameter node exists within the editor.
*/
_stopAtContentEditableFilter: function(node) {
this.editor.contains(node);
return this.editor.contains(node);
},
/**
@@ -411,12 +411,13 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
_getSuitableTableCell: function() {
var targetcell = null,
host = this.get('host');
var stopAtContentEditableFilter = Y.bind(this._stopAtContentEditableFilter, this);
host.getSelectedNodes().some(function(node) {
if (node.ancestor('td, th, caption', true, this._stopAtContentEditableFilter)) {
if (node.ancestor('td, th, caption', true, stopAtContentEditableFilter)) {
targetcell = node;
var caption = node.ancestor('caption', true, this._stopAtContentEditableFilter);
var caption = node.ancestor('caption', true, stopAtContentEditableFilter);
if (caption) {
var table = caption.get('parentNode');
if (table) {
+4 -3
View File
@@ -315,7 +315,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
* @return {boolean} whether or not the parameter node exists within the editor.
*/
_stopAtContentEditableFilter: function(node) {
this.editor.contains(node);
return this.editor.contains(node);
},
/**
@@ -409,12 +409,13 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
_getSuitableTableCell: function() {
var targetcell = null,
host = this.get('host');
var stopAtContentEditableFilter = Y.bind(this._stopAtContentEditableFilter, this);
host.getSelectedNodes().some(function(node) {
if (node.ancestor('td, th, caption', true, this._stopAtContentEditableFilter)) {
if (node.ancestor('td, th, caption', true, stopAtContentEditableFilter)) {
targetcell = node;
var caption = node.ancestor('caption', true, this._stopAtContentEditableFilter);
var caption = node.ancestor('caption', true, stopAtContentEditableFilter);
if (caption) {
var table = caption.get('parentNode');
if (table) {