noty-rails 2.2.9 → 2.3.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,34 +1,30 @@
1
- (function($) {
2
-
3
- $.noty.layouts.top = {
4
- name : 'top',
5
- options : {},
6
- container: {
7
- object : '<ul id="noty_top_layout_container" />',
8
- selector: 'ul#noty_top_layout_container',
9
- style : function() {
10
- $(this).css({
11
- top : 0,
12
- left : '5%',
13
- position : 'fixed',
14
- width : '90%',
15
- height : 'auto',
16
- margin : 0,
17
- padding : 0,
18
- listStyleType: 'none',
19
- zIndex : 9999999
20
- });
21
- }
22
- },
23
- parent : {
24
- object : '<li />',
25
- selector: 'li',
26
- css : {}
27
- },
28
- css : {
29
- display: 'none'
30
- },
31
- addClass : ''
32
- };
33
-
34
- })(jQuery);
1
+ $.noty.layouts.top = {
2
+ name : 'top',
3
+ options : {},
4
+ container: {
5
+ object : '<ul id="noty_top_layout_container" />',
6
+ selector: 'ul#noty_top_layout_container',
7
+ style : function() {
8
+ $(this).css({
9
+ top : 0,
10
+ left : '5%',
11
+ position : 'fixed',
12
+ width : '90%',
13
+ height : 'auto',
14
+ margin : 0,
15
+ padding : 0,
16
+ listStyleType: 'none',
17
+ zIndex : 9999999
18
+ });
19
+ }
20
+ },
21
+ parent : {
22
+ object : '<li />',
23
+ selector: 'li',
24
+ css : {}
25
+ },
26
+ css : {
27
+ display: 'none'
28
+ },
29
+ addClass : ''
30
+ };
@@ -1,41 +1,37 @@
1
- (function($) {
1
+ $.noty.layouts.topCenter = {
2
+ name : 'topCenter',
3
+ options : { // overrides options
2
4
 
3
- $.noty.layouts.topCenter = {
4
- name : 'topCenter',
5
- options : { // overrides options
5
+ },
6
+ container: {
7
+ object : '<ul id="noty_topCenter_layout_container" />',
8
+ selector: 'ul#noty_topCenter_layout_container',
9
+ style : function() {
10
+ $(this).css({
11
+ top : 20,
12
+ left : 0,
13
+ position : 'fixed',
14
+ width : '310px',
15
+ height : 'auto',
16
+ margin : 0,
17
+ padding : 0,
18
+ listStyleType: 'none',
19
+ zIndex : 10000000
20
+ });
6
21
 
7
- },
8
- container: {
9
- object : '<ul id="noty_topCenter_layout_container" />',
10
- selector: 'ul#noty_topCenter_layout_container',
11
- style : function() {
12
- $(this).css({
13
- top : 20,
14
- left : 0,
15
- position : 'fixed',
16
- width : '310px',
17
- height : 'auto',
18
- margin : 0,
19
- padding : 0,
20
- listStyleType: 'none',
21
- zIndex : 10000000
22
- });
23
-
24
- $(this).css({
25
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
26
- });
27
- }
28
- },
29
- parent : {
30
- object : '<li />',
31
- selector: 'li',
32
- css : {}
33
- },
34
- css : {
35
- display: 'none',
36
- width : '310px'
37
- },
38
- addClass : ''
39
- };
40
-
41
- })(jQuery);
22
+ $(this).css({
23
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
24
+ });
25
+ }
26
+ },
27
+ parent : {
28
+ object : '<li />',
29
+ selector: 'li',
30
+ css : {}
31
+ },
32
+ css : {
33
+ display: 'none',
34
+ width : '310px'
35
+ },
36
+ addClass : ''
37
+ };
@@ -1,43 +1,39 @@
1
- (function($) {
1
+ $.noty.layouts.topLeft = {
2
+ name : 'topLeft',
3
+ options : { // overrides options
2
4
 
3
- $.noty.layouts.topLeft = {
4
- name : 'topLeft',
5
- options : { // overrides options
5
+ },
6
+ container: {
7
+ object : '<ul id="noty_topLeft_layout_container" />',
8
+ selector: 'ul#noty_topLeft_layout_container',
9
+ style : function() {
10
+ $(this).css({
11
+ top : 20,
12
+ left : 20,
13
+ position : 'fixed',
14
+ width : '310px',
15
+ height : 'auto',
16
+ margin : 0,
17
+ padding : 0,
18
+ listStyleType: 'none',
19
+ zIndex : 10000000
20
+ });
6
21
 
7
- },
8
- container: {
9
- object : '<ul id="noty_topLeft_layout_container" />',
10
- selector: 'ul#noty_topLeft_layout_container',
11
- style : function() {
22
+ if(window.innerWidth < 600) {
12
23
  $(this).css({
13
- top : 20,
14
- left : 20,
15
- position : 'fixed',
16
- width : '310px',
17
- height : 'auto',
18
- margin : 0,
19
- padding : 0,
20
- listStyleType: 'none',
21
- zIndex : 10000000
24
+ left: 5
22
25
  });
23
-
24
- if(window.innerWidth < 600) {
25
- $(this).css({
26
- left: 5
27
- });
28
- }
29
26
  }
30
- },
31
- parent : {
32
- object : '<li />',
33
- selector: 'li',
34
- css : {}
35
- },
36
- css : {
37
- display: 'none',
38
- width : '310px'
39
- },
40
- addClass : ''
41
- };
42
-
43
- })(jQuery);
27
+ }
28
+ },
29
+ parent : {
30
+ object : '<li />',
31
+ selector: 'li',
32
+ css : {}
33
+ },
34
+ css : {
35
+ display: 'none',
36
+ width : '310px'
37
+ },
38
+ addClass : ''
39
+ };
@@ -1,43 +1,39 @@
1
- (function($) {
1
+ $.noty.layouts.topRight = {
2
+ name : 'topRight',
3
+ options : { // overrides options
2
4
 
3
- $.noty.layouts.topRight = {
4
- name : 'topRight',
5
- options : { // overrides options
5
+ },
6
+ container: {
7
+ object : '<ul id="noty_topRight_layout_container" />',
8
+ selector: 'ul#noty_topRight_layout_container',
9
+ style : function() {
10
+ $(this).css({
11
+ top : 20,
12
+ right : 20,
13
+ position : 'fixed',
14
+ width : '310px',
15
+ height : 'auto',
16
+ margin : 0,
17
+ padding : 0,
18
+ listStyleType: 'none',
19
+ zIndex : 10000000
20
+ });
6
21
 
7
- },
8
- container: {
9
- object : '<ul id="noty_topRight_layout_container" />',
10
- selector: 'ul#noty_topRight_layout_container',
11
- style : function() {
22
+ if(window.innerWidth < 600) {
12
23
  $(this).css({
13
- top : 20,
14
- right : 20,
15
- position : 'fixed',
16
- width : '310px',
17
- height : 'auto',
18
- margin : 0,
19
- padding : 0,
20
- listStyleType: 'none',
21
- zIndex : 10000000
24
+ right: 5
22
25
  });
23
-
24
- if(window.innerWidth < 600) {
25
- $(this).css({
26
- right: 5
27
- });
28
- }
29
26
  }
30
- },
31
- parent : {
32
- object : '<li />',
33
- selector: 'li',
34
- css : {}
35
- },
36
- css : {
37
- display: 'none',
38
- width : '310px'
39
- },
40
- addClass : ''
41
- };
42
-
43
- })(jQuery);
27
+ }
28
+ },
29
+ parent : {
30
+ object : '<li />',
31
+ selector: 'li',
32
+ css : {}
33
+ },
34
+ css : {
35
+ display: 'none',
36
+ width : '310px'
37
+ },
38
+ addClass : ''
39
+ };
@@ -1,6 +1,13 @@
1
+ !function(root, factory) {
2
+ if (typeof define === 'function' && define.amd) {
3
+ define(['jquery'], factory);
4
+ } else {
5
+ factory(root.jQuery);
6
+ } }(this, function($) {
7
+
1
8
  /*!
2
9
  @package noty - jQuery Notification Plugin
3
- @version version: 2.2.9
10
+ @version version: 2.3.4
4
11
  @contributors https://github.com/needim/noty/graphs/contributors
5
12
 
6
13
  @documentation Examples and Documentation - http://needim.github.com/noty/
@@ -8,17 +15,15 @@
8
15
  @license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php
9
16
  */
10
17
 
11
- if(typeof Object.create !== 'function') {
12
- Object.create = function(o) {
13
- function F() {
14
- }
15
-
16
- F.prototype = o;
17
- return new F();
18
- };
19
- }
18
+ if(typeof Object.create !== 'function') {
19
+ Object.create = function(o) {
20
+ function F() {
21
+ }
20
22
 
21
- (function($) {
23
+ F.prototype = o;
24
+ return new F();
25
+ };
26
+ }
22
27
 
23
28
  var NotyObject = {
24
29
 
@@ -76,9 +81,9 @@ if(typeof Object.create !== 'function') {
76
81
  $.each(this.options.buttons, function(i, button) {
77
82
  var $button = $('<button/>').addClass((button.addClass) ? button.addClass : 'gray').html(button.text).attr('id', button.id ? button.id : 'button-' + i)
78
83
  .appendTo(self.$bar.find('.noty_buttons'))
79
- .on('click', function() {
84
+ .on('click', function(event) {
80
85
  if($.isFunction(button.onClick)) {
81
- button.onClick.call($button, self);
86
+ button.onClick.call($button, self, event);
82
87
  }
83
88
  });
84
89
  });
@@ -139,16 +144,26 @@ if(typeof Object.create !== 'function') {
139
144
  if(self.options.callback.onShow)
140
145
  self.options.callback.onShow.apply(self);
141
146
 
142
- self.$bar.animate(
143
- self.options.animation.open,
144
- self.options.animation.speed,
145
- self.options.animation.easing,
146
- function() {
147
+ if (typeof self.options.animation.open == 'string') {
148
+ self.$bar.css('height', self.$bar.innerHeight());
149
+ self.$bar.show().addClass(self.options.animation.open).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
147
150
  if(self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
148
151
  self.showing = false;
149
152
  self.shown = true;
150
153
  });
151
154
 
155
+ } else {
156
+ self.$bar.animate(
157
+ self.options.animation.open,
158
+ self.options.animation.speed,
159
+ self.options.animation.easing,
160
+ function() {
161
+ if(self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
162
+ self.showing = false;
163
+ self.shown = true;
164
+ });
165
+ }
166
+
152
167
  // If noty is have a timeout option
153
168
  if(self.options.timeout)
154
169
  self.$bar.delay(self.options.timeout).promise().done(function() {
@@ -175,8 +190,6 @@ if(typeof Object.create !== 'function') {
175
190
  return;
176
191
  }
177
192
 
178
- this.$bar.dequeue();
179
-
180
193
  if(!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue
181
194
  var queue = [];
182
195
  $.each($.noty.queue, function(i, n) {
@@ -194,53 +207,81 @@ if(typeof Object.create !== 'function') {
194
207
  self.options.callback.onClose.apply(self);
195
208
  }
196
209
 
197
- self.$bar.clearQueue().stop().animate(
198
- self.options.animation.close,
199
- self.options.animation.speed,
200
- self.options.animation.easing,
201
- function() {
210
+ if (typeof self.options.animation.close == 'string') {
211
+ self.$bar.addClass(self.options.animation.close).one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function() {
202
212
  if(self.options.callback.afterClose) self.options.callback.afterClose.apply(self);
203
- })
204
- .promise().done(function() {
205
-
206
- // Modal Cleaning
207
- if(self.options.modal) {
208
- $.notyRenderer.setModalCount(-1);
209
- if($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function() {
210
- $(this).remove();
211
- });
212
- }
213
+ self.closeCleanUp();
214
+ });
215
+ } else {
216
+ self.$bar.clearQueue().stop().animate(
217
+ self.options.animation.close,
218
+ self.options.animation.speed,
219
+ self.options.animation.easing,
220
+ function() {
221
+ if(self.options.callback.afterClose) self.options.callback.afterClose.apply(self);
222
+ })
223
+ .promise().done(function() {
224
+ self.closeCleanUp();
225
+ });
226
+ }
227
+
228
+ }, // end close
213
229
 
214
- // Layout Cleaning
215
- $.notyRenderer.setLayoutCountFor(self, -1);
216
- if($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
230
+ closeCleanUp: function() {
217
231
 
218
- // Make sure self.$bar has not been removed before attempting to remove it
219
- if(typeof self.$bar !== 'undefined' && self.$bar !== null) {
232
+ var self = this;
233
+
234
+ // Modal Cleaning
235
+ if(self.options.modal) {
236
+ $.notyRenderer.setModalCount(-1);
237
+ if($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function() {
238
+ $(this).remove();
239
+ });
240
+ }
241
+
242
+ // Layout Cleaning
243
+ $.notyRenderer.setLayoutCountFor(self, -1);
244
+ if($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
245
+
246
+ // Make sure self.$bar has not been removed before attempting to remove it
247
+ if(typeof self.$bar !== 'undefined' && self.$bar !== null) {
248
+
249
+ if (typeof self.options.animation.close == 'string') {
250
+ self.$bar.css('transition', 'all 100ms ease').css('border', 0).css('margin', 0).height(0);
251
+ self.$bar.one('transitionend webkitTransitionEnd oTransitionEnd MSTransitionEnd', function() {
220
252
  self.$bar.remove();
221
253
  self.$bar = null;
222
254
  self.closed = true;
223
- }
224
255
 
225
- delete $.noty.store[self.options.id]; // deleting noty from store
256
+ if(self.options.theme.callback && self.options.theme.callback.onClose) {
257
+ self.options.theme.callback.onClose.apply(self);
258
+ }
259
+ });
260
+ } else {
261
+ self.$bar.remove();
262
+ self.$bar = null;
263
+ self.closed = true;
264
+ }
265
+ }
226
266
 
227
- if(self.options.theme.callback && self.options.theme.callback.onClose) {
228
- self.options.theme.callback.onClose.apply(self);
229
- }
267
+ delete $.noty.store[self.options.id]; // deleting noty from store
230
268
 
231
- if(!self.options.dismissQueue) {
232
- // Queue render
233
- $.noty.ontap = true;
269
+ if(self.options.theme.callback && self.options.theme.callback.onClose) {
270
+ self.options.theme.callback.onClose.apply(self);
271
+ }
234
272
 
235
- $.notyRenderer.render();
236
- }
273
+ if(!self.options.dismissQueue) {
274
+ // Queue render
275
+ $.noty.ontap = true;
237
276
 
238
- if(self.options.maxVisible > 0 && self.options.dismissQueue) {
239
- $.notyRenderer.render();
240
- }
241
- })
277
+ $.notyRenderer.render();
278
+ }
242
279
 
243
- }, // end close
280
+ if(self.options.maxVisible > 0 && self.options.dismissQueue) {
281
+ $.notyRenderer.render();
282
+ }
283
+
284
+ }, // end close clean up
244
285
 
245
286
  setText: function(text) {
246
287
  if(!this.closed) {
@@ -494,799 +535,896 @@ if(typeof Object.create !== 'function') {
494
535
  });
495
536
  });
496
537
 
497
- })(jQuery);
498
-
499
- // Helpers
500
- window.noty = function noty(options) {
501
- return jQuery.notyRenderer.init(options);
538
+ // Helpers
539
+ window.noty = function noty(options) {
540
+ return jQuery.notyRenderer.init(options);
541
+ };
542
+ $.noty.layouts.bottom = {
543
+ name : 'bottom',
544
+ options : {},
545
+ container: {
546
+ object : '<ul id="noty_bottom_layout_container" />',
547
+ selector: 'ul#noty_bottom_layout_container',
548
+ style : function() {
549
+ $(this).css({
550
+ bottom : 0,
551
+ left : '5%',
552
+ position : 'fixed',
553
+ width : '90%',
554
+ height : 'auto',
555
+ margin : 0,
556
+ padding : 0,
557
+ listStyleType: 'none',
558
+ zIndex : 9999999
559
+ });
560
+ }
561
+ },
562
+ parent : {
563
+ object : '<li />',
564
+ selector: 'li',
565
+ css : {}
566
+ },
567
+ css : {
568
+ display: 'none'
569
+ },
570
+ addClass : ''
502
571
  };
503
572
 
504
- (function($) {
573
+ $.noty.layouts.bottomCenter = {
574
+ name : 'bottomCenter',
575
+ options : { // overrides options
505
576
 
506
- $.noty.layouts.bottom = {
507
- name : 'bottom',
508
- options : {},
509
- container: {
510
- object : '<ul id="noty_bottom_layout_container" />',
511
- selector: 'ul#noty_bottom_layout_container',
512
- style : function() {
513
- $(this).css({
514
- bottom : 0,
515
- left : '5%',
516
- position : 'fixed',
517
- width : '90%',
518
- height : 'auto',
519
- margin : 0,
520
- padding : 0,
521
- listStyleType: 'none',
522
- zIndex : 9999999
523
- });
524
- }
525
- },
526
- parent : {
527
- object : '<li />',
528
- selector: 'li',
529
- css : {}
530
- },
531
- css : {
532
- display: 'none'
533
- },
534
- addClass : ''
535
- };
577
+ },
578
+ container: {
579
+ object : '<ul id="noty_bottomCenter_layout_container" />',
580
+ selector: 'ul#noty_bottomCenter_layout_container',
581
+ style : function() {
582
+ $(this).css({
583
+ bottom : 20,
584
+ left : 0,
585
+ position : 'fixed',
586
+ width : '310px',
587
+ height : 'auto',
588
+ margin : 0,
589
+ padding : 0,
590
+ listStyleType: 'none',
591
+ zIndex : 10000000
592
+ });
593
+
594
+ $(this).css({
595
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
596
+ });
597
+ }
598
+ },
599
+ parent : {
600
+ object : '<li />',
601
+ selector: 'li',
602
+ css : {}
603
+ },
604
+ css : {
605
+ display: 'none',
606
+ width : '310px'
607
+ },
608
+ addClass : ''
609
+ };
536
610
 
537
- })(jQuery);
538
- (function($) {
539
611
 
540
- $.noty.layouts.bottomCenter = {
541
- name : 'bottomCenter',
542
- options : { // overrides options
612
+ $.noty.layouts.bottomLeft = {
613
+ name : 'bottomLeft',
614
+ options : { // overrides options
543
615
 
544
- },
545
- container: {
546
- object : '<ul id="noty_bottomCenter_layout_container" />',
547
- selector: 'ul#noty_bottomCenter_layout_container',
548
- style : function() {
549
- $(this).css({
550
- bottom : 20,
551
- left : 0,
552
- position : 'fixed',
553
- width : '310px',
554
- height : 'auto',
555
- margin : 0,
556
- padding : 0,
557
- listStyleType: 'none',
558
- zIndex : 10000000
559
- });
616
+ },
617
+ container: {
618
+ object : '<ul id="noty_bottomLeft_layout_container" />',
619
+ selector: 'ul#noty_bottomLeft_layout_container',
620
+ style : function() {
621
+ $(this).css({
622
+ bottom : 20,
623
+ left : 20,
624
+ position : 'fixed',
625
+ width : '310px',
626
+ height : 'auto',
627
+ margin : 0,
628
+ padding : 0,
629
+ listStyleType: 'none',
630
+ zIndex : 10000000
631
+ });
560
632
 
633
+ if(window.innerWidth < 600) {
561
634
  $(this).css({
562
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
635
+ left: 5
563
636
  });
564
637
  }
565
- },
566
- parent : {
567
- object : '<li />',
568
- selector: 'li',
569
- css : {}
570
- },
571
- css : {
572
- display: 'none',
573
- width : '310px'
574
- },
575
- addClass : ''
576
- };
577
-
578
- })(jQuery);
579
-
580
- (function($) {
581
-
582
- $.noty.layouts.bottomLeft = {
583
- name : 'bottomLeft',
584
- options : { // overrides options
638
+ }
639
+ },
640
+ parent : {
641
+ object : '<li />',
642
+ selector: 'li',
643
+ css : {}
644
+ },
645
+ css : {
646
+ display: 'none',
647
+ width : '310px'
648
+ },
649
+ addClass : ''
650
+ };
651
+ $.noty.layouts.bottomRight = {
652
+ name : 'bottomRight',
653
+ options : { // overrides options
654
+
655
+ },
656
+ container: {
657
+ object : '<ul id="noty_bottomRight_layout_container" />',
658
+ selector: 'ul#noty_bottomRight_layout_container',
659
+ style : function() {
660
+ $(this).css({
661
+ bottom : 20,
662
+ right : 20,
663
+ position : 'fixed',
664
+ width : '310px',
665
+ height : 'auto',
666
+ margin : 0,
667
+ padding : 0,
668
+ listStyleType: 'none',
669
+ zIndex : 10000000
670
+ });
585
671
 
586
- },
587
- container: {
588
- object : '<ul id="noty_bottomLeft_layout_container" />',
589
- selector: 'ul#noty_bottomLeft_layout_container',
590
- style : function() {
672
+ if(window.innerWidth < 600) {
591
673
  $(this).css({
592
- bottom : 20,
593
- left : 20,
594
- position : 'fixed',
595
- width : '310px',
596
- height : 'auto',
597
- margin : 0,
598
- padding : 0,
599
- listStyleType: 'none',
600
- zIndex : 10000000
674
+ right: 5
601
675
  });
602
-
603
- if(window.innerWidth < 600) {
604
- $(this).css({
605
- left: 5
606
- });
607
- }
608
676
  }
609
- },
610
- parent : {
611
- object : '<li />',
612
- selector: 'li',
613
- css : {}
614
- },
615
- css : {
616
- display: 'none',
617
- width : '310px'
618
- },
619
- addClass : ''
620
- };
621
-
622
- })(jQuery);
623
- (function($) {
677
+ }
678
+ },
679
+ parent : {
680
+ object : '<li />',
681
+ selector: 'li',
682
+ css : {}
683
+ },
684
+ css : {
685
+ display: 'none',
686
+ width : '310px'
687
+ },
688
+ addClass : ''
689
+ };
690
+ $.noty.layouts.center = {
691
+ name : 'center',
692
+ options : { // overrides options
693
+
694
+ },
695
+ container: {
696
+ object : '<ul id="noty_center_layout_container" />',
697
+ selector: 'ul#noty_center_layout_container',
698
+ style : function() {
699
+ $(this).css({
700
+ position : 'fixed',
701
+ width : '310px',
702
+ height : 'auto',
703
+ margin : 0,
704
+ padding : 0,
705
+ listStyleType: 'none',
706
+ zIndex : 10000000
707
+ });
624
708
 
625
- $.noty.layouts.bottomRight = {
626
- name : 'bottomRight',
627
- options : { // overrides options
709
+ // getting hidden height
710
+ var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
711
+ $("body").append(dupe);
712
+ dupe.find('.i-am-closing-now').remove();
713
+ dupe.find('li').css('display', 'block');
714
+ var actual_height = dupe.height();
715
+ dupe.remove();
628
716
 
629
- },
630
- container: {
631
- object : '<ul id="noty_bottomRight_layout_container" />',
632
- selector: 'ul#noty_bottomRight_layout_container',
633
- style : function() {
717
+ if($(this).hasClass('i-am-new')) {
634
718
  $(this).css({
635
- bottom : 20,
636
- right : 20,
637
- position : 'fixed',
638
- width : '310px',
639
- height : 'auto',
640
- margin : 0,
641
- padding : 0,
642
- listStyleType: 'none',
643
- zIndex : 10000000
719
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
720
+ top : ($(window).height() - actual_height) / 2 + 'px'
644
721
  });
645
-
646
- if(window.innerWidth < 600) {
647
- $(this).css({
648
- right: 5
649
- });
650
- }
651
722
  }
652
- },
653
- parent : {
654
- object : '<li />',
655
- selector: 'li',
656
- css : {}
657
- },
658
- css : {
659
- display: 'none',
660
- width : '310px'
661
- },
662
- addClass : ''
663
- };
723
+ else {
724
+ $(this).animate({
725
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
726
+ top : ($(window).height() - actual_height) / 2 + 'px'
727
+ }, 500);
728
+ }
664
729
 
665
- })(jQuery);
666
- (function($) {
730
+ }
731
+ },
732
+ parent : {
733
+ object : '<li />',
734
+ selector: 'li',
735
+ css : {}
736
+ },
737
+ css : {
738
+ display: 'none',
739
+ width : '310px'
740
+ },
741
+ addClass : ''
742
+ };
743
+ $.noty.layouts.centerLeft = {
744
+ name : 'centerLeft',
745
+ options : { // overrides options
746
+
747
+ },
748
+ container: {
749
+ object : '<ul id="noty_centerLeft_layout_container" />',
750
+ selector: 'ul#noty_centerLeft_layout_container',
751
+ style : function() {
752
+ $(this).css({
753
+ left : 20,
754
+ position : 'fixed',
755
+ width : '310px',
756
+ height : 'auto',
757
+ margin : 0,
758
+ padding : 0,
759
+ listStyleType: 'none',
760
+ zIndex : 10000000
761
+ });
667
762
 
668
- $.noty.layouts.center = {
669
- name : 'center',
670
- options : { // overrides options
763
+ // getting hidden height
764
+ var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
765
+ $("body").append(dupe);
766
+ dupe.find('.i-am-closing-now').remove();
767
+ dupe.find('li').css('display', 'block');
768
+ var actual_height = dupe.height();
769
+ dupe.remove();
671
770
 
672
- },
673
- container: {
674
- object : '<ul id="noty_center_layout_container" />',
675
- selector: 'ul#noty_center_layout_container',
676
- style : function() {
771
+ if($(this).hasClass('i-am-new')) {
677
772
  $(this).css({
678
- position : 'fixed',
679
- width : '310px',
680
- height : 'auto',
681
- margin : 0,
682
- padding : 0,
683
- listStyleType: 'none',
684
- zIndex : 10000000
773
+ top: ($(window).height() - actual_height) / 2 + 'px'
685
774
  });
686
-
687
- // getting hidden height
688
- var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
689
- $("body").append(dupe);
690
- dupe.find('.i-am-closing-now').remove();
691
- dupe.find('li').css('display', 'block');
692
- var actual_height = dupe.height();
693
- dupe.remove();
694
-
695
- if($(this).hasClass('i-am-new')) {
696
- $(this).css({
697
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
698
- top : ($(window).height() - actual_height) / 2 + 'px'
699
- });
700
- }
701
- else {
702
- $(this).animate({
703
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px',
704
- top : ($(window).height() - actual_height) / 2 + 'px'
705
- }, 500);
706
- }
707
-
708
775
  }
709
- },
710
- parent : {
711
- object : '<li />',
712
- selector: 'li',
713
- css : {}
714
- },
715
- css : {
716
- display: 'none',
717
- width : '310px'
718
- },
719
- addClass : ''
720
- };
721
-
722
- })(jQuery);
723
- (function($) {
724
-
725
- $.noty.layouts.centerLeft = {
726
- name : 'centerLeft',
727
- options : { // overrides options
776
+ else {
777
+ $(this).animate({
778
+ top: ($(window).height() - actual_height) / 2 + 'px'
779
+ }, 500);
780
+ }
728
781
 
729
- },
730
- container: {
731
- object : '<ul id="noty_centerLeft_layout_container" />',
732
- selector: 'ul#noty_centerLeft_layout_container',
733
- style : function() {
782
+ if(window.innerWidth < 600) {
734
783
  $(this).css({
735
- left : 20,
736
- position : 'fixed',
737
- width : '310px',
738
- height : 'auto',
739
- margin : 0,
740
- padding : 0,
741
- listStyleType: 'none',
742
- zIndex : 10000000
784
+ left: 5
743
785
  });
744
-
745
- // getting hidden height
746
- var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
747
- $("body").append(dupe);
748
- dupe.find('.i-am-closing-now').remove();
749
- dupe.find('li').css('display', 'block');
750
- var actual_height = dupe.height();
751
- dupe.remove();
752
-
753
- if($(this).hasClass('i-am-new')) {
754
- $(this).css({
755
- top: ($(window).height() - actual_height) / 2 + 'px'
756
- });
757
- }
758
- else {
759
- $(this).animate({
760
- top: ($(window).height() - actual_height) / 2 + 'px'
761
- }, 500);
762
- }
763
-
764
- if(window.innerWidth < 600) {
765
- $(this).css({
766
- left: 5
767
- });
768
- }
769
-
770
786
  }
771
- },
772
- parent : {
773
- object : '<li />',
774
- selector: 'li',
775
- css : {}
776
- },
777
- css : {
778
- display: 'none',
779
- width : '310px'
780
- },
781
- addClass : ''
782
- };
783
787
 
784
- })(jQuery);
788
+ }
789
+ },
790
+ parent : {
791
+ object : '<li />',
792
+ selector: 'li',
793
+ css : {}
794
+ },
795
+ css : {
796
+ display: 'none',
797
+ width : '310px'
798
+ },
799
+ addClass : ''
800
+ };
801
+
802
+ $.noty.layouts.centerRight = {
803
+ name : 'centerRight',
804
+ options : { // overrides options
785
805
 
786
- (function($) {
806
+ },
807
+ container: {
808
+ object : '<ul id="noty_centerRight_layout_container" />',
809
+ selector: 'ul#noty_centerRight_layout_container',
810
+ style : function() {
811
+ $(this).css({
812
+ right : 20,
813
+ position : 'fixed',
814
+ width : '310px',
815
+ height : 'auto',
816
+ margin : 0,
817
+ padding : 0,
818
+ listStyleType: 'none',
819
+ zIndex : 10000000
820
+ });
787
821
 
788
- $.noty.layouts.centerRight = {
789
- name : 'centerRight',
790
- options : { // overrides options
822
+ // getting hidden height
823
+ var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
824
+ $("body").append(dupe);
825
+ dupe.find('.i-am-closing-now').remove();
826
+ dupe.find('li').css('display', 'block');
827
+ var actual_height = dupe.height();
828
+ dupe.remove();
791
829
 
792
- },
793
- container: {
794
- object : '<ul id="noty_centerRight_layout_container" />',
795
- selector: 'ul#noty_centerRight_layout_container',
796
- style : function() {
830
+ if($(this).hasClass('i-am-new')) {
797
831
  $(this).css({
798
- right : 20,
799
- position : 'fixed',
800
- width : '310px',
801
- height : 'auto',
802
- margin : 0,
803
- padding : 0,
804
- listStyleType: 'none',
805
- zIndex : 10000000
832
+ top: ($(window).height() - actual_height) / 2 + 'px'
806
833
  });
807
-
808
- // getting hidden height
809
- var dupe = $(this).clone().css({visibility: "hidden", display: "block", position: "absolute", top: 0, left: 0}).attr('id', 'dupe');
810
- $("body").append(dupe);
811
- dupe.find('.i-am-closing-now').remove();
812
- dupe.find('li').css('display', 'block');
813
- var actual_height = dupe.height();
814
- dupe.remove();
815
-
816
- if($(this).hasClass('i-am-new')) {
817
- $(this).css({
818
- top: ($(window).height() - actual_height) / 2 + 'px'
819
- });
820
- }
821
- else {
822
- $(this).animate({
823
- top: ($(window).height() - actual_height) / 2 + 'px'
824
- }, 500);
825
- }
826
-
827
- if(window.innerWidth < 600) {
828
- $(this).css({
829
- right: 5
830
- });
831
- }
832
-
833
834
  }
834
- },
835
- parent : {
836
- object : '<li />',
837
- selector: 'li',
838
- css : {}
839
- },
840
- css : {
841
- display: 'none',
842
- width : '310px'
843
- },
844
- addClass : ''
845
- };
846
-
847
- })(jQuery);
848
-
849
- (function($) {
835
+ else {
836
+ $(this).animate({
837
+ top: ($(window).height() - actual_height) / 2 + 'px'
838
+ }, 500);
839
+ }
850
840
 
851
- $.noty.layouts.inline = {
852
- name : 'inline',
853
- options : {},
854
- container: {
855
- object : '<ul class="noty_inline_layout_container" />',
856
- selector: 'ul.noty_inline_layout_container',
857
- style : function() {
841
+ if(window.innerWidth < 600) {
858
842
  $(this).css({
859
- width : '100%',
860
- height : 'auto',
861
- margin : 0,
862
- padding : 0,
863
- listStyleType: 'none',
864
- zIndex : 9999999
843
+ right: 5
865
844
  });
866
845
  }
867
- },
868
- parent : {
869
- object : '<li />',
870
- selector: 'li',
871
- css : {}
872
- },
873
- css : {
874
- display: 'none'
875
- },
876
- addClass : ''
877
- };
878
846
 
879
- })(jQuery);
880
- (function($) {
847
+ }
848
+ },
849
+ parent : {
850
+ object : '<li />',
851
+ selector: 'li',
852
+ css : {}
853
+ },
854
+ css : {
855
+ display: 'none',
856
+ width : '310px'
857
+ },
858
+ addClass : ''
859
+ };
860
+ $.noty.layouts.inline = {
861
+ name : 'inline',
862
+ options : {},
863
+ container: {
864
+ object : '<ul class="noty_inline_layout_container" />',
865
+ selector: 'ul.noty_inline_layout_container',
866
+ style : function() {
867
+ $(this).css({
868
+ width : '100%',
869
+ height : 'auto',
870
+ margin : 0,
871
+ padding : 0,
872
+ listStyleType: 'none',
873
+ zIndex : 9999999
874
+ });
875
+ }
876
+ },
877
+ parent : {
878
+ object : '<li />',
879
+ selector: 'li',
880
+ css : {}
881
+ },
882
+ css : {
883
+ display: 'none'
884
+ },
885
+ addClass : ''
886
+ };
887
+ $.noty.layouts.top = {
888
+ name : 'top',
889
+ options : {},
890
+ container: {
891
+ object : '<ul id="noty_top_layout_container" />',
892
+ selector: 'ul#noty_top_layout_container',
893
+ style : function() {
894
+ $(this).css({
895
+ top : 0,
896
+ left : '5%',
897
+ position : 'fixed',
898
+ width : '90%',
899
+ height : 'auto',
900
+ margin : 0,
901
+ padding : 0,
902
+ listStyleType: 'none',
903
+ zIndex : 9999999
904
+ });
905
+ }
906
+ },
907
+ parent : {
908
+ object : '<li />',
909
+ selector: 'li',
910
+ css : {}
911
+ },
912
+ css : {
913
+ display: 'none'
914
+ },
915
+ addClass : ''
916
+ };
917
+ $.noty.layouts.topCenter = {
918
+ name : 'topCenter',
919
+ options : { // overrides options
920
+
921
+ },
922
+ container: {
923
+ object : '<ul id="noty_topCenter_layout_container" />',
924
+ selector: 'ul#noty_topCenter_layout_container',
925
+ style : function() {
926
+ $(this).css({
927
+ top : 20,
928
+ left : 0,
929
+ position : 'fixed',
930
+ width : '310px',
931
+ height : 'auto',
932
+ margin : 0,
933
+ padding : 0,
934
+ listStyleType: 'none',
935
+ zIndex : 10000000
936
+ });
881
937
 
882
- $.noty.layouts.top = {
883
- name : 'top',
884
- options : {},
885
- container: {
886
- object : '<ul id="noty_top_layout_container" />',
887
- selector: 'ul#noty_top_layout_container',
888
- style : function() {
889
- $(this).css({
890
- top : 0,
891
- left : '5%',
892
- position : 'fixed',
893
- width : '90%',
894
- height : 'auto',
895
- margin : 0,
896
- padding : 0,
897
- listStyleType: 'none',
898
- zIndex : 9999999
899
- });
900
- }
901
- },
902
- parent : {
903
- object : '<li />',
904
- selector: 'li',
905
- css : {}
906
- },
907
- css : {
908
- display: 'none'
909
- },
910
- addClass : ''
911
- };
938
+ $(this).css({
939
+ left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
940
+ });
941
+ }
942
+ },
943
+ parent : {
944
+ object : '<li />',
945
+ selector: 'li',
946
+ css : {}
947
+ },
948
+ css : {
949
+ display: 'none',
950
+ width : '310px'
951
+ },
952
+ addClass : ''
953
+ };
912
954
 
913
- })(jQuery);
914
- (function($) {
955
+ $.noty.layouts.topLeft = {
956
+ name : 'topLeft',
957
+ options : { // overrides options
915
958
 
916
- $.noty.layouts.topCenter = {
917
- name : 'topCenter',
918
- options : { // overrides options
959
+ },
960
+ container: {
961
+ object : '<ul id="noty_topLeft_layout_container" />',
962
+ selector: 'ul#noty_topLeft_layout_container',
963
+ style : function() {
964
+ $(this).css({
965
+ top : 20,
966
+ left : 20,
967
+ position : 'fixed',
968
+ width : '310px',
969
+ height : 'auto',
970
+ margin : 0,
971
+ padding : 0,
972
+ listStyleType: 'none',
973
+ zIndex : 10000000
974
+ });
919
975
 
920
- },
921
- container: {
922
- object : '<ul id="noty_topCenter_layout_container" />',
923
- selector: 'ul#noty_topCenter_layout_container',
924
- style : function() {
976
+ if(window.innerWidth < 600) {
925
977
  $(this).css({
926
- top : 20,
927
- left : 0,
928
- position : 'fixed',
929
- width : '310px',
930
- height : 'auto',
931
- margin : 0,
932
- padding : 0,
933
- listStyleType: 'none',
934
- zIndex : 10000000
978
+ left: 5
935
979
  });
980
+ }
981
+ }
982
+ },
983
+ parent : {
984
+ object : '<li />',
985
+ selector: 'li',
986
+ css : {}
987
+ },
988
+ css : {
989
+ display: 'none',
990
+ width : '310px'
991
+ },
992
+ addClass : ''
993
+ };
994
+ $.noty.layouts.topRight = {
995
+ name : 'topRight',
996
+ options : { // overrides options
997
+
998
+ },
999
+ container: {
1000
+ object : '<ul id="noty_topRight_layout_container" />',
1001
+ selector: 'ul#noty_topRight_layout_container',
1002
+ style : function() {
1003
+ $(this).css({
1004
+ top : 20,
1005
+ right : 20,
1006
+ position : 'fixed',
1007
+ width : '310px',
1008
+ height : 'auto',
1009
+ margin : 0,
1010
+ padding : 0,
1011
+ listStyleType: 'none',
1012
+ zIndex : 10000000
1013
+ });
936
1014
 
1015
+ if(window.innerWidth < 600) {
937
1016
  $(this).css({
938
- left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
1017
+ right: 5
939
1018
  });
940
1019
  }
941
- },
942
- parent : {
943
- object : '<li />',
944
- selector: 'li',
945
- css : {}
946
- },
947
- css : {
1020
+ }
1021
+ },
1022
+ parent : {
1023
+ object : '<li />',
1024
+ selector: 'li',
1025
+ css : {}
1026
+ },
1027
+ css : {
1028
+ display: 'none',
1029
+ width : '310px'
1030
+ },
1031
+ addClass : ''
1032
+ };
1033
+ $.noty.themes.bootstrapTheme = {
1034
+ name: 'bootstrapTheme',
1035
+ modal: {
1036
+ css: {
1037
+ position: 'fixed',
1038
+ width: '100%',
1039
+ height: '100%',
1040
+ backgroundColor: '#000',
1041
+ zIndex: 10000,
1042
+ opacity: 0.6,
948
1043
  display: 'none',
949
- width : '310px'
950
- },
951
- addClass : ''
952
- };
953
-
954
- })(jQuery);
955
-
956
- (function($) {
1044
+ left: 0,
1045
+ top: 0
1046
+ }
1047
+ },
1048
+ style: function() {
1049
+
1050
+ var containerSelector = this.options.layout.container.selector;
1051
+ $(containerSelector).addClass('list-group');
1052
+
1053
+ this.$closeButton.append('<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>');
1054
+ this.$closeButton.addClass('close');
1055
+
1056
+ this.$bar.addClass( "list-group-item" ).css('padding', '0px');
1057
+
1058
+ switch (this.options.type) {
1059
+ case 'alert': case 'notification':
1060
+ this.$bar.addClass( "list-group-item-info" );
1061
+ break;
1062
+ case 'warning':
1063
+ this.$bar.addClass( "list-group-item-warning" );
1064
+ break;
1065
+ case 'error':
1066
+ this.$bar.addClass( "list-group-item-danger" );
1067
+ break;
1068
+ case 'information':
1069
+ this.$bar.addClass("list-group-item-info");
1070
+ break;
1071
+ case 'success':
1072
+ this.$bar.addClass( "list-group-item-success" );
1073
+ break;
1074
+ }
957
1075
 
958
- $.noty.layouts.topLeft = {
959
- name : 'topLeft',
960
- options : { // overrides options
1076
+ this.$message.css({
1077
+ fontSize: '13px',
1078
+ lineHeight: '16px',
1079
+ textAlign: 'center',
1080
+ padding: '8px 10px 9px',
1081
+ width: 'auto',
1082
+ position: 'relative'
1083
+ });
1084
+ },
1085
+ callback: {
1086
+ onShow: function() { },
1087
+ onClose: function() { }
1088
+ }
1089
+ };
961
1090
 
962
- },
963
- container: {
964
- object : '<ul id="noty_topLeft_layout_container" />',
965
- selector: 'ul#noty_topLeft_layout_container',
966
- style : function() {
967
- $(this).css({
968
- top : 20,
969
- left : 20,
970
- position : 'fixed',
971
- width : '310px',
972
- height : 'auto',
973
- margin : 0,
974
- padding : 0,
975
- listStyleType: 'none',
976
- zIndex : 10000000
977
- });
978
1091
 
979
- if(window.innerWidth < 600) {
980
- $(this).css({
981
- left: 5
982
- });
1092
+ $.noty.themes.defaultTheme = {
1093
+ name : 'defaultTheme',
1094
+ helpers : {
1095
+ borderFix: function() {
1096
+ if(this.options.dismissQueue) {
1097
+ var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
1098
+ switch(this.options.layout.name) {
1099
+ case 'top':
1100
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
1101
+ $(selector).last().css({borderRadius: '0px 0px 5px 5px'});
1102
+ break;
1103
+ case 'topCenter':
1104
+ case 'topLeft':
1105
+ case 'topRight':
1106
+ case 'bottomCenter':
1107
+ case 'bottomLeft':
1108
+ case 'bottomRight':
1109
+ case 'center':
1110
+ case 'centerLeft':
1111
+ case 'centerRight':
1112
+ case 'inline':
1113
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
1114
+ $(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
1115
+ $(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'});
1116
+ break;
1117
+ case 'bottom':
1118
+ $(selector).css({borderRadius: '0px 0px 0px 0px'});
1119
+ $(selector).first().css({borderRadius: '5px 5px 0px 0px'});
1120
+ break;
1121
+ default:
1122
+ break;
983
1123
  }
984
1124
  }
985
- },
986
- parent : {
987
- object : '<li />',
988
- selector: 'li',
989
- css : {}
990
- },
991
- css : {
992
- display: 'none',
993
- width : '310px'
994
- },
995
- addClass : ''
996
- };
1125
+ }
1126
+ },
1127
+ modal : {
1128
+ css: {
1129
+ position : 'fixed',
1130
+ width : '100%',
1131
+ height : '100%',
1132
+ backgroundColor: '#000',
1133
+ zIndex : 10000,
1134
+ opacity : 0.6,
1135
+ display : 'none',
1136
+ left : 0,
1137
+ top : 0
1138
+ }
1139
+ },
1140
+ style : function() {
997
1141
 
998
- })(jQuery);
999
- (function($) {
1142
+ this.$bar.css({
1143
+ overflow : 'hidden',
1144
+ background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAQAAAClM0ndAAAAhklEQVR4AdXO0QrCMBBE0bttkk38/w8WRERpdyjzVOc+HxhIHqJGMQcFFkpYRQotLLSw0IJ5aBdovruMYDA/kT8plF9ZKLFQcgF18hDj1SbQOMlCA4kao0iiXmah7qBWPdxpohsgVZyj7e5I9KcID+EhiDI5gxBYKLBQYKHAQoGFAoEks/YEGHYKB7hFxf0AAAAASUVORK5CYII=') repeat-x scroll left top #fff"
1145
+ });
1000
1146
 
1001
- $.noty.layouts.topRight = {
1002
- name : 'topRight',
1003
- options : { // overrides options
1147
+ this.$message.css({
1148
+ fontSize : '13px',
1149
+ lineHeight: '16px',
1150
+ textAlign : 'center',
1151
+ padding : '8px 10px 9px',
1152
+ width : 'auto',
1153
+ position : 'relative'
1154
+ });
1004
1155
 
1005
- },
1006
- container: {
1007
- object : '<ul id="noty_topRight_layout_container" />',
1008
- selector: 'ul#noty_topRight_layout_container',
1009
- style : function() {
1010
- $(this).css({
1011
- top : 20,
1012
- right : 20,
1013
- position : 'fixed',
1014
- width : '310px',
1015
- height : 'auto',
1016
- margin : 0,
1017
- padding : 0,
1018
- listStyleType: 'none',
1019
- zIndex : 10000000
1020
- });
1156
+ this.$closeButton.css({
1157
+ position : 'absolute',
1158
+ top : 4, right: 4,
1159
+ width : 10, height: 10,
1160
+ background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)",
1161
+ display : 'none',
1162
+ cursor : 'pointer'
1163
+ });
1021
1164
 
1022
- if(window.innerWidth < 600) {
1023
- $(this).css({
1024
- right: 5
1025
- });
1026
- }
1027
- }
1028
- },
1029
- parent : {
1030
- object : '<li />',
1031
- selector: 'li',
1032
- css : {}
1033
- },
1034
- css : {
1035
- display: 'none',
1036
- width : '310px'
1037
- },
1038
- addClass : ''
1039
- };
1165
+ this.$buttons.css({
1166
+ padding : 5,
1167
+ textAlign : 'right',
1168
+ borderTop : '1px solid #ccc',
1169
+ backgroundColor: '#fff'
1170
+ });
1040
1171
 
1041
- })(jQuery);
1042
- (function($) {
1043
-
1044
- $.noty.themes.bootstrapTheme = {
1045
- name: 'bootstrapTheme',
1046
- modal: {
1047
- css: {
1048
- position: 'fixed',
1049
- width: '100%',
1050
- height: '100%',
1051
- backgroundColor: '#000',
1052
- zIndex: 10000,
1053
- opacity: 0.6,
1054
- display: 'none',
1055
- left: 0,
1056
- top: 0
1057
- }
1058
- },
1059
- style: function() {
1060
-
1061
- var containerSelector = this.options.layout.container.selector;
1062
- $(containerSelector).addClass('list-group');
1063
-
1064
- this.$closeButton.append('<span aria-hidden="true">&times;</span><span class="sr-only">Close</span>');
1065
- this.$closeButton.addClass('close');
1066
-
1067
- this.$bar.addClass( "list-group-item" ).css('padding', '0px');
1068
-
1069
- switch (this.options.type) {
1070
- case 'alert': case 'notification':
1071
- this.$bar.addClass( "list-group-item-info" );
1072
- break;
1073
- case 'warning':
1074
- this.$bar.addClass( "list-group-item-warning" );
1075
- break;
1076
- case 'error':
1077
- this.$bar.addClass( "list-group-item-danger" );
1078
- break;
1079
- case 'information':
1080
- this.$bar.addClass("list-group-item-info");
1081
- break;
1082
- case 'success':
1083
- this.$bar.addClass( "list-group-item-success" );
1084
- break;
1085
- }
1086
-
1087
- this.$message.css({
1088
- fontSize: '13px',
1089
- lineHeight: '16px',
1090
- textAlign: 'center',
1091
- padding: '8px 10px 9px',
1092
- width: 'auto',
1093
- position: 'relative'
1094
- });
1095
- },
1096
- callback: {
1097
- onShow: function() { },
1098
- onClose: function() { }
1099
- }
1100
- };
1101
-
1102
- })(jQuery);
1103
-
1104
-
1105
- (function($) {
1106
-
1107
- $.noty.themes.defaultTheme = {
1108
- name : 'defaultTheme',
1109
- helpers : {
1110
- borderFix: function() {
1111
- if(this.options.dismissQueue) {
1112
- var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
1113
- switch(this.options.layout.name) {
1114
- case 'top':
1115
- $(selector).css({borderRadius: '0px 0px 0px 0px'});
1116
- $(selector).last().css({borderRadius: '0px 0px 5px 5px'});
1117
- break;
1118
- case 'topCenter':
1119
- case 'topLeft':
1120
- case 'topRight':
1121
- case 'bottomCenter':
1122
- case 'bottomLeft':
1123
- case 'bottomRight':
1124
- case 'center':
1125
- case 'centerLeft':
1126
- case 'centerRight':
1127
- case 'inline':
1128
- $(selector).css({borderRadius: '0px 0px 0px 0px'});
1129
- $(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
1130
- $(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'});
1131
- break;
1132
- case 'bottom':
1133
- $(selector).css({borderRadius: '0px 0px 0px 0px'});
1134
- $(selector).first().css({borderRadius: '5px 5px 0px 0px'});
1135
- break;
1136
- default:
1137
- break;
1138
- }
1139
- }
1140
- }
1141
- },
1142
- modal : {
1143
- css: {
1144
- position : 'fixed',
1145
- width : '100%',
1146
- height : '100%',
1147
- backgroundColor: '#000',
1148
- zIndex : 10000,
1149
- opacity : 0.6,
1150
- display : 'none',
1151
- left : 0,
1152
- top : 0
1172
+ this.$buttons.find('button').css({
1173
+ marginLeft: 5
1174
+ });
1175
+
1176
+ this.$buttons.find('button:first').css({
1177
+ marginLeft: 0
1178
+ });
1179
+
1180
+ this.$bar.on({
1181
+ mouseenter: function() {
1182
+ $(this).find('.noty_close').stop().fadeTo('normal', 1);
1183
+ },
1184
+ mouseleave: function() {
1185
+ $(this).find('.noty_close').stop().fadeTo('normal', 0);
1153
1186
  }
1187
+ });
1188
+
1189
+ switch(this.options.layout.name) {
1190
+ case 'top':
1191
+ this.$bar.css({
1192
+ borderRadius: '0px 0px 5px 5px',
1193
+ borderBottom: '2px solid #eee',
1194
+ borderLeft : '2px solid #eee',
1195
+ borderRight : '2px solid #eee',
1196
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
1197
+ });
1198
+ break;
1199
+ case 'topCenter':
1200
+ case 'center':
1201
+ case 'bottomCenter':
1202
+ case 'inline':
1203
+ this.$bar.css({
1204
+ borderRadius: '5px',
1205
+ border : '1px solid #eee',
1206
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
1207
+ });
1208
+ this.$message.css({fontSize: '13px', textAlign: 'center'});
1209
+ break;
1210
+ case 'topLeft':
1211
+ case 'topRight':
1212
+ case 'bottomLeft':
1213
+ case 'bottomRight':
1214
+ case 'centerLeft':
1215
+ case 'centerRight':
1216
+ this.$bar.css({
1217
+ borderRadius: '5px',
1218
+ border : '1px solid #eee',
1219
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
1220
+ });
1221
+ this.$message.css({fontSize: '13px', textAlign: 'left'});
1222
+ break;
1223
+ case 'bottom':
1224
+ this.$bar.css({
1225
+ borderRadius: '5px 5px 0px 0px',
1226
+ borderTop : '2px solid #eee',
1227
+ borderLeft : '2px solid #eee',
1228
+ borderRight : '2px solid #eee',
1229
+ boxShadow : "0 -2px 4px rgba(0, 0, 0, 0.1)"
1230
+ });
1231
+ break;
1232
+ default:
1233
+ this.$bar.css({
1234
+ border : '2px solid #eee',
1235
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
1236
+ });
1237
+ break;
1238
+ }
1239
+
1240
+ switch(this.options.type) {
1241
+ case 'alert':
1242
+ case 'notification':
1243
+ this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
1244
+ break;
1245
+ case 'warning':
1246
+ this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
1247
+ this.$buttons.css({borderTop: '1px solid #FFC237'});
1248
+ break;
1249
+ case 'error':
1250
+ this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
1251
+ this.$message.css({fontWeight: 'bold'});
1252
+ this.$buttons.css({borderTop: '1px solid darkred'});
1253
+ break;
1254
+ case 'information':
1255
+ this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
1256
+ this.$buttons.css({borderTop: '1px solid #0B90C4'});
1257
+ break;
1258
+ case 'success':
1259
+ this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
1260
+ this.$buttons.css({borderTop: '1px solid #50C24E'});
1261
+ break;
1262
+ default:
1263
+ this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
1264
+ break;
1265
+ }
1266
+ },
1267
+ callback: {
1268
+ onShow : function() {
1269
+ $.noty.themes.defaultTheme.helpers.borderFix.apply(this);
1154
1270
  },
1155
- style : function() {
1271
+ onClose: function() {
1272
+ $.noty.themes.defaultTheme.helpers.borderFix.apply(this);
1273
+ }
1274
+ }
1275
+ };
1156
1276
 
1157
- this.$bar.css({
1158
- overflow : 'hidden',
1159
- background: "url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABsAAAAoCAQAAAClM0ndAAAAhklEQVR4AdXO0QrCMBBE0bttkk38/w8WRERpdyjzVOc+HxhIHqJGMQcFFkpYRQotLLSw0IJ5aBdovruMYDA/kT8plF9ZKLFQcgF18hDj1SbQOMlCA4kao0iiXmah7qBWPdxpohsgVZyj7e5I9KcID+EhiDI5gxBYKLBQYKHAQoGFAoEks/YEGHYKB7hFxf0AAAAASUVORK5CYII=') repeat-x scroll left top #fff"
1160
- });
1277
+ $.noty.themes.relax = {
1278
+ name : 'relax',
1279
+ helpers : {},
1280
+ modal : {
1281
+ css: {
1282
+ position : 'fixed',
1283
+ width : '100%',
1284
+ height : '100%',
1285
+ backgroundColor: '#000',
1286
+ zIndex : 10000,
1287
+ opacity : 0.6,
1288
+ display : 'none',
1289
+ left : 0,
1290
+ top : 0
1291
+ }
1292
+ },
1293
+ style : function() {
1161
1294
 
1162
- this.$message.css({
1163
- fontSize : '13px',
1164
- lineHeight: '16px',
1165
- textAlign : 'center',
1166
- padding : '8px 10px 9px',
1167
- width : 'auto',
1168
- position : 'relative'
1169
- });
1295
+ this.$bar.css({
1296
+ overflow : 'hidden',
1297
+ margin : '4px 0',
1298
+ borderRadius: '2px'
1299
+ });
1170
1300
 
1171
- this.$closeButton.css({
1172
- position : 'absolute',
1173
- top : 4, right: 4,
1174
- width : 10, height: 10,
1175
- background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)",
1176
- display : 'none',
1177
- cursor : 'pointer'
1178
- });
1301
+ this.$message.css({
1302
+ fontSize : '14px',
1303
+ lineHeight: '16px',
1304
+ textAlign : 'center',
1305
+ padding : '10px',
1306
+ width : 'auto',
1307
+ position : 'relative'
1308
+ });
1179
1309
 
1180
- this.$buttons.css({
1181
- padding : 5,
1182
- textAlign : 'right',
1183
- borderTop : '1px solid #ccc',
1184
- backgroundColor: '#fff'
1185
- });
1310
+ this.$closeButton.css({
1311
+ position : 'absolute',
1312
+ top : 4, right: 4,
1313
+ width : 10, height: 10,
1314
+ background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)",
1315
+ display : 'none',
1316
+ cursor : 'pointer'
1317
+ });
1186
1318
 
1187
- this.$buttons.find('button').css({
1188
- marginLeft: 5
1189
- });
1319
+ this.$buttons.css({
1320
+ padding : 5,
1321
+ textAlign : 'right',
1322
+ borderTop : '1px solid #ccc',
1323
+ backgroundColor: '#fff'
1324
+ });
1190
1325
 
1191
- this.$buttons.find('button:first').css({
1192
- marginLeft: 0
1193
- });
1326
+ this.$buttons.find('button').css({
1327
+ marginLeft: 5
1328
+ });
1194
1329
 
1195
- this.$bar.on({
1196
- mouseenter: function() {
1197
- $(this).find('.noty_close').stop().fadeTo('normal', 1);
1198
- },
1199
- mouseleave: function() {
1200
- $(this).find('.noty_close').stop().fadeTo('normal', 0);
1201
- }
1202
- });
1330
+ this.$buttons.find('button:first').css({
1331
+ marginLeft: 0
1332
+ });
1203
1333
 
1204
- switch(this.options.layout.name) {
1205
- case 'top':
1206
- this.$bar.css({
1207
- borderRadius: '0px 0px 5px 5px',
1208
- borderBottom: '2px solid #eee',
1209
- borderLeft : '2px solid #eee',
1210
- borderRight : '2px solid #eee',
1211
- boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
1212
- });
1213
- break;
1214
- case 'topCenter':
1215
- case 'center':
1216
- case 'bottomCenter':
1217
- case 'inline':
1218
- this.$bar.css({
1219
- borderRadius: '5px',
1220
- border : '1px solid #eee',
1221
- boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
1222
- });
1223
- this.$message.css({fontSize: '13px', textAlign: 'center'});
1224
- break;
1225
- case 'topLeft':
1226
- case 'topRight':
1227
- case 'bottomLeft':
1228
- case 'bottomRight':
1229
- case 'centerLeft':
1230
- case 'centerRight':
1231
- this.$bar.css({
1232
- borderRadius: '5px',
1233
- border : '1px solid #eee',
1234
- boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
1235
- });
1236
- this.$message.css({fontSize: '13px', textAlign: 'left'});
1237
- break;
1238
- case 'bottom':
1239
- this.$bar.css({
1240
- borderRadius: '5px 5px 0px 0px',
1241
- borderTop : '2px solid #eee',
1242
- borderLeft : '2px solid #eee',
1243
- borderRight : '2px solid #eee',
1244
- boxShadow : "0 -2px 4px rgba(0, 0, 0, 0.1)"
1245
- });
1246
- break;
1247
- default:
1248
- this.$bar.css({
1249
- border : '2px solid #eee',
1250
- boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
1251
- });
1252
- break;
1334
+ this.$bar.on({
1335
+ mouseenter: function() {
1336
+ $(this).find('.noty_close').stop().fadeTo('normal', 1);
1337
+ },
1338
+ mouseleave: function() {
1339
+ $(this).find('.noty_close').stop().fadeTo('normal', 0);
1253
1340
  }
1341
+ });
1342
+
1343
+ switch(this.options.layout.name) {
1344
+ case 'top':
1345
+ this.$bar.css({
1346
+ borderBottom: '2px solid #eee',
1347
+ borderLeft : '2px solid #eee',
1348
+ borderRight : '2px solid #eee',
1349
+ borderTop : '2px solid #eee',
1350
+ boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
1351
+ });
1352
+ break;
1353
+ case 'topCenter':
1354
+ case 'center':
1355
+ case 'bottomCenter':
1356
+ case 'inline':
1357
+ this.$bar.css({
1358
+ border : '1px solid #eee',
1359
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
1360
+ });
1361
+ this.$message.css({fontSize: '13px', textAlign: 'center'});
1362
+ break;
1363
+ case 'topLeft':
1364
+ case 'topRight':
1365
+ case 'bottomLeft':
1366
+ case 'bottomRight':
1367
+ case 'centerLeft':
1368
+ case 'centerRight':
1369
+ this.$bar.css({
1370
+ border : '1px solid #eee',
1371
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
1372
+ });
1373
+ this.$message.css({fontSize: '13px', textAlign: 'left'});
1374
+ break;
1375
+ case 'bottom':
1376
+ this.$bar.css({
1377
+ borderTop : '2px solid #eee',
1378
+ borderLeft : '2px solid #eee',
1379
+ borderRight : '2px solid #eee',
1380
+ borderBottom: '2px solid #eee',
1381
+ boxShadow : "0 -2px 4px rgba(0, 0, 0, 0.1)"
1382
+ });
1383
+ break;
1384
+ default:
1385
+ this.$bar.css({
1386
+ border : '2px solid #eee',
1387
+ boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
1388
+ });
1389
+ break;
1390
+ }
1391
+
1392
+ switch(this.options.type) {
1393
+ case 'alert':
1394
+ case 'notification':
1395
+ this.$bar.css({backgroundColor: '#FFF', borderColor: '#dedede', color: '#444'});
1396
+ break;
1397
+ case 'warning':
1398
+ this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
1399
+ this.$buttons.css({borderTop: '1px solid #FFC237'});
1400
+ break;
1401
+ case 'error':
1402
+ this.$bar.css({backgroundColor: '#FF8181', borderColor: '#e25353', color: '#FFF'});
1403
+ this.$message.css({fontWeight: 'bold'});
1404
+ this.$buttons.css({borderTop: '1px solid darkred'});
1405
+ break;
1406
+ case 'information':
1407
+ this.$bar.css({backgroundColor: '#78C5E7', borderColor: '#3badd6', color: '#FFF'});
1408
+ this.$buttons.css({borderTop: '1px solid #0B90C4'});
1409
+ break;
1410
+ case 'success':
1411
+ this.$bar.css({backgroundColor: '#BCF5BC', borderColor: '#7cdd77', color: 'darkgreen'});
1412
+ this.$buttons.css({borderTop: '1px solid #50C24E'});
1413
+ break;
1414
+ default:
1415
+ this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
1416
+ break;
1417
+ }
1418
+ },
1419
+ callback: {
1420
+ onShow : function() {
1254
1421
 
1255
- switch(this.options.type) {
1256
- case 'alert':
1257
- case 'notification':
1258
- this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
1259
- break;
1260
- case 'warning':
1261
- this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
1262
- this.$buttons.css({borderTop: '1px solid #FFC237'});
1263
- break;
1264
- case 'error':
1265
- this.$bar.css({backgroundColor: 'red', borderColor: 'darkred', color: '#FFF'});
1266
- this.$message.css({fontWeight: 'bold'});
1267
- this.$buttons.css({borderTop: '1px solid darkred'});
1268
- break;
1269
- case 'information':
1270
- this.$bar.css({backgroundColor: '#57B7E2', borderColor: '#0B90C4', color: '#FFF'});
1271
- this.$buttons.css({borderTop: '1px solid #0B90C4'});
1272
- break;
1273
- case 'success':
1274
- this.$bar.css({backgroundColor: 'lightgreen', borderColor: '#50C24E', color: 'darkgreen'});
1275
- this.$buttons.css({borderTop: '1px solid #50C24E'});
1276
- break;
1277
- default:
1278
- this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
1279
- break;
1280
- }
1281
1422
  },
1282
- callback: {
1283
- onShow : function() {
1284
- $.noty.themes.defaultTheme.helpers.borderFix.apply(this);
1285
- },
1286
- onClose: function() {
1287
- $.noty.themes.defaultTheme.helpers.borderFix.apply(this);
1288
- }
1423
+ onClose: function() {
1424
+
1289
1425
  }
1290
- };
1426
+ }
1427
+ };
1428
+
1291
1429
 
1292
- })(jQuery);
1430
+ });