Skip to content

Commit

Permalink
fix merge with 1.3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
eyal0 committed Apr 15, 2018
1 parent 6c1de23 commit 9957ab5
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions src/octoprint/static/js/app/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ $(function() {
log.debug("Selected OctoPrint tab changed: previous = " + previous + ", current = " + current);
OctoPrint.coreui.selectedTab = current;
callViewModels(allViewModels, "onTabChange", [current, previous]);
window.history.replaceState(window.history.state, "", current);
};

var onAfterTabChange = function(current, previous) {
Expand All @@ -528,6 +527,7 @@ $(function() {
$('html,body').scrollTop(scrollmem);
});

onTabChange(OCTOPRINT_INITIAL_TAB);
onAfterTabChange(OCTOPRINT_INITIAL_TAB, undefined);

var changeTab = function() {
Expand All @@ -539,6 +539,7 @@ $(function() {
tab.tab("show");
}
};

// Fix input element click problems on dropdowns
$(".dropdown input, .dropdown label").click(function(e) {
e.stopPropagation();
Expand All @@ -552,15 +553,6 @@ $(function() {
// reload overlay
$("#reloadui_overlay_reload").click(function() { location.reload(); });

var changeTab = function()
{
var hashtag = window.location.hash;

var tab = $('#tabs a[href="' + hashtag + '"]');
tab.tab("show");
onTabChange(hashtag);
}

//~~ final initialization - passive login, settings fetch, view model binding

if (!_.has(viewModelMap, "settingsViewModel")) {
Expand Down Expand Up @@ -680,15 +672,6 @@ $(function() {
changeTab();
});

if (window.location.hash != "")
{
changeTab();
}

$(window).on("hashchange", function() {
changeTab();
});

if (window.location.hash !== "") {
changeTab();
}
Expand Down

0 comments on commit 9957ab5

Please sign in to comment.