Skip to content

Commit 4161bf6

Browse files
committed
Modal close-button style
Do not add the ‚btn-primary’ class to the close buttons
1 parent ff8d15a commit 4161bf6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

interfaces/default/js/default.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,20 @@ function showModal(title, content, buttons) {
130130
$('#modal_dialog .modal-h3').html(title)
131131
$('#modal_dialog .modal-body').html(content)
132132
var footer = $('#modal_dialog .modal-footer').empty()
133-
$.extend(buttons, {'Close': hideModal})
134133
$.each(buttons, function (name, action) {
135134
footer.append(
136135
$('<button>').html(name).addClass('btn btn-primary').click(function() {
137136
$(action)
138137
})
139138
)
140139
})
140+
141+
footer.append(
142+
$('<button>').html('Close').addClass('btn').click(function() {
143+
$(hideModal)
144+
})
145+
)
146+
141147
$('#modal_dialog').modal({show: true, backdrop: true})
142148
}
143149
function hideModal() {

0 commit comments

Comments
 (0)