Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
Code review changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcel Gerber committed Jan 23, 2015
1 parent cf00837 commit e6ccd1b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/extensibility/ExtensionManagerDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,10 @@ define(function (require, exports, module) {
models[_activeTabIndex].scrollPos = $(".modal-body", $dlg).scrollTop();
}
$tab.tab("show");
$(".modal-body", $dlg).scrollTop((models[_activeTabIndex] && models[_activeTabIndex].scrollPos) || 0);
clearSearch();
if (models[_activeTabIndex]) {
$(".modal-body", $dlg).scrollTop(models[_activeTabIndex].scrollPos || 0);
clearSearch();
}
}

// Dialog tabs
Expand Down Expand Up @@ -426,6 +428,7 @@ define(function (require, exports, module) {

var $activeTab = $dlg.find(".nav-tabs li.active a");
if ($activeTab.length) { // If there's already a tab selected, show it
$activeTab.parent().removeClass("active"); // workaround for bootstrap-tab
$activeTab.tab("show");
} else if ($("#toolbar-extension-manager").hasClass('updatesAvailable')) {
// Open dialog to Installed tab if extension updates are available
Expand Down
6 changes: 3 additions & 3 deletions src/widgets/bootstrap-tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,8 @@
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7
}

$target = $(selector)

if ( $target.hasClass('active') ) return
if ( $this.parent('li').hasClass('active') ) return

previous = $ul.find('.active:last a')[0]

Expand All @@ -61,6 +59,8 @@

if (e.isDefaultPrevented()) return

$target = $(selector)

this.activate($this.parent('li'), $ul)
this.activate($target, $target.parent(), function () {
$this.trigger({
Expand Down

0 comments on commit e6ccd1b

Please sign in to comment.