MDL-71671 atto_table: Insert menus html after the button
This commit is contained in:
Vendored
+4
-2
@@ -864,6 +864,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
e.preventDefault();
|
||||
|
||||
var boundingBox;
|
||||
var creatorButton = this.buttons[this.name];
|
||||
|
||||
if (!this._contextMenu) {
|
||||
this._menuOptions = [
|
||||
@@ -915,9 +916,11 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}
|
||||
];
|
||||
|
||||
creatorButton.insert(Y.Node.create('<div class="menuplaceholder" id="' + buttonId + '_menu"></div>'), 'after');
|
||||
this._contextMenu = new Y.M.editor_atto.Menu({
|
||||
items: this._menuOptions,
|
||||
buttonId: buttonId
|
||||
buttonId: buttonId,
|
||||
attachmentPoint: '#' + buttonId + '_menu'
|
||||
});
|
||||
|
||||
// Add event handlers for table control menus.
|
||||
@@ -938,7 +941,6 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
});
|
||||
|
||||
// Ensure that we focus on the button in the toolbar when we tab back to the menu.
|
||||
var creatorButton = this.buttons[this.name];
|
||||
this.get('host')._setTabFocus(creatorButton);
|
||||
|
||||
// Show the context menu, and align to the current position.
|
||||
|
||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+4
-2
@@ -864,6 +864,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
e.preventDefault();
|
||||
|
||||
var boundingBox;
|
||||
var creatorButton = this.buttons[this.name];
|
||||
|
||||
if (!this._contextMenu) {
|
||||
this._menuOptions = [
|
||||
@@ -915,9 +916,11 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}
|
||||
];
|
||||
|
||||
creatorButton.insert(Y.Node.create('<div class="menuplaceholder" id="' + buttonId + '_menu"></div>'), 'after');
|
||||
this._contextMenu = new Y.M.editor_atto.Menu({
|
||||
items: this._menuOptions,
|
||||
buttonId: buttonId
|
||||
buttonId: buttonId,
|
||||
attachmentPoint: '#' + buttonId + '_menu'
|
||||
});
|
||||
|
||||
// Add event handlers for table control menus.
|
||||
@@ -938,7 +941,6 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
});
|
||||
|
||||
// Ensure that we focus on the button in the toolbar when we tab back to the menu.
|
||||
var creatorButton = this.buttons[this.name];
|
||||
this.get('host')._setTabFocus(creatorButton);
|
||||
|
||||
// Show the context menu, and align to the current position.
|
||||
|
||||
@@ -862,6 +862,7 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
e.preventDefault();
|
||||
|
||||
var boundingBox;
|
||||
var creatorButton = this.buttons[this.name];
|
||||
|
||||
if (!this._contextMenu) {
|
||||
this._menuOptions = [
|
||||
@@ -913,9 +914,11 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
}
|
||||
];
|
||||
|
||||
creatorButton.insert(Y.Node.create('<div class="menuplaceholder" id="' + buttonId + '_menu"></div>'), 'after');
|
||||
this._contextMenu = new Y.M.editor_atto.Menu({
|
||||
items: this._menuOptions,
|
||||
buttonId: buttonId
|
||||
buttonId: buttonId,
|
||||
attachmentPoint: '#' + buttonId + '_menu'
|
||||
});
|
||||
|
||||
// Add event handlers for table control menus.
|
||||
@@ -936,7 +939,6 @@ Y.namespace('M.atto_table').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
});
|
||||
|
||||
// Ensure that we focus on the button in the toolbar when we tab back to the menu.
|
||||
var creatorButton = this.buttons[this.name];
|
||||
this.get('host')._setTabFocus(creatorButton);
|
||||
|
||||
// Show the context menu, and align to the current position.
|
||||
|
||||
Reference in New Issue
Block a user