Skip to content

Commit

Permalink
Modal close-button style
Browse files Browse the repository at this point in the history
Do not add the ‚btn-primary’ class to the close buttons
  • Loading branch information
styxit committed Feb 23, 2014
1 parent ff8d15a commit 4161bf6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion interfaces/default/js/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,14 +130,20 @@ function showModal(title, content, buttons) {
$('#modal_dialog .modal-h3').html(title)
$('#modal_dialog .modal-body').html(content)
var footer = $('#modal_dialog .modal-footer').empty()
$.extend(buttons, {'Close': hideModal})
$.each(buttons, function (name, action) {
footer.append(
$('<button>').html(name).addClass('btn btn-primary').click(function() {
$(action)
})
)
})

footer.append(
$('<button>').html('Close').addClass('btn').click(function() {
$(hideModal)
})
)

$('#modal_dialog').modal({show: true, backdrop: true})
}
function hideModal() {
Expand Down

0 comments on commit 4161bf6

Please sign in to comment.