summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/merge_request_tabs.js
diff options
context:
space:
mode:
authorAlfredo Sumaran <alfredo@gitlab.com>2016-08-17 22:51:49 -0500
committerAlfredo Sumaran <alfredo@gitlab.com>2016-08-17 22:51:49 -0500
commit43252ccbee64333634f13dd59509a1d19eef5c6e (patch)
treef435b7aad1bdeb1a02d0f4ac7b7c10dad94e4686 /app/assets/javascripts/merge_request_tabs.js
parent59fa031e6f7d5a1b658c370f581c4caaf4493150 (diff)
downloadgitlab-ce-43252ccbee64333634f13dd59509a1d19eef5c6e.tar.gz
Fix tabs navigation and do not update URL via pushstate
Diffstat (limited to 'app/assets/javascripts/merge_request_tabs.js')
-rw-r--r--app/assets/javascripts/merge_request_tabs.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/assets/javascripts/merge_request_tabs.js b/app/assets/javascripts/merge_request_tabs.js
index 1bba69a255a..4e2273f5aa8 100644
--- a/app/assets/javascripts/merge_request_tabs.js
+++ b/app/assets/javascripts/merge_request_tabs.js
@@ -15,6 +15,7 @@
function MergeRequestTabs(opts) {
this.opts = opts != null ? opts : {};
+ this.opts.setUrl = this.opts.setUrl !== undefined ? this.opts.setUrl : true;
this.setCurrentAction = bind(this.setCurrentAction, this);
this.tabShown = bind(this.tabShown, this);
this.showTab = bind(this.showTab, this);
@@ -58,7 +59,9 @@
} else {
this.expandView();
}
- return this.setCurrentAction(action);
+ if (this.opts.setUrl) {
+ this.setCurrentAction(action);
+ }
};
MergeRequestTabs.prototype.scrollToElement = function(container) {