mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
(legacy/ui) resize menu search on focus / unfocus, reload page if navigated to the same url
This commit is contained in:
parent
0201f60b52
commit
95fb0aa3c7
@ -225,11 +225,27 @@ $pagetitle .= sprintf(' | %s.%s', $config['system']['hostname'], $config['system
|
||||
return true;
|
||||
},
|
||||
afterSelect: function(item){
|
||||
window.location.href = item.id;
|
||||
// (re)load page
|
||||
if (window.location.href.split("#")[0].indexOf(item.id.split("#")[0]) > -1 ) {
|
||||
// same url, different hash marker
|
||||
window.location.href = item.id;
|
||||
window.location.reload();
|
||||
} else {
|
||||
window.location.href = item.id;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// change search input size on focus() to fit results
|
||||
$("#menu_search_box").focus(function(){
|
||||
$("#menu_search_box").css('width', '450px');
|
||||
$("#menu_messages").hide();
|
||||
});
|
||||
$("#menu_search_box").focusout(function(){
|
||||
$("#menu_search_box").css('width', '250px');
|
||||
$("#menu_messages").show();
|
||||
});
|
||||
});
|
||||
//]]>
|
||||
</script>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user