summaryrefslogtreecommitdiff
path: root/pgcommitfest/commitfest
diff options
context:
space:
mode:
Diffstat (limited to 'pgcommitfest/commitfest')
-rw-r--r--pgcommitfest/commitfest/templates/base.html2
-rw-r--r--pgcommitfest/commitfest/templates/base_form.html17
-rw-r--r--pgcommitfest/commitfest/views.py1
3 files changed, 18 insertions, 2 deletions
diff --git a/pgcommitfest/commitfest/templates/base.html b/pgcommitfest/commitfest/templates/base.html
index 55b6e84..940b2bf 100644
--- a/pgcommitfest/commitfest/templates/base.html
+++ b/pgcommitfest/commitfest/templates/base.html
@@ -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>
-{%if not block_bootstrap_button%}<script src="/static/commitfest/js/bootstrap-button.js"></script>{%endif%}
+<script src="/static/commitfest/js/bootstrap-button.js"></script>
<script src="/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 d4c135a..4b079dc 100644
--- a/pgcommitfest/commitfest/templates/base_form.html
+++ b/pgcommitfest/commitfest/templates/base_form.html
@@ -66,6 +66,23 @@ div.controls ul.selectable-deck li.selectable-deck-item a.selectable-deck-remove
{%if threadbrowse %}
{%block morescript%}
<script>
+/* Set up djselectable to use bootstrap buttons */
+$.ui.djselectable.prototype._comboButtonTemplate = function (input) {
+ var icon = $("<i>").addClass("icon-chevron-down");
+ // Remove current classes on the text input
+ $(input).attr("class", "");
+ // Wrap with input-append
+ $(input).wrap('<div class="input-append" />');
+ // Return button link with the chosen icon
+ return $("<a>").append(icon).addClass("btn btn-mini");
+};
+$.ui.djselectable.prototype._removeButtonTemplate = function (item) {
+ var icon = $("<i>").addClass("icon-remove-sign");
+ // Return button link with the chosen icon
+ return $("<a>").append(icon).addClass("btn btn-mini");
+};
+
+/* Build our button callbacks */
$(document).ready(function() {
$('button.attachThreadButton').each(function (i,o) {
var b = $(o);
diff --git a/pgcommitfest/commitfest/views.py b/pgcommitfest/commitfest/views.py
index ba0f911..6a72b93 100644
--- a/pgcommitfest/commitfest/views.py
+++ b/pgcommitfest/commitfest/views.py
@@ -168,7 +168,6 @@ 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