Commit 72073b95 authored by Dries's avatar Dries
Browse files

- Patch #674852 by casey: keep tabs when navigating in the overlay.

parent 05ab3b1e
......@@ -281,15 +281,27 @@ Drupal.overlay.load = function (url) {
// spinner is centered.
self.lastHeight = 0;
// No need to resize when loading.
// No need to resize while loading.
// Change the overlay title.
self.$container.dialog('option', 'title', Drupal.t('Loading...'));
// Remove any existing shortcut button markup in the title section.
// Remove any existing tabs in the title section.
// Remove any existing tabs in the title section, but only if requested url
// is not one of those tabs. If the latter, set that tab active.
var urlPath = self.getPath(url);
var $tabs = self.$dialogTitlebar.find('ul');
var $tabsLinks = $tabs.find('> li > a');
var $activeLink = $tabsLinks.filter(function () { return self.getPath(this) == urlPath; });
if ($activeLink.length) {
var active_tab = Drupal.t('(active tab)');
$tabsLinks.parent().removeClass('active').find('element-invisible:contains(' + active_tab + ')').appendTo($activeLink);
else {
// While the overlay is loading, we remove the loaded class from the dialog.
// After the loading is finished, the loaded class is added back. The loaded
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment