Merged in [9781] from lars@netapp.com:

Move a (duplicate) style tag from python into the template CSS.
The liaison manager is horrible in the amount of HTML it includes in python.
 - Legacy-Id: 9799
Note: SVN reference [9781] has been migrated to Git commit d41e3db6fc40dcd5bacb9bf5a17b24f459203bd2
This commit is contained in:
Henrik Levkowetz 2015-07-18 15:14:16 +00:00
parent ecbf732f8b
commit cc4190f1f0
2 changed files with 7 additions and 3 deletions

View file

@ -38,7 +38,7 @@ class FromWidget(Select):
class ReadOnlyWidget(Widget):
def render(self, name, value, attrs=None):
html = u'<div id="id_%s" class="form-control" style="height: auto; min-height: 34px;">%s</div>' % (conditional_escape(name), conditional_escape(value or ''))
html = u'<div id="id_%s" class="form-control widget">%s</div>' % (conditional_escape(name), conditional_escape(value or ''))
return mark_safe(html)
@ -67,8 +67,8 @@ class ShowAttachmentsWidget(Widget):
def render(self, name, value, attrs=None):
html = u'<div id="id_%s">' % name
html += u'<span style="display: none" class="showAttachmentsEmpty form-control" style="height: auto; min-height: 34px;">No files attached</span>'
html += u'<div class="attachedFiles form-control" style="height: auto; min-height: 34px;">'
html += u'<span style="display: none" class="showAttachmentsEmpty form-control widget">No files attached</span>'
html += u'<div class="attachedFiles form-control widget">'
if value and isinstance(value, QuerySet):
for attachment in value:
html += u'<a class="initialAttach" href="%s%s">%s</a><br />' % (settings.LIAISON_ATTACH_URL, conditional_escape(attachment.external_url), conditional_escape(attachment.title))

View file

@ -12,6 +12,10 @@
<link rel="stylesheet" href="/css/lib/select2-bootstrap.css">
{% endblock %}
{% block morecss %}
.widget { height: auto; min-height: 34px; }
{% endblock %}
{% block content %}
{% origin %}