Merge branch 'MDL-61733-master' of https://github.com/MartinGauk/moodle

This commit is contained in:
Andrew Nicols 2018-03-26 15:01:44 +08:00 committed by Eloy Lafuente (stronk7)
commit 56f5e21f6e
4 changed files with 13 additions and 10 deletions

View File

@ -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

View File

@ -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) {

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) {