Merge branch 'devel' of github.com:foosel/OctoPrint into devel
This commit is contained in:
commit
8b7643332b
2 changed files with 24 additions and 3 deletions
|
|
@ -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");
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue