mirror of
https://github.com/Combodo/iTop.git
synced 2026-03-04 16:44:11 +01:00
N°3560 Fix object's tabs not opening tab specified in url's hash
This commit is contained in:
@@ -17,8 +17,8 @@ $.widget( "itop.scrollabletabs", $.ui.tabs, {
|
||||
me._newScene(b.tab, b.panel).addTo(me.controller);
|
||||
};
|
||||
this.element.on('scrollabletabsload', afterloadajax);
|
||||
|
||||
this._super();
|
||||
|
||||
this._super(this.options);
|
||||
|
||||
// Load remote tabs as soon as possible
|
||||
$(this.js_selectors.tab_toggler).each(function() {
|
||||
@@ -37,7 +37,10 @@ $.widget( "itop.scrollabletabs", $.ui.tabs, {
|
||||
me._newScene($(that).parent('li'), $($(that).attr('href'))).addTo(me.controller);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
// Set active tab, tab-container gives us a tab based on url hash or 0
|
||||
this.setTab(this._findActive(this.options.active));
|
||||
this.controller.scrollTo('#' + this.tabs.eq(this.options.active).attr('data-tab-id'));
|
||||
},
|
||||
// Create a new scene to be added to the controller
|
||||
_newScene: function(tab, panel)
|
||||
|
||||
@@ -63,7 +63,8 @@ $(function()
|
||||
let oTabsParams = {
|
||||
classes: {
|
||||
'ui-tabs-panel': 'ibo-tab-container--tab-container', // For ajax tabs, so their containers have the right CSS classes
|
||||
}
|
||||
},
|
||||
active: $.bbq.getState( this.element.attr('id'), true ) || 0
|
||||
};
|
||||
if ($.bbq) {
|
||||
// Enable tabs on all tab widgets. The `event` property must be overridden so
|
||||
|
||||
Reference in New Issue
Block a user