Merge branch 'devel' of github.com:foosel/OctoPrint into devel

This commit is contained in:
Gina Häußge 2017-01-09 16:38:44 +01:00
commit 8b7643332b
2 changed files with 24 additions and 3 deletions

View file

@ -478,6 +478,17 @@ $(function() {
// reload overlay
$("#reloadui_overlay_reload").click(function() { location.reload(); });
var changeTab = function()
{
var hashtag = window.location.hash;
var tab = $('#tabs a[href="' + hashtag + '"]');
if (tab.length)
{
tab.tab("show");
onTabChange(hashtag);
}
}
//~~ view model binding
var bindViewModels = function() {
@ -566,6 +577,15 @@ $(function() {
callViewModels(allViewModels, "onBrowserTabVisibilityChange", [status]);
});
$(window).on("hashchange", function() {
changeTab();
});
if (window.location.hash != "")
{
changeTab();
}
log.info("Application startup complete");
};

View file

@ -708,11 +708,12 @@ $(function() {
return false;
}
if (entry["type"] == "folder" && entry["children"]) {
var success = entry["name"].toLocaleLowerCase().indexOf(query) > -1;
if (!success && entry["type"] == "folder" && entry["children"]) {
return _.any(entry["children"], recursiveSearch);
} else {
return entry["name"].toLocaleLowerCase().indexOf(query) > -1;
}
return success;
};
self.listHelper.changeSearchFunction(recursiveSearch);