mouse0270 / bootstrap-notify

Turns standard Bootstrap alerts into "Growl-like" notifications.
http://bootstrap-notify.remabledesigns.com/
MIT License
2.25k stars 642 forks source link

feature request: ability to pass class to the data-notify="container" #146

Open neilakapete opened 8 years ago

neilakapete commented 8 years ago

current we have class="col-xs-11 col-sm-3 alert alert-{0}"

I would like a larger alert for desktop view col-md-6 as it seems a bit small

mouse0270 commented 8 years ago

You can always update the template:

$.notifyDefaults({
    template: '<div data-notify="container" class="col-xs-11 col-sm-3 col-md-6 alert alert-{0}" role="alert">' +
        '<button type="button" aria-hidden="true" class="close" data-notify="dismiss">×</button>' +
        '<span data-notify="icon"></span> ' +
        '<span data-notify="title">{1}</span> ' +
        '<span data-notify="message">{2}</span>' +
        '<div class="progress" data-notify="progressbar">' +
            '<div class="progress-bar progress-bar-{0}" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>' +
        '</div>' +
        '<a href="{3}" target="{4}" data-notify="url"></a>' +
    '</div>' 
});
neilakapete commented 8 years ago

Yeah that was what I did but didn't want to have to create different templates for different scenarios and was thinking of a class option to add extra classes that would allow me to do it simpler.