pnotify-rails 2.0.1.1 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (26) hide show
  1. checksums.yaml +4 -4
  2. data/lib/pnotify-rails/version.rb +1 -1
  3. data/vendor/assets/javascripts/pnotify/index.js +5 -1
  4. data/vendor/assets/javascripts/pnotify/pnotify.animate.js +108 -0
  5. data/vendor/assets/javascripts/pnotify/pnotify.buttons.js +165 -121
  6. data/vendor/assets/javascripts/pnotify/pnotify.callbacks.js +42 -40
  7. data/vendor/assets/javascripts/pnotify/pnotify.confirm.js +145 -139
  8. data/vendor/assets/javascripts/pnotify/pnotify.desktop.js +144 -133
  9. data/vendor/assets/javascripts/pnotify/pnotify.history.js +172 -171
  10. data/vendor/assets/javascripts/pnotify/pnotify.js +873 -0
  11. data/vendor/assets/javascripts/pnotify/pnotify.mobile.js +121 -0
  12. data/vendor/assets/javascripts/pnotify/pnotify.nonblock.js +144 -139
  13. data/vendor/assets/javascripts/pnotify/pnotify.reference.js +131 -116
  14. data/vendor/assets/javascripts/pnotify/pnotify.tooltip.js +15 -0
  15. data/vendor/assets/stylesheets/pnotify/index.css +5 -2
  16. data/vendor/assets/stylesheets/pnotify/pnotify.brighttheme.css +165 -0
  17. data/vendor/assets/stylesheets/pnotify/pnotify.buttons.css +2 -2
  18. data/vendor/assets/stylesheets/pnotify/pnotify.css +112 -0
  19. data/vendor/assets/stylesheets/pnotify/pnotify.history.css +22 -22
  20. data/vendor/assets/stylesheets/pnotify/pnotify.material.css +121 -0
  21. data/vendor/assets/stylesheets/pnotify/pnotify.mobile.css +46 -0
  22. data/vendor/assets/stylesheets/pnotify/pnotify.nonblock.css +7 -0
  23. metadata +12 -6
  24. data/vendor/assets/javascripts/pnotify/pnotify.core.js +0 -778
  25. data/vendor/assets/stylesheets/pnotify/pnotify.core.css +0 -56
  26. data/vendor/assets/stylesheets/pnotify/pnotify.picon.css +0 -11
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4a9ac133fe2724e4b7c3c89cad200367314a71c
4
- data.tar.gz: c371e7a47442cee64891522631e63c6ca403f8db
3
+ metadata.gz: 26111d2df3784f90920840cbb2441aa870eeb7dc
4
+ data.tar.gz: a4d9097a6582ce70e350658bbff016026c313ea5
5
5
  SHA512:
6
- metadata.gz: 6216d687ed546f2c07b144c7d777ce6bbdfdf605382e3e5a5d4fe2c67a12198ca03d2eca92a87b0eee6b8655a0623e9ee254f82072f488301fc52ff37306dd66
7
- data.tar.gz: 3fc41f982fb29a1cad2288277f3f69746d6f0e057864fc990365db3f93b837922fe7c890ed1136ccb206f5445d28e531d56bb5383a5eac024c2d25ff1ec800a5
6
+ metadata.gz: c6ce11e4aa5f95f104978fbac1f6f7fe03127c4e1d44ba6857e676704bbef0fb32087dbe50c15700e65c74e3a97e2c6dabc4af6e8200ec161b777362ee7f5d5b
7
+ data.tar.gz: 69d8c87148bb141bdf665a738da3e87f7e44a433cce68844a42dc161e4c10dd131d909e5d20e97b76799fcc99884f42c40ed0574733a469abd333f6d835214fb
@@ -1,5 +1,5 @@
1
1
  module PNotify
2
2
  module Rails
3
- VERSION = '2.0.1.1'
3
+ VERSION = '3.0.0'
4
4
  end
5
5
  end
@@ -1,7 +1,11 @@
1
- //= require pnotify/pnotify.core
1
+ //= require pnotify/pnotify
2
+ //= require pnotify/pnotify.animate
2
3
  //= require pnotify/pnotify.buttons
3
4
  //= require pnotify/pnotify.callbacks
