pnotify-rails 1.2.0 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5c7c1cbd48890c84f0523c74eefa5f96e36cd441
|
4
|
+
data.tar.gz: e21b5e4ca33c0893e37f3bd59c5c375166cf8fa7
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 37424ba742911ca5e7eb83415a38832de12c16a4afeb3b6acec95652638220055ba526291e4bad356080ea8d4c5cb7f79633a7ac7d607ddb31bfc7d46d5b56fd
|
7
|
+
data.tar.gz: f589515a9af707298693782790503f6f3ad77d2fa9057ddad58be83f26b2e875369a067609e7936bf058a52e5e99d69b1bfaaa7ff204b57738afc0ab065ad4d3
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/*
|
2
|
-
* jQuery Pines Notify (pnotify) Plugin 1.2.
|
2
|
+
* jQuery Pines Notify (pnotify) Plugin 1.2.2
|
3
3
|
*
|
4
4
|
* http://pinesframework.org/pnotify/
|
5
5
|
* Copyright (c) 2009-2012 Hunter Perrin
|
@@ -170,7 +170,7 @@
|
|
170
170
|
}
|
171
171
|
if (opts.nonblock) {
|
172
172
|
// If it's non-blocking, animate to the other opacity.
|
173
|
-
pnotify.animate({"opacity": opts.nonblock_opacity}, "fast");
|
173
|
+
pnotify.stop().animate({"opacity": opts.nonblock_opacity}, "fast");
|
174
174
|
}
|
175
175
|
// Stop the close timer.
|
176
176
|
if (opts.hide && opts.mouse_reset) pnotify.pnotify_cancel_remove();
|
@@ -184,7 +184,7 @@
|
|
184
184
|
pnotify.css("cursor", "auto");
|
185
185
|
// Animate back to the normal opacity.
|
186
186
|
if (opts.nonblock && animating != "out")
|
187
|
-
pnotify.animate({"opacity": opts.opacity}, "fast");
|
187
|
+
pnotify.stop().animate({"opacity": opts.opacity}, "fast");
|
188
188
|
// Start the close timer.
|
189
189
|
if (opts.hide && opts.mouse_reset) pnotify.pnotify_queue_remove();
|
190
190
|
// Hide the buttons.
|
@@ -244,7 +244,7 @@
|
|
244
244
|
pnotify.container.addClass("ui-pnotify-shadow");
|
245
245
|
|
246
246
|
// The current version of Pines Notify.
|
247
|
-
pnotify.pnotify_version = "1.2.
|
247
|
+
pnotify.pnotify_version = "1.2.2";
|
248
248
|
|
249
249
|
// This function is for updating the notice.
|
250
250
|
pnotify.pnotify = function(options) {
|
@@ -439,8 +439,10 @@
|
|
439
439
|
animate.left = s.nextpos2+"px";
|
440
440
|
break;
|
441
441
|
}
|
442
|
-
} else
|
443
|
-
|
442
|
+
} else {
|
443
|
+
if(s.nextpos2)
|
444
|
+
pnotify.css(csspos2, s.nextpos2+"px");
|
445
|
+
}
|
444
446
|
// Keep track of the widest/tallest notice in the column/row, so we can push the next column/row.
|
445
447
|
switch (s.dir2) {
|
446
448
|
case "down":
|
@@ -477,7 +479,7 @@
|
|
477
479
|
}
|
478
480
|
// Run the animation.
|
479
481
|
if (animate.top || animate.bottom || animate.right || animate.left)
|
480
|
-
pnotify.animate(animate, {duration:
|
482
|
+
pnotify.animate(animate, {duration: this.opts.position_animate_speed, queue: false});
|
481
483
|
// Calculate the next dir1 position.
|
482
484
|
switch (s.dir1) {
|
483
485
|
case "down":
|
@@ -504,6 +506,14 @@
|
|
504
506
|
|
505
507
|
// Display the notice.
|
506
508
|
pnotify.pnotify_display = function() {
|
509
|
+
// Remove oldest notifications leaving only opts.maxonscreen on screen
|
510
|
+
notices_data = jwindow.data("pnotify");
|
511
|
+
if (notices_data && (notices_data.length > opts.maxonscreen)) {
|
512
|
+
$.each(notices_data.slice(0, notices_data.length - opts.maxonscreen), function(){
|
513
|
+
if (this.pnotify_remove)
|
514
|
+
this.pnotify_remove();
|
515
|
+
});
|
516
|
+
};
|
507
517
|
// If the notice is not in the DOM, append it.
|
508
518
|
if (!pnotify.parent().length)
|
509
519
|
pnotify.appendTo(body);
|
@@ -632,7 +642,7 @@
|
|
632
642
|
pnotify.closer.css("visibility", "hidden");
|
633
643
|
}
|
634
644
|
})
|
635
|
-
.append($("<span />", {"class": styles.closer}))
|
645
|
+
.append($("<span />", {"class": styles.closer, "title": opts.labels.close}))
|
636
646
|
.appendTo(pnotify.container);
|
637
647
|
if (!opts.closer || opts.nonblock)
|
638
648
|
pnotify.closer.css("display", "none");
|
@@ -653,7 +663,7 @@
|
|
653
663
|
.bind("pnotify_icon", function(){
|
654
664
|
$(this).children().removeClass(styles.pin_up+" "+styles.pin_down).addClass(opts.hide ? styles.pin_up : styles.pin_down);
|
655
665
|
})
|
656
|
-
.append($("<span />", {"class": styles.pin_up}))
|
666
|
+
.append($("<span />", {"class": styles.pin_up, "title": opts.labels.stick}))
|
657
667
|
.appendTo(pnotify.container);
|
658
668
|
if (!opts.sticker || opts.nonblock)
|
659
669
|
pnotify.sticker.css("display", "none");
|
@@ -729,10 +739,10 @@
|
|
729
739
|
history_menu.animate({top: "-"+history_handle_top+"px"}, {duration: 100, queue: false});
|
730
740
|
}
|
731
741
|
})
|
732
|
-
.append($("<div />", {"class": "ui-pnotify-history-header", "text":
|
742
|
+
.append($("<div />", {"class": "ui-pnotify-history-header", "text": opts.labels.redisplay}))
|
733
743
|
.append($("<button />", {
|
734
744
|
"class": "ui-pnotify-history-all "+styles.hi_btn,
|
735
|
-
"text":
|
745
|
+
"text": opts.labels.all,
|
736
746
|
"mouseenter": function(){
|
737
747
|
$(this).addClass(styles.hi_btnhov);
|
738
748
|
},
|
@@ -755,7 +765,7 @@
|
|
755
765
|
}))
|
756
766
|
.append($("<button />", {
|
757
767
|
"class": "ui-pnotify-history-last "+styles.hi_btn,
|
758
|
-
"text":
|
768
|
+
"text": opts.labels.last,
|
759
769
|
"mouseenter": function(){
|
760
770
|
$(this).addClass(styles.hi_btnhov);
|
761
771
|
},
|
@@ -806,7 +816,8 @@
|
|
806
816
|
opts.stack.animation = false;
|
807
817
|
|
808
818
|
// Display the notice.
|
809
|
-
|
819
|
+
if (opts.auto_display)
|
820
|
+
pnotify.pnotify_display();
|
810
821
|
|
811
822
|
return pnotify;
|
812
823
|
}
|
@@ -850,7 +861,7 @@
|
|
850
861
|
this.fireEvent(e, event_object);
|
851
862
|
}
|
852
863
|
};
|
853
|
-
|
864
|
+
|
854
865
|
$.pnotify.defaults = {
|
855
866
|
// The notice's title.
|
856
867
|
title: false,
|
@@ -872,6 +883,10 @@
|
|
872
883
|
nonblock_opacity: .2,
|
873
884
|
// Display a pull down menu to redisplay previous notices, and place the notice in the history.
|
874
885
|
history: true,
|
886
|
+
// Maximum number of notifications to have onscreen
|
887
|
+
maxonscreen: Infinity,
|
888
|
+
// Display the notice when it is created. Turn this off to add notifications to the history without displaying them.
|
889
|
+
auto_display: true,
|
875
890
|
// Width of the notice.
|
876
891
|
width: "300px",
|
877
892
|
// Minimum height of the notice. It will expand to fit content.
|
@@ -884,6 +899,8 @@
|
|
884
899
|
animation: "fade",
|
885
900
|
// Speed at which the notice animates in and out. "slow", "def" or "normal", "fast" or number of milliseconds.
|
886
901
|
animate_speed: "slow",
|
902
|
+
// Specify a specific duration of position animation
|
903
|
+
position_animate_speed: 500,
|
887
904
|
// Opacity of the notice.
|
888
905
|
opacity: 1,
|
889
906
|
// Display a drop shadow.
|
@@ -907,6 +924,14 @@
|
|
907
924
|
// Change new lines to br tags.
|
908
925
|
insert_brs: true,
|
909
926
|
// The stack on which the notices will be placed. Also controls the direction the notices stack.
|
910
|
-
stack: {"dir1": "down", "dir2": "left", "push": "bottom", "spacing1": 25, "spacing2": 25}
|
927
|
+
stack: {"dir1": "down", "dir2": "left", "push": "bottom", "spacing1": 25, "spacing2": 25},
|
928
|
+
//Lets you change the displayed text, facilitating the internationalization.
|
929
|
+
labels: {
|
930
|
+
redisplay: "Redisplay",
|
931
|
+
all: "All",
|
932
|
+
last: "Last",
|
933
|
+
close: "Close",
|
934
|
+
stick: "Stick"
|
935
|
+
}
|
911
936
|
};
|
912
|
-
})(jQuery);
|
937
|
+
})(jQuery);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
Document : jquery.pnotify.default.css
|
3
3
|
Created on : Nov 23, 2009, 3:14:10 PM
|
4
4
|
Author : Hunter Perrin
|
5
|
-
Version : 1.2.
|
5
|
+
Version : 1.2.2
|
6
6
|
Link : http://pinesframework.org/pnotify/
|
7
7
|
Description:
|
8
8
|
Default styling for Pines Notify jQuery plugin.
|
@@ -71,6 +71,7 @@ z-index: 10000;
|
|
71
71
|
}
|
72
72
|
.ui-pnotify-history-container .ui-pnotify-history-header {
|
73
73
|
padding: 2px;
|
74
|
+
text-align: center;
|
74
75
|
}
|
75
76
|
.ui-pnotify-history-container button {
|
76
77
|
cursor: pointer;
|
@@ -80,4 +81,13 @@ width: 100%;
|
|
80
81
|
.ui-pnotify-history-container .ui-pnotify-history-pulldown {
|
81
82
|
display: block;
|
82
83
|
margin: 0 auto;
|
84
|
+
}
|
85
|
+
/* Alternate stack initial positioning. */
|
86
|
+
.ui-pnotify.stack-topleft, .ui-pnotify.stack-bottomleft {
|
87
|
+
left: 25px;
|
88
|
+
right: auto;
|
89
|
+
}
|
90
|
+
.ui-pnotify.stack-bottomright, .ui-pnotify.stack-bottomleft {
|
91
|
+
bottom: 25px;
|
92
|
+
top: auto;
|
83
93
|
}
|
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pnotify-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
5
|
-
prerelease:
|
4
|
+
version: 1.2.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Navin Peiris
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date: 2013-
|
11
|
+
date: 2013-08-11 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: Pines Notify for Rails 3.1 Asset Pipeline
|
15
14
|
email:
|
@@ -34,27 +33,26 @@ files:
|
|
34
33
|
- vendor/assets/stylesheets/jquery.pnotify.default.icons.css
|
35
34
|
homepage: https://github.com/navinpeiris/pnotify-rails
|
36
35
|
licenses: []
|
36
|
+
metadata: {}
|
37
37
|
post_install_message:
|
38
38
|
rdoc_options: []
|
39
39
|
require_paths:
|
40
40
|
- lib
|
41
41
|
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
-
none: false
|
43
42
|
requirements:
|
44
|
-
- -
|
43
|
+
- - '>='
|
45
44
|
- !ruby/object:Gem::Version
|
46
45
|
version: '0'
|
47
46
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
48
|
-
none: false
|
49
47
|
requirements:
|
50
|
-
- -
|
48
|
+
- - '>='
|
51
49
|
- !ruby/object:Gem::Version
|
52
50
|
version: '0'
|
53
51
|
requirements: []
|
54
52
|
rubyforge_project:
|
55
|
-
rubygems_version:
|
53
|
+
rubygems_version: 2.0.5
|
56
54
|
signing_key:
|
57
|
-
specification_version:
|
55
|
+
specification_version: 4
|
58
56
|
summary: Pines Notify is a JavaScript notification plugin developed by Hunter Perrin
|
59
57
|
integrated for Rails 3.1 Asset Pipeline
|
60
58
|
test_files: []
|