Fix removing of authors/reviewers
authorMagnus Hagander <magnus@hagander.net>
Wed, 23 Apr 2014 17:02:27 +0000 (19:02 +0200)
committerMagnus Hagander <magnus@hagander.net>
Wed, 23 Apr 2014 17:02:27 +0000 (19:02 +0200)
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.

pgcommitfest/commitfest/templates/base.html
pgcommitfest/commitfest/templates/base_form.html
pgcommitfest/commitfest/views.py

index 940b2bf5ed29a15130077deee0315c9cb8696546..55b6e84e47b987214c66a7b4076ae3111b327e77 100644 (file)
@@ -41,7 +41,7 @@
 <script src="/static/commitfest/js/bootstrap-collapse.js"></script>
 <script src="/static/commitfest/js/jquery-ui.js"></script>
 <script type="text/javascript" src="/static/selectable/js/jquery.dj.selectable.js"></script>
-<script src="/static/commitfest/js/bootstrap-button.js"></script>
+{%if not block_bootstrap_button%}<script src="/static/commitfest/js/bootstrap-button.js"></script>{%endif%}
 <script src="/static/commitfest/js/commitfest.js"></script>
 {%block morescript%}{%endblock%}
 </html>
index 40e423d52fd239245f709e94b96dc818f6d52bc6..d4c135a92734a4d06e7cff85c1329cb4edbd0662 100644 (file)
@@ -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%}
index 6a72b93adc2d359d6e62395df0468950ff47a976..ba0f9113e423033c40c6e3c7459e7dd7de524bca 100644 (file)
@@ -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