4
5
  //= require pnotify/pnotify.confirm
5
6
  //= require pnotify/pnotify.desktop
6
7
  //= require pnotify/pnotify.history
8
+ //= require pnotify/pnotify.mobile
7
9
  //= require pnotify/pnotify.nonblock
10
+ //= require pnotify/pnotify.reference
11
+ //= require pnotify/pnotify.tooltip
@@ -0,0 +1,108 @@
1
+ // Animate
2
+ (function (root, factory) {
3
+ if (typeof define === 'function' && define.amd) {
4
+ // AMD. Register as a module.
5
+ define('pnotify.animate', ['jquery', 'pnotify'], factory);
6
+ } else if (typeof exports === 'object' && typeof module !== 'undefined') {
7
+ // CommonJS
8
+ module.exports = factory(require('jquery'), require('./pnotify'));
9
+ } else {
10
+ // Browser globals
11
+ factory(root.jQuery, root.PNotify);
12
+ }
13
+ }(this, function($, PNotify){
14
+ PNotify.prototype.options.animate = {
15
+ // Use animate.css to animate the notice.
16
+ animate: false,
17
+ // The class to use to animate the notice in.
18
+ in_class: "",
19
+ // The class to use to animate the notice out.
20
+ out_class: ""
21
+ };
22
+ PNotify.prototype.modules.animate = {
23
+ init: function(notice, options){
24
+ this.setUpAnimations(notice, options);
25
+
26
+ notice.attention = function(aniClass, callback){
27
+ notice.elem.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', function(){
28
+ notice.elem.removeClass(aniClass);
29
+ if (callback) {
30
+ callback.call(notice);
31
+ }
32
+ }).addClass("animated "+aniClass);
33
+ };
34
+ },
35
+
36
+ update: function(notice, options, oldOpts){
37
+ if (options.animate != oldOpts.animate) {
38
+ this.setUpAnimations(notice, options)
39
+ }
40
+ },
41
+
42
+ setUpAnimations: function(notice, options){
43
+ if (options.animate) {
44
+ notice.options.animation = "none";
45
+ notice.elem.removeClass("ui-pnotify-fade-slow ui-pnotify-fade-normal ui-pnotify-fade-fast");
46
+ if (!notice._animateIn) {
47
+ notice._animateIn = notice.animateIn;
48
+ }
49
+ if (!notice._animateOut) {
50
+ notice._animateOut = notice.animateOut;
51
+ }
52
+ notice.animateIn = this.animateIn.bind(this);
53
+ notice.animateOut = this.animateOut.bind(this);
54
+ var animSpeed = 400;
55
+ if (notice.options.animate_speed === "slow") {
56
+ animSpeed = 600;
57
+ } else if (notice.options.animate_speed === "fast") {
58
+ animSpeed = 200;
59
+ } else if (notice.options.animate_speed > 0) {
60
+ animSpeed = notice.options.animate_speed;
61
+ }
62
+ animSpeed = animSpeed / 1000;
63
+ notice.elem.addClass("animated").css({
64
+ "-webkit-animation-duration": animSpeed+"s",
65
+ "-moz-animation-duration": animSpeed+"s",
66
+ "animation-duration": animSpeed+"s"
67
+ });
68
+ } else if (notice._animateIn && notice._animateOut) {
69
+ notice.animateIn = notice._animateIn;
70
+ delete notice._animateIn;
71
+ notice.animateOut = notice._animateOut;
72
+ delete notice._animateOut;
73
+ notice.elem.addClass("animated");
74
+ }
75
+ },
76
+
77
+ animateIn: function(callback){
78
+ // Declare that the notice is animating in.
79
+ this.notice.animating = "in";
80
+ var that = this;
81
+ callback = (function(){
82
+ if (this) {
83
+ this.call();
84
+ }
85
+ // Declare that the notice has completed animating.
86
+ that.notice.animating = false;
87
+ }).bind(callback);
88
+
89
+ this.notice.elem.show().one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', callback).removeClass(this.options.out_class).addClass("ui-pnotify-in").addClass(this.options.in_class);
90
+ },
91
+
92
+ animateOut: function(callback){
93
+ // Declare that the notice is animating out.
94
+ this.notice.animating = "out";
95
+ var that = this;
96
+ callback = (function(){
97
+ that.notice.elem.removeClass("ui-pnotify-in");
98
+ if (this) {
99
+ this.call();
100
+ }
101
+ // Declare that the notice has completed animating.
102
+ that.notice.animating = false;
103
+ }).bind(callback);
104
+
105
+ this.notice.elem.one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend', callback).removeClass(this.options.in_class).addClass(this.options.out_class);
106
+ }
107
+ };
108
+ }));
@@ -1,132 +1,176 @@
1
1
  // Buttons
