diff --git a/js/layouts/tab-container/tab-container.js b/js/layouts/tab-container/tab-container.js
index 253a8e985..34719bfa3 100644
--- a/js/layouts/tab-container/tab-container.js
+++ b/js/layouts/tab-container/tab-container.js
@@ -100,6 +100,17 @@ $(function()
this.element.regulartabs(oParams);
}
},
+ /**
+ * Return tabs widget instance
+ * @public
+ */
+ GetTabWidget: function () {
+ if (this.element.hasClass(this.css_classes.is_scrollable)) {
+ return this.element.scrollabletabs('instance');
+ } else {
+ return this.element.regulartabs('instance');
+ }
+ },
// events bound via _bind are removed automatically
// revert other modifications here
_destroy: function()
diff --git a/js/simple_graph.js b/js/simple_graph.js
index ba12124e1..3035d91a5 100644
--- a/js/simple_graph.js
+++ b/js/simple_graph.js
@@ -466,7 +466,7 @@ $(function()
{
this._close_all_tooltips();
// Activate the 3rd tab
- this.element.closest('.ui-tabs').tabs("option", "active", 2);
+ this.element.closest('[data-role="ibo-tab-container"]').tab_container("GetTabWidget").option("active", 2);
// Scroll into view the group
if ($('#'+sGroupId).length > 0)
{
@@ -698,7 +698,6 @@ $(function()
},
_on_resize: function()
{
- this.element.closest('.ui-tabs').tabs({ heightStyle: "content" });
this.auto_scale();
this._close_all_tooltips();
this.draw();
@@ -754,25 +753,29 @@ $(function()
},
refresh_groups: function(aGroups)
{
- if ($('#impacted_groups').length > 0)
- {
-
- // The "Groups" tab is present, refresh it
- if (aGroups.length == 0)
+ if(this.element.parents('.ibo-tab-container').attr('data-status') === 'loaded'){
+ if ($('#impacted_groups').length > 0)
{
- this.element.closest('.ui-tabs').tabs("disable", 2);
- $('#impacted_groups').html('');
- }
- else
- {
- this.element.closest('.ui-tabs').tabs("enable", 2);
- $('#impacted_groups').html('
');
- var sUrl = GetAbsoluteUrlAppRoot()+'pages/ajax.render.php';
- $.post(sUrl, { operation: 'relation_groups', groups: aGroups }, function(data) {
- $('#impacted_groups').html(data);
- });
+ // The "Groups" tab is present, refresh it
+ if (aGroups.length == 0)
+ {
+ this.element.closest('[data-role="ibo-tab-container"]').tab_container("GetTabWidget").disable(2);
+ $('#impacted_groups').html('');
+ }
+ else
+ {
+ this.element.closest('[data-role="ibo-tab-container"]').tab_container("GetTabWidget").enable(2);
+ $('#impacted_groups').html('
');
+ var sUrl = GetAbsoluteUrlAppRoot()+'pages/ajax.render.php';
+ $.post(sUrl, { operation: 'relation_groups', groups: aGroups }, function(data) {
+ $('#impacted_groups').html(data);
+ });
+ }
}
}
+ else{
+ setTimeout(this.refresh_groups(aGroups), 800);
+ }
},
refresh_lists: function(aLists)
{