I believe that Durandal fashion gets love in Durandal 2.1, although I don’t know if it will be responsive.
At the same time, Durandal provides all the hooks you need to implement your own modal functions, including the ability to define various types of modal dialogs. You can read about it here:
http://durandaljs.com/documentation/Showing-Message-Boxes-And-Modals.html
In short, I experimented with this using some code found in google groups, and was able to get bootable modal boot files.
You can try and see if this works for you. Note that you must use bootstrap 3 for this to work (durandal 2.0 starterkit etc. Comes with bootstrap 2)
dialog.js, return dialog;
dialog.addContext('bootstrap', {
addHost: function (theDialog) {
var body = $('body');
$('<div class="modal fade" id="myModal"></div>').appendTo(body);
theDialog.host = $('#myModal').get(0);
},
removeHost: function (theDialog) {
setTimeout(function () {
$('#myModal').modal('hide');
$('body').removeClass('modal-open');
$('.modal-backdrop').remove();
}, 200);
},
compositionComplete: function (child, parent, context) {
var theDialog = dialog.getDialog(context.model);
$('#myModal').modal('show');
},
attached: null
});
:
dialog.show(viweModel, null, 'bootstrap')
, , :
dialog.showBootstrap(viewModel)
:
<div class="messageBox">
<div class="modal-header">
Header Markup
</div>
<div class="modal-body">
Body Markup
</div>
<div class="modal-footer">
Footer Markup
</div>
</div>
, :
https://gist.github.com/webm0nk3y/7603042
google:
https://groups.google.com/forum/#!topic/durandaljs/8g7DDCuvlpU