fixed tab selection glitch

This commit is contained in:
gorhill 2014-07-02 19:19:40 -04:00
parent b63995e556
commit 3bf825b4e8
1 changed files with 4 additions and 3 deletions

View File

@ -25,12 +25,13 @@
/******************************************************************************/
var loadDashboardPanel = function(tab) {
var loadDashboardPanel = function(tab, q) {
var tabButton = uDom('[data-dashboard-panel-url="' + tab + '"]');
if ( !tabButton ) {
return;
}
uDom('iframe').attr('src', tab);
q = q || '';
uDom('iframe').attr('src', tab + q);
uDom('.tabButton').toggleClass('selected', false);
tabButton.toggleClass('selected', true);
};
@ -56,7 +57,7 @@ uDom.onLoad(function() {
if ( !tab ) {
tab = '3p-filters';
}
loadDashboardPanel(tab + '.html' + q);
loadDashboardPanel(tab + '.html', q);
uDom('.tabButton').on('click', onTabClickHandler);
});