Changed the topic list filter label text when switching between sort orders.
You can now close the topic list filter drop-down.
This commit is contained in:
parent
2e5256dd73
commit
e9a9441e93
@ -361,7 +361,11 @@ function mainInit(){
|
||||
$(".link_label").click(function(event) {
|
||||
event.preventDefault();
|
||||
let forSelect = $(this).attr("data-for");
|
||||
$('#'+forSelect).addClass("link_opened");
|
||||
let linkSelect = $('#'+forSelect);
|
||||
if(!linkSelect.hasClass("link_opened")) {
|
||||
event.stopPropagation();
|
||||
linkSelect.addClass("link_opened");
|
||||
}
|
||||
});
|
||||
|
||||
$(".open_edit").click((event) => {
|
||||
@ -530,7 +534,9 @@ function mainInit(){
|
||||
$(this).click(() => {
|
||||
$(".selectedAlert").removeClass("selectedAlert");
|
||||
$("#back").removeClass("alertActive");
|
||||
$(".link_select").removeClass("link_opened");
|
||||
});
|
||||
|
||||
$(".alert_bell").click(function(){
|
||||
var menuAlerts = $(this).parent();
|
||||
if(menuAlerts.hasClass("selectedAlert")) {
|
||||
@ -539,7 +545,6 @@ function mainInit(){
|
||||
$("#back").removeClass("alertActive");
|
||||
}
|
||||
});
|
||||
|
||||
$(".menu_alerts").click(function(event) {
|
||||
event.stopPropagation();
|
||||
if($(this).hasClass("selectedAlert")) return;
|
||||
@ -547,6 +552,7 @@ function mainInit(){
|
||||
this.className += " selectedAlert";
|
||||
document.getElementById("back").className += " alertActive"
|
||||
});
|
||||
$(".link_select").click(event => event.stopPropagation());
|
||||
|
||||
$("input,textarea,select,option").keyup(event => event.stopPropagation())
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
<div class="optbox">
|
||||
{{if .ForumList}}
|
||||
<div class="opt filter_opt">
|
||||
<a href="#" class="filter_opt_label link_label" data-for="topic_list_filter_select"> / {{lang "topic_list.most_recent_filter"}} <span class="filter_opt_pointy">▾</span></a>
|
||||
<a href="#" class="filter_opt_label link_label" data-for="topic_list_filter_select"> / {{if eq .Sort.SortBy "mostviewed" }}{{lang "topic_list.most_viewed_filter"}}{{else}}{{lang "topic_list.most_recent_filter"}}{{end}} <span class="filter_opt_pointy">▾</span></a>
|
||||
<div id="topic_list_filter_select" class="link_select">
|
||||
<div class="link_option link_selected">
|
||||
<a href="/topics/">{{lang "topic_list.most_recent_filter"}}</a>
|
||||
|
Loading…
Reference in New Issue
Block a user