2
- // Uses AMD or browser globals for jQuery.
3
- (function (factory) {
2
+ (function (root, factory) {
4
3
  if (typeof define === 'function' && define.amd) {
5
4
  // AMD. Register as a module.
6
5
  define('pnotify.buttons', ['jquery', 'pnotify'], factory);
6
+ } else if (typeof exports === 'object' && typeof module !== 'undefined') {
7
+ // CommonJS
8
+ module.exports = factory(require('jquery'), require('./pnotify'));
7
9
  } else {
8
10
  // Browser globals
9
- factory(jQuery, PNotify);
11
+ factory(root.jQuery, root.PNotify);
10
12
  }
11
- }(function($, PNotify){
12
- PNotify.prototype.options.buttons = {
13
- // Provide a button for the user to manually close the notice.
14
- closer: true,
15
- // Only show the closer button on hover.
16
- closer_hover: true,
17
- // Provide a button for the user to manually stick the notice.
18
- sticker: true,
19
- // Only show the sticker button on hover.
20
- sticker_hover: true,
21
- // The various displayed text, helps facilitating internationalization.
22
- labels: {
23
- close: "Close",
24
- stick: "Stick"
25
- }
26
- };
27
- PNotify.prototype.modules.buttons = {
28
- // This lets us update the options available in the closures.
29
- myOptions: null,
13
+ }(this, function($, PNotify){
14
+ PNotify.prototype.options.buttons = {
15
+ // Provide a button for the user to manually close the notice.
16
+ closer: true,
17
+ // Only show the closer button on hover.
18
+ closer_hover: true,
19
+ // Provide a button for the user to manually stick the notice.
20
+ sticker: true,
21
+ // Only show the sticker button on hover.
22
+ sticker_hover: true,
23
+ // Show the buttons even when the nonblock module is in use.
24
+ show_on_nonblock: false,
25
+ // The various displayed text, helps facilitating internationalization.
26
+ labels: {
27
+ close: "Close",
28
+ stick: "Stick",
29
+ unstick: "Unstick"
30
+ },
31
+ // The classes to use for button icons. Leave them null to use the classes from the styling you're using.
32
+ classes: {
33
+ closer: null,
34
+ pin_up: null,
35
+ pin_down: null
36
+ }
37
+ };
38
+ PNotify.prototype.modules.buttons = {
39
+ closer: null,
40
+ sticker: null,
30
41
 
31
- closer: null,
32
- sticker: null,
42
+ init: function(notice, options){
43
+ var that = this;
44
+ notice.elem.on({
45
+ "mouseenter": function(e){
46
+ // Show the buttons.
47
+ if (that.options.sticker && (!(notice.options.nonblock && notice.options.nonblock.nonblock) || that.options.show_on_nonblock)) {
48
+ that.sticker.trigger("pnotify:buttons:toggleStick").css("visibility", "visible");
49
+ }
50
+ if (that.options.closer && (!(notice.options.nonblock && notice.options.nonblock.nonblock) || that.options.show_on_nonblock)) {
51
+ that.closer.css("visibility", "visible");
52
+ }
53
+ },
54
+ "mouseleave": function(e){
55
+ // Hide the buttons.
56
+ if (that.options.sticker_hover) {
57
+ that.sticker.css("visibility", "hidden");
58
+ }
59
+ if (that.options.closer_hover) {
60
+ that.closer.css("visibility", "hidden");
61
+ }
62
+ }
63
+ });
33
64
 
34
- init: function(notice, options){
35
- var that = this;
36
- this.myOptions = options;
37
- notice.elem.on({
38
- "mouseenter": function(e){
39
- // Show the buttons.
40
- if (that.myOptions.sticker && !(notice.options.nonblock && notice.options.nonblock.nonblock)) that.sticker.trigger("pnotify_icon").css("visibility", "visible");
41
- if (that.myOptions.closer && !(notice.options.nonblock && notice.options.nonblock.nonblock)) that.closer.css("visibility", "visible");
42
- },
43
- "mouseleave": function(e){
44
- // Hide the buttons.
45
- if (that.myOptions.sticker_hover)
46
- that.sticker.css("visibility", "hidden");
47
- if (that.myOptions.closer_hover)
48
- that.closer.css("visibility", "hidden");
49
- }
50
- });
65
+ // Provide a button to stick the notice.
66
+ this.sticker = $("<div />", {
67
+ "class": "ui-pnotify-sticker",
68
+ "aria-role": "button",
69
+ "aria-pressed": notice.options.hide ? "false" : "true",
70
+ "tabindex": "0",
71
+ "title": notice.options.hide ? options.labels.stick : options.labels.unstick,
72
+ "css": {
73
+ "cursor": "pointer",
74
+ "visibility": options.sticker_hover ? "hidden" : "visible"
75
+ },
76
+ "click": function(){
77
+ notice.options.hide = !notice.options.hide;
78
+ if (notice.options.hide) {
79
+ notice.queueRemove();
80
+ } else {
81
+ notice.cancelRemove();
82
+ }
83
+ $(this).trigger("pnotify:buttons:toggleStick");
84
+ }
85
+ })
86
+ .bind("pnotify:buttons:toggleStick", function(){
87
+ var pin_up = that.options.classes.pin_up === null ? notice.styles.pin_up : that.options.classes.pin_up;
88
+ var pin_down = that.options.classes.pin_down === null ? notice.styles.pin_down : that.options.classes.pin_down;
89
+ $(this)
90
+ .attr("title", notice.options.hide ? that.options.labels.stick : that.options.labels.unstick)
91
+ .children()
92
+ .attr("class", "")
93
+ .addClass(notice.options.hide ? pin_up : pin_down)
94
+ .attr("aria-pressed", notice.options.hide ? "false" : "true");
95
+ })
96
+ .append("<span />")
97
+ .trigger("pnotify:buttons:toggleStick")
98
+ .prependTo(notice.container);
99
+ if (!options.sticker || (notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
100
+ this.sticker.css("display", "none");
101
+ }
51
102
 
52
- // Provide a button to stick the notice.
53
- this.sticker = $("<div />", {
54
- "class": "ui-pnotify-sticker",
55
- "css": {"cursor": "pointer", "visibility": options.sticker_hover ? "hidden" : "visible"},
56
- "click": function(){
57
- notice.options.hide = !notice.options.hide;
58
- if (notice.options.hide)
59
- notice.queueRemove();
60
- else
61
- notice.cancelRemove();
62
- $(this).trigger("pnotify_icon");
63
- }
64
- })
65
- .bind("pnotify_icon", function(){
66
- $(this).children().removeClass(notice.styles.pin_up+" "+notice.styles.pin_down).addClass(notice.options.hide ? notice.styles.pin_up : notice.styles.pin_down);
67
- })
68
- .append($("<span />", {"class": notice.styles.pin_up, "title": options.labels.stick}))
69
- .prependTo(notice.container);
70
- if (!options.sticker || (notice.options.nonblock && notice.options.nonblock.nonblock))
71
- this.sticker.css("display", "none");
72
-
73
- // Provide a button to close the notice.
74
- this.closer = $("<div />", {
75
- "class": "ui-pnotify-closer",
76
- "css": {"cursor": "pointer", "visibility": options.closer_hover ? "hidden" : "visible"},
77
- "click": function(){
78
- notice.remove(false);
79
- that.sticker.css("visibility", "hidden");
80
- that.closer.css("visibility", "hidden");
81
- }
82
- })
83
- .append($("<span />", {"class": notice.styles.closer, "title": options.labels.close}))
84
- .prependTo(notice.container);
85
- if (!options.closer || (notice.options.nonblock && notice.options.nonblock.nonblock))
86
- this.closer.css("display", "none");
87
- },
88
- update: function(notice, options){
89
- this.myOptions = options;
90
- // Update the sticker and closer buttons.
91
- if (!options.closer || (notice.options.nonblock && notice.options.nonblock.nonblock))
92
- this.closer.css("display", "none");
93
- else if (options.closer)
94
- this.closer.css("display", "block");
95
- if (!options.sticker || (notice.options.nonblock && notice.options.nonblock.nonblock))
96
- this.sticker.css("display", "none");
97
- else if (options.sticker)
98
- this.sticker.css("display", "block");
99
- // Update the sticker icon.
100
- this.sticker.trigger("pnotify_icon");
101
- // Update the hover status of the buttons.
102
- if (options.sticker_hover)
103
- this.sticker.css("visibility", "hidden");
104
- else if (!(notice.options.nonblock && notice.options.nonblock.nonblock))
105
- this.sticker.css("visibility", "visible");
106
- if (options.closer_hover)
107
- this.closer.css("visibility", "hidden");
108
- else if (!(notice.options.nonblock && notice.options.nonblock.nonblock))
109
- this.closer.css("visibility", "visible");
110
- }
111
- };
112
- $.extend(PNotify.styling.jqueryui, {
113
- closer: "ui-icon ui-icon-close",
114
- pin_up: "ui-icon ui-icon-pin-w",
115
- pin_down: "ui-icon ui-icon-pin-s"
116
- });
117
- $.extend(PNotify.styling.bootstrap2, {
118
- closer: "icon-remove",
119
- pin_up: "icon-pause",
120
- pin_down: "icon-play"
121
- });
122
- $.extend(PNotify.styling.bootstrap3, {
123
- closer: "glyphicon glyphicon-remove",
124
- pin_up: "glyphicon glyphicon-pause",
125
- pin_down: "glyphicon glyphicon-play"
126
- });
127
- $.extend(PNotify.styling.fontawesome, {
128
- closer: "fa fa-times",
129
- pin_up: "fa fa-pause",
130
- pin_down: "fa fa-play"
131
- });
103
+ // Provide a button to close the notice.
104
+ this.closer = $("<div />", {
105
+ "class": "ui-pnotify-closer",
106
+ "aria-role": "button",
107
+ "tabindex": "0",
108
+ "title": options.labels.close,
109
+ "css": {"cursor": "pointer", "visibility": options.closer_hover ? "hidden" : "visible"},
110
+ "click": function(){
111
+ notice.remove(false);
112
+ that.sticker.css("visibility", "hidden");
113
+ that.closer.css("visibility", "hidden");
114
+ }
115
+ })
116
+ .append($("<span />", {"class": options.classes.closer === null ? notice.styles.closer : options.classes.closer}))
117
+ .prependTo(notice.container);
118
+ if (!options.closer || (notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
119
+ this.closer.css("display", "none");
120
+ }
121
+ },
122
+ update: function(notice, options){
123
+ // Update the sticker and closer buttons.
124
+ if (!options.closer || (notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
125
+ this.closer.css("display", "none");
126
+ } else if (options.closer) {
127
+ this.closer.css("display", "block");
128
+ }
129
+ if (!options.sticker || (notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
130
+ this.sticker.css("display", "none");
131
+ } else if (options.sticker) {
132
+ this.sticker.css("display", "block");
133
+ }
134
+ // Update the sticker icon.
135
+ this.sticker.trigger("pnotify:buttons:toggleStick");
136
+ // Update the close icon.
137
+ this.closer.find("span").attr("class", "").addClass(options.classes.closer === null ? notice.styles.closer : options.classes.closer);
138
+ // Update the hover status of the buttons.
139
+ if (options.sticker_hover) {
140
+ this.sticker.css("visibility", "hidden");
141
+ } else if (!(notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
142
+ this.sticker.css("visibility", "visible");
143
+ }
144
+ if (options.closer_hover) {
145
+ this.closer.css("visibility", "hidden");
146
+ } else if (!(notice.options.nonblock && notice.options.nonblock.nonblock && !options.show_on_nonblock)) {
147
+ this.closer.css("visibility", "visible");
148
+ }
149
+ }
150
+ };
151
+ $.extend(PNotify.styling.brighttheme, {
152
+ closer: "brighttheme-icon-closer",
153
+ pin_up: "brighttheme-icon-sticker",
154
+ pin_down: "brighttheme-icon-sticker brighttheme-icon-stuck"
155
+ });
156
+ $.extend(PNotify.styling.jqueryui, {
157
+ closer: "ui-icon ui-icon-close",
158
+ pin_up: "ui-icon ui-icon-pin-w",
159
+ pin_down: "ui-icon ui-icon-pin-s"
160
+ });
161
+ $.extend(PNotify.styling.bootstrap2, {
162
+ closer: "icon-remove",
163
+ pin_up: "icon-pause",
164
+ pin_down: "icon-play"
165
+ });
166
+ $.extend(PNotify.styling.bootstrap3, {
167
+ closer: "glyphicon glyphicon-remove",
168
+ pin_up: "glyphicon glyphicon-pause",
169
+ pin_down: "glyphicon glyphicon-play"
170
+ });
171
+ $.extend(PNotify.styling.fontawesome, {
172
+ closer: "fa fa-times",
173
+ pin_up: "fa fa-pause",
174
+ pin_down: "fa fa-play"
175
+ });
132
176
  }));
@@ -1,48 +1,50 @@
1
1
  // Callbacks
2
- // Uses AMD or browser globals for jQuery.
3
- (function (factory) {
2
+ (function (root, factory) {
4
3
  if (typeof define === 'function' && define.amd) {
5
4
  // AMD. Register as a module.
6
5
  define('pnotify.callbacks', ['jquery', 'pnotify'], factory);
6
+ } else if (typeof exports === 'object' && typeof module !== 'undefined') {
7
+ // CommonJS
8
+ module.exports = factory(require('jquery'), require('./pnotify'));
7
9
  } else {
8
10
  // Browser globals
9
- factory(jQuery, PNotify);
11
+ factory(root.jQuery, root.PNotify);
10
12
  }
11
- }(function($, PNotify){
12
- var _init = PNotify.prototype.init,
13
- _open = PNotify.prototype.open,
14
- _remove = PNotify.prototype.remove;
15
- PNotify.prototype.init = function(){
16
- if (this.options.before_init) {
17
- this.options.before_init(this.options);
18
- }
19
- _init.apply(this, arguments);
20
- if (this.options.after_init) {
21
- this.options.after_init(this);
22
- }
23
- };
24
- PNotify.prototype.open = function(){
25
- var ret;
26
- if (this.options.before_open) {
27
- ret = this.options.before_open(this);
28
- }
29
- if (ret !== false) {
30
- _open.apply(this, arguments);
31
- if (this.options.after_open) {
32
- this.options.after_open(this);
33
- }
34
- }
35
- };
36
- PNotify.prototype.remove = function(timer_hide){
37
- var ret;
38
- if (this.options.before_close) {
39
- ret = this.options.before_close(this, timer_hide);
40
- }
41
- if (ret !== false) {
42
- _remove.apply(this, arguments);
43
- if (this.options.after_close) {
44
- this.options.after_close(this, timer_hide);
45
- }
46
- }
47
- };
13
+ }(this, function($, PNotify){
14
+ var _init = PNotify.prototype.init,
15
+ _open = PNotify.prototype.open,
16
+ _remove = PNotify.prototype.remove;
17
+ PNotify.prototype.init = function(){
18
+ if (this.options.before_init) {
19
+ this.options.before_init(this.options);
20
+ }
21
+ _init.apply(this, arguments);
22
+ if (this.options.after_init) {
23
+ this.options.after_init(this);
24
+ }
25
+ };
26
+ PNotify.prototype.open = function(){
27
+ var ret;
28
+ if (this.options.before_open) {
29
+ ret = this.options.before_open(this);
30
+ }
31
+ if (ret !== false) {
32
+ _open.apply(this, arguments);
33
+ if (this.options.after_open) {
34
+ this.options.after_open(this);
35
+ }
36
+ }
37
+ };
38
+ PNotify.prototype.remove = function(timer_hide){
39
+ var ret;
40
+ if (this.options.before_close) {
41
+ ret = this.options.before_close(this, timer_hide);
42
+ }
43
+ if (ret !== false) {
44
+ _remove.apply(this, arguments);
45
+ if (this.options.after_close) {
46
+ this.options.after_close(this, timer_hide);
47
+ }
48
+ }
49
+ };
48
50
  }));