Skip to content

Commit

Permalink
Merge pull request #2 from hkdobrev/modal-button-style
Browse files Browse the repository at this point in the history
Modal confirmation dialogs will keep the button style
  • Loading branch information
hkdobrev committed Aug 2, 2013
2 parents 009b776 + fbcecfe commit b6aeede
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/js/general.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ $(function(){
$('body').on('click', 'a[data-confirm]', function(e){
e.preventDefault();
$('#confirm').remove();
$('body').append('<div id="confirm" class="modal hide fade"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">&times;</button><h3>Confirm</h3></div><div class="modal-body"><p>'+$(this).data('confirm')+'</p></div><div class="modal-footer"><button class="btn" data-dismiss="modal">Close</button><a class="btn btn-warning" href="' + $(this).attr('href') +'">' + $(this).html() + '</a></div></div>');
$('body').append('<div id="confirm" class="modal hide fade"><div class="modal-header"><button type="button" class="close" data-dismiss="modal">&times;</button><h3>Confirm</h3></div><div class="modal-body"><p>'+$(this).data('confirm')+'</p></div><div class="modal-footer"><button class="btn" data-dismiss="modal">Close</button><a class="btn btn-warning ' + $(this).attr('class') + '" href="' + $(this).attr('href') +'">' + $(this).html() + '</a></div></div>');
$('#confirm').modal('show');
});

Expand Down

0 comments on commit b6aeede

Please sign in to comment.