Skip to content

Commit

Permalink
MDL-46046 atto_accessibilityhelper: Remove dead code from the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed Jun 18, 2014
1 parent c41ace2 commit a0da864
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 94 deletions.
Expand Up @@ -67,15 +67,6 @@ var COMPONENT = 'atto_accessibilityhelper',

Y.namespace('M.atto_accessibilityhelper').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {

/**
* The warnings which are displayed.
*
* @property _displayedWarnings
* @type Object
* @private
*/
_displayedWarnings: {},

initializer: function() {
this.addButton({
icon: 'e/screenreader_helper',
Expand Down Expand Up @@ -127,28 +118,6 @@ Y.namespace('M.atto_accessibilityhelper').Button = Y.Base.create('button', Y.M.e
.empty()
.appendChild(this._listImages());

// Add ability to select problem areas in the editor.
content.delegate('click', function(e) {
e.preventDefault();

var host = this.get('host'),
index = e.target.getAttribute("data-index"),
node = this._displayedWarnings[index],
dialogue = this.getDialogue();


if (node) {
// Clear the dialogue's focusAfterHide to ensure we focus
// on the selection.
dialogue.set('focusAfterHide', null);
host.setSelection(host.getSelectionFromNode(node));
}

// Hide the dialogue.
dialogue.hide();

}, 'a', this);

return content;
},

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Expand Up @@ -67,15 +67,6 @@ var COMPONENT = 'atto_accessibilityhelper',

Y.namespace('M.atto_accessibilityhelper').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {

/**
* The warnings which are displayed.
*
* @property _displayedWarnings
* @type Object
* @private
*/
_displayedWarnings: {},

initializer: function() {
this.addButton({
icon: 'e/screenreader_helper',
Expand Down Expand Up @@ -127,28 +118,6 @@ Y.namespace('M.atto_accessibilityhelper').Button = Y.Base.create('button', Y.M.e
.empty()
.appendChild(this._listImages());

// Add ability to select problem areas in the editor.
content.delegate('click', function(e) {
e.preventDefault();

var host = this.get('host'),
index = e.target.getAttribute("data-index"),
node = this._displayedWarnings[index],
dialogue = this.getDialogue();


if (node) {
// Clear the dialogue's focusAfterHide to ensure we focus
// on the selection.
dialogue.set('focusAfterHide', null);
host.setSelection(host.getSelectionFromNode(node));
}

// Hide the dialogue.
dialogue.hide();

}, 'a', this);

return content;
},

Expand Down
Expand Up @@ -65,15 +65,6 @@ var COMPONENT = 'atto_accessibilityhelper',

Y.namespace('M.atto_accessibilityhelper').Button = Y.Base.create('button', Y.M.editor_atto.EditorPlugin, [], {

/**
* The warnings which are displayed.
*
* @property _displayedWarnings
* @type Object
* @private
*/
_displayedWarnings: {},

initializer: function() {
this.addButton({
icon: 'e/screenreader_helper',
Expand Down Expand Up @@ -125,28 +116,6 @@ Y.namespace('M.atto_accessibilityhelper').Button = Y.Base.create('button', Y.M.e
.empty()
.appendChild(this._listImages());

// Add ability to select problem areas in the editor.
content.delegate('click', function(e) {
e.preventDefault();

var host = this.get('host'),
index = e.target.getAttribute("data-index"),
node = this._displayedWarnings[index],
dialogue = this.getDialogue();


if (node) {
// Clear the dialogue's focusAfterHide to ensure we focus
// on the selection.
dialogue.set('focusAfterHide', null);
host.setSelection(host.getSelectionFromNode(node));
}

// Hide the dialogue.
dialogue.hide();

}, 'a', this);

return content;
},

Expand Down

0 comments on commit a0da864

Please sign in to comment.