Fix tabs layout bugs

This commit is contained in:
Duncan Sommerville 2015-10-30 11:43:09 -04:00
parent 9af7f6dcdd
commit bf97c42167
2 changed files with 4 additions and 0 deletions

View file

@ -21,6 +21,8 @@ var AIRTIME = (function (AIRTIME) {
tab.setName($scope.podcast.title); tab.setName($scope.podcast.title);
$scope.csrf = jQuery("#csrf").val(); $scope.csrf = jQuery("#csrf").val();
tab.contents.find("table").attr("id", "podcast_episodes_" + podcast.id); tab.contents.find("table").attr("id", "podcast_episodes_" + podcast.id);
// TODO: this solves a race condition, but we should look for the root cause
AIRTIME.tabs.onResize();
var episodeTable = AIRTIME.podcast.initPodcastEpisodeDatatable(podcast, tab); var episodeTable = AIRTIME.podcast.initPodcastEpisodeDatatable(podcast, tab);
/** /**

View file

@ -185,6 +185,8 @@ var AIRTIME = (function(AIRTIME){
if (self.isActive()) { // Closing the current tab, otherwise we don't need to switch tabs if (self.isActive()) { // Closing the current tab, otherwise we don't need to switch tabs
toTab.switchTo(); toTab.switchTo();
} else {
mod.onResize();
} }
}; };