Dropdown arrow button inherits the same style as main button.

* fix bug 959674

Change-Id: Ib19046538876720cf426d099d72f3c26ab81a57f
This commit is contained in:
Andy Chong 2012-03-21 13:07:22 +08:00 committed by Gabriel Hurley
parent afd16018e6
commit 459a3a2099
3 changed files with 10 additions and 2 deletions

View File

@ -24,7 +24,7 @@ var Horizon = function() {
horizon.templates.compile_templates();
// Bind event handlers to confirm dangerous actions.
$("body").on("click", "form .btn-danger", function (evt) {
$("body").on("click", "form button.btn-danger", function (evt) {
horizon.datatables.confirm(this);
evt.preventDefault();
});

View File

@ -6,7 +6,7 @@
{% for action in row_actions %}
{% if forloop.first %}
{% include "horizon/common/_data_table_row_action.html" %}
<a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
<a class="btn dropdown-toggle {{ action.class_string|safe }}" data-toggle="dropdown" href="#">
<span class="caret"></span>
</a>
<ul class="dropdown-menu row_actions clearfix">

View File

@ -46,3 +46,11 @@ class HTMLElement(object):
``attrs`` dict provided to the class.
"""
return flatatt(self.get_final_attrs())
@property
def class_string(self):
"""
Returns a list of class name of HTML Element in string
"""
classes_str = " ".join(self.classes)
return classes_str