Skip to content
Snippets Groups Projects
Commit 6a5532a2 authored by Angie Byron's avatar Angie Byron
Browse files

#683128 by aspilicious: Fixed Multiple 'add to shortcut' links appearing when adding fields.

parent 0c79ed84
No related branches found
No related tags found
Loading
......@@ -417,6 +417,8 @@ Drupal.overlay.bindChild = function (iframeWindow, isClosing) {
// Add a title attribute to the iframe for accessibility.
self.$iframe.attr('title', Drupal.t('@title dialog', { '@title': iframeTitle }));
// Remove any existing shortcut button markup in the title section.
self.$dialogTitlebar.find('.add-or-remove-shortcuts').remove();
// If the shortcut add/delete button exists, move it to the dialog title.
var $addToShortcuts = self.$iframeWindow('.add-or-remove-shortcuts');
if ($addToShortcuts.length) {
......@@ -428,6 +430,8 @@ Drupal.overlay.bindChild = function (iframeWindow, isClosing) {
self.$dialogTitlebar.find('.ui-dialog-title').after($addToShortcuts);
}
// Remove any existing tabs in the title section.
self.$dialogTitlebar.find('ul').remove();
// If there are tabs in the page, move them to the titlebar.
var $tabs = self.$iframeWindow('ul.primary');
if ($tabs.length) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment