mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-23 22:08:11 -05:00
Use a css class to hide the selected dropdown choice.
This makes JS dropdown implementations simpler since they have all of the choices in the DOM.
This commit is contained in:
@@ -300,6 +300,10 @@ ul.flat-vert {text-align: left;}
|
||||
background-color: #c7def7;
|
||||
}
|
||||
|
||||
.drop-choices a.choice.selected {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropdown.heavydrop .selected{
|
||||
background: white none no-repeat scroll center right;
|
||||
background-image: url(../droparrow.gif);
|
||||
|
||||
@@ -46,15 +46,12 @@
|
||||
|
||||
<div class="drop-choices ${css_class}">
|
||||
%for option in thing:
|
||||
%if option != thing.selected:
|
||||
%if thing.use_post:
|
||||
${post_link(option.title, option.base_path, option.path,
|
||||
option.action_params, _sr_path=option.sr_path,
|
||||
_class="choice " + option.css_class)}
|
||||
%else:
|
||||
${plain_link(option.title, option.path, _sr_path = option.sr_path,
|
||||
_class = "choice" + " " + option.css_class)}
|
||||
%endif
|
||||
<% _class = "choice " + option.css_class + (" selected" if option == thing.selected else "") %>
|
||||
%if thing.use_post:
|
||||
${post_link(option.title, option.base_path, option.path,
|
||||
option.action_params, _sr_path=option.sr_path, _class=_class)}
|
||||
%else:
|
||||
${plain_link(option.title, option.path, _sr_path = option.sr_path, _class=_class)}
|
||||
%endif
|
||||
%endfor
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user