Skip to content

Commit

Permalink
Merge pull request #211 from famaridon/bootstrapTheme
Browse files Browse the repository at this point in the history
a bootstrap theme built with list-group component
  • Loading branch information
needim committed Aug 4, 2014
2 parents 01d4e74 + 03d0fc3 commit a266fbf
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions js/noty/themes/bootstrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
(function($) {

$.noty.themes.bootstrapTheme = {
name: 'bootstrapTheme',
modal: {
css: {
position: 'fixed',
width: '100%',
height: '100%',
backgroundColor: '#000',
zIndex: 10000,
opacity: 0.6,
display: 'none',
left: 0,
top: 0
}
},
style: function() {

var containerSelector = this.options.layout.container.selector;
$(containerSelector).addClass('list-group');

this.$closeButton.append('<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>');
this.$closeButton.addClass('close');

this.$bar.addClass( "list-group-item" );

switch (this.options.type) {
case 'alert': case 'notification':
this.$bar.addClass( "list-group-item-info" );
break;
case 'warning':
this.$bar.addClass( "list-group-item-warning" );
break;
case 'error':
this.$bar.addClass( "list-group-item-danger" );
break;
case 'information':
this.$bar.addClass("list-group-item-info");
break;
case 'success':
this.$bar.addClass( "list-group-item-success" );
break;
}
},
callback: {
onShow: function() { },
onClose: function() { }
}
};

})(jQuery);

0 comments on commit a266fbf

Please sign in to comment.