From: Tomas Sedovic tsedovic@redhat.com
Redmine #1269
In the Image Factory -> Deployables -> Assemblies tab, the "Add Assembly" button didn't work on occasions because the JS code referenced the currently selected tab incorrectly. --- .../image_factory/deployables/_assemblies.haml | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/views/image_factory/deployables/_assemblies.haml b/src/app/views/image_factory/deployables/_assemblies.haml index 47f9f66..9af208b 100644 --- a/src/app/views/image_factory/deployables/_assemblies.haml +++ b/src/app/views/image_factory/deployables/_assemblies.haml @@ -22,7 +22,9 @@ e.preventDefault(); var url = $(this).attr('href'); $.get(url, function(data) { - $('#ui-tabs-2').html(data); + var selectedTabIndex = $("#details-view").tabs('option', 'selected'); + var $selectedTab = $("#details-view div.ui-tabs-panel").eq(selectedTabIndex); + $selectedTab.html(data); }); }); - }); \ No newline at end of file + });
On Wed, Apr 27, 2011 at 02:29:05PM +0200, tsedovic@redhat.com wrote:
From: Tomas Sedovic tsedovic@redhat.com
Redmine #1269
In the Image Factory -> Deployables -> Assemblies tab, the "Add Assembly" button didn't work on occasions because the JS code referenced the currently selected tab incorrectly.
.../image_factory/deployables/_assemblies.haml | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/app/views/image_factory/deployables/_assemblies.haml b/src/app/views/image_factory/deployables/_assemblies.haml index 47f9f66..9af208b 100644 --- a/src/app/views/image_factory/deployables/_assemblies.haml +++ b/src/app/views/image_factory/deployables/_assemblies.haml @@ -22,7 +22,9 @@ e.preventDefault(); var url = $(this).attr('href'); $.get(url, function(data) {
$('#ui-tabs-2').html(data);
var selectedTabIndex = $("#details-view").tabs('option', 'selected');
var $selectedTab = $("#details-view div.ui-tabs-panel").eq(selectedTabIndex);
});$selectedTab.html(data); });
- });
\ No newline at end of file
- });
ACK. Nice catch.
-- Matt
aeolus-devel@lists.fedorahosted.org