mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
Relation diagrams:
- Localization - Handle the resize of the window - Aysnchronous load/reload - Filtering of the result based on the class SVN:trunk[3574]
This commit is contained in:
@@ -171,6 +171,7 @@ EOF;
|
||||
var innerWidth = $(this).innerWidth() - 10;
|
||||
$(this).find('.item').width(innerWidth);
|
||||
});
|
||||
$('.panel-resized').trigger('resized');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -217,7 +218,7 @@ EOF;
|
||||
},
|
||||
beforeLoad: function( event, ui ) {
|
||||
if ( ui.tab.data('loaded') && (ui.tab.attr('data-cache') == 'true')) {
|
||||
event.preventDefault();
|
||||
event.defaultPrevented = true;
|
||||
return;
|
||||
}
|
||||
ui.panel.html('<div><img src="../images/indicator.gif"></div>');
|
||||
@@ -297,6 +298,21 @@ EOF
|
||||
$.bbq.pushState( state );
|
||||
});
|
||||
|
||||
// refresh the hash when the tab is changed (from a JS script)
|
||||
$('body').on( 'tabsactivate', '.ui-tabs', function(event, ui) {
|
||||
var state = {};
|
||||
|
||||
// Get the id of this tab widget.
|
||||
var id = $(ui.newTab).closest( 'div[id^=tabbedContent]' ).attr( 'id' );
|
||||
|
||||
// Get the index of this tab.
|
||||
var idx = $(ui.newTab).prevAll().length;
|
||||
|
||||
// Set the state!
|
||||
state[ id ] = idx;
|
||||
$.bbq.pushState( state );
|
||||
});
|
||||
|
||||
// Bind an event to window.onhashchange that, when the history state changes,
|
||||
// iterates over all tab widgets, changing the current tab as necessary.
|
||||
$(window).bind( 'hashchange', function(e)
|
||||
|
||||
Reference in New Issue
Block a user