Remove icon from disabled submit sidebox

This commit is contained in:
Chad Birch
2013-02-12 16:48:56 -08:00
parent 6d7d07cd11
commit 48aee3dc06
4 changed files with 17 additions and 14 deletions

View File

@@ -324,14 +324,16 @@ class Reddit(Templated):
ps.append(SideBox(title=_('Submissions disabled'),
css_class="submit",
disabled=True,
subtitles=[subtitle]))
subtitles=[subtitle],
show_icon=False))
else:
subtitle = _('submission in this subreddit '
'is restricted to approved submitters.')
ps.append(SideBox(title=_('Submissions restricted'),
css_class="submit",
disabled=True,
subtitles=[subtitle]))
subtitles=[subtitle],
show_icon=False))
else:
fake_sub = isinstance(c.site, FakeSubreddit)
if c.site.link_type != 'self':
@@ -693,12 +695,13 @@ class SideBox(CachedTemplate):
Generic sidebox used to generate the 'submit' and 'create a reddit' boxes.
"""
def __init__(self, title, link=None, css_class='', subtitles = [],
show_cover = False, nocname=False, sr_path = False, disabled=False):
show_cover = False, nocname=False, sr_path = False,
disabled=False, show_icon=True):
CachedTemplate.__init__(self, link = link, target = '_top',
title = title, css_class = css_class,
sr_path = sr_path, subtitles = subtitles,
show_cover = show_cover, nocname=nocname,
disabled=disabled)
disabled=disabled, show_icon=show_icon)
class PrefsPage(Reddit):

View File

@@ -461,10 +461,6 @@ ul.flat-vert {text-align: left;}
background-image: url(../gradient-nub-gray.png); /* SPRITE */
}
.sidebox.submit.disabled .spacer a {
opacity: .5;
}
/* raised box */
.raisedbox {
@@ -484,6 +480,11 @@ ul.flat-vert {text-align: left;}
background: white none no-repeat scroll top left;
}
.sidebox .spacer.no-icon {
padding: 0;
min-height: 0;
}
.sidebox .spacer a {
position: absolute;
top: 0; left: 0px;
@@ -528,11 +529,6 @@ ul.flat-vert {text-align: left;}
display: none;
}
.sidebox.submit .spacer a {
background-image: url(../submit-alien.png); /* SPRITE */
background-repeat:no-repeat;
}
.sidebox .subtitle {
margin-left: 10px;
color: dimgray;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

View File

@@ -30,9 +30,13 @@
</div>
%if thing.subtitles:
<div class="spacer">
%if thing.show_icon:
<div class="spacer">
${plain_link('', thing.link, _sr_path=thing.sr_path,
_class='login-required' if thing.show_cover else None, nocname=thing.nocname)}
%else:
<div class="spacer no-icon">
%endif
%for subtitle in thing.subtitles:
<div class="subtitle">${subtitle}</div>
%endfor