summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMagnus Hagander2014-04-23 17:02:27 +0000
committerMagnus Hagander2014-04-23 17:02:27 +0000
commit02a7a0e05a16d619f4624f04ba08e19b78ff0d9b (patch)
treef9e558bc842c286a6fa41bd2b4f306f415787cb1
parent330e4e876049b79ed6599275e35f1849a521b388 (diff)
Fix removing of authors/reviewers
There's a conflict between jquery-ui and bootstrap for buttons that breaks django-selectable. The documented workaround doesn't work, but for now we don't have any pages that require both at the same time, so just suppress the bootstrap javascript when jquery-ui buttons are required.
-rw-r--r--pgcommitfest/commitfest/templates/base.html2
-rw-r--r--pgcommitfest/commitfest/templates/base_form.html4
-rw-r--r--pgcommitfest/commitfest/views.py1
3 files changed, 6 insertions, 1 deletions
diff --git a/pgcommitfest/commitfest/templates/base.html b/pgcommitfest/commitfest/templates/base.html
index 940b2bf..55b6e84 100644
--- a/pgcommitfest/commitfest/templates/base.html
+++ b/pgcommitfest/commitfest/templates/base.html
@@ -41,7 +41,7 @@
<script src="/https/git.postgresql.org/static/commitfest/js/bootstrap-collapse.js"></script>
<script src="/https/git.postgresql.org/static/commitfest/js/jquery-ui.js"></script>
<script type="text/javascript" src="/https/git.postgresql.org/static/selectable/js/jquery.dj.selectable.js"></script>
-<script src="/https/git.postgresql.org/static/commitfest/js/bootstrap-button.js"></script>
+{%if not block_bootstrap_button%}<script src="/https/git.postgresql.org/static/commitfest/js/bootstrap-button.js"></script>{%endif%}
<script src="/https/git.postgresql.org/static/commitfest/js/commitfest.js"></script>
{%block morescript%}{%endblock%}
</html>
diff --git a/pgcommitfest/commitfest/templates/base_form.html b/pgcommitfest/commitfest/templates/base_form.html
index 40e423d..d4c135a 100644
--- a/pgcommitfest/commitfest/templates/base_form.html
+++ b/pgcommitfest/commitfest/templates/base_form.html
@@ -25,6 +25,10 @@ div.controls input[type='checkbox'] {
div.controls ul {
margin: 0px;
}
+div.controls ul.selectable-deck li.selectable-deck-item a.selectable-deck-remove {
+ float: none;
+ margin-left: 20px;
+}
</style>
<form class="form-horizontal {{extraformclass}}" method="POST" action=".">{%csrf_token%}
{%if form.errors%}
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py
index 6a72b93..ba0f911 100644
--- a/pgcommitfest/commitfest/views.py
+++ b/pgcommitfest/commitfest/views.py
@@ -168,6 +168,7 @@ def patchform(request, cfid, patchid):
'title': 'Edit patch',
'breadcrumbs': [{'title': cf.name, 'href': '/%s/' % cf.pk},
{'title': 'View patch', 'href': '/%s/%s/' % (cf.pk, patch.pk)}],
+ 'block_bootstrap_button': True,
}, context_instance=RequestContext(request))
@login_required