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.
- checksums.yaml +4 -4
- data/README.md +11 -0
- data/lib/noty-rails/version.rb +1 -1
- data/noty-rails.gemspec +5 -0
- data/vendor/assets/javascripts/noty/jquery.noty.js +93 -61
- data/vendor/assets/javascripts/noty/layouts/bottom.js +30 -34
- data/vendor/assets/javascripts/noty/layouts/bottomCenter.js +35 -38
- data/vendor/assets/javascripts/noty/layouts/bottomLeft.js +34 -38
- data/vendor/assets/javascripts/noty/layouts/bottomRight.js +34 -38
- data/vendor/assets/javascripts/noty/layouts/center.js +47 -51
- data/vendor/assets/javascripts/noty/layouts/centerLeft.js +51 -55
- data/vendor/assets/javascripts/noty/layouts/centerRight.js +51 -55
- data/vendor/assets/javascripts/noty/layouts/inline.js +27 -31
- data/vendor/assets/javascripts/noty/layouts/top.js +30 -34
- data/vendor/assets/javascripts/noty/layouts/topCenter.js +35 -39
- data/vendor/assets/javascripts/noty/layouts/topLeft.js +34 -38
- data/vendor/assets/javascripts/noty/layouts/topRight.js +34 -38
- data/vendor/assets/javascripts/noty/packaged/jquery.noty.packaged.js +912 -774
- data/vendor/assets/javascripts/noty/packaged/jquery.noty.packaged.min.js +1 -10
- data/vendor/assets/javascripts/noty/themes/bootstrap.js +54 -58
- data/vendor/assets/javascripts/noty/themes/default.js +171 -175
- data/vendor/assets/javascripts/noty/themes/relax.js +151 -0
- metadata +6 -4
@@ -0,0 +1,151 @@
|
|
1
|
+
$.noty.themes.relax = {
|
2
|
+
name : 'relax',
|
3
|
+
helpers : {},
|
4
|
+
modal : {
|
5
|
+
css: {
|
6
|
+
position : 'fixed',
|
7
|
+
width : '100%',
|
8
|
+
height : '100%',
|
9
|
+
backgroundColor: '#000',
|
10
|
+
zIndex : 10000,
|
11
|
+
opacity : 0.6,
|
12
|
+
display : 'none',
|
13
|
+
left : 0,
|
14
|
+
top : 0
|
15
|
+
}
|
16
|
+
},
|
17
|
+
style : function() {
|
18
|
+
|
19
|
+
this.$bar.css({
|
20
|
+
overflow : 'hidden',
|
21
|
+
margin : '4px 0',
|
22
|
+
borderRadius: '2px'
|
23
|
+
});
|
24
|
+
|
25
|
+
this.$message.css({
|
26
|
+
fontSize : '14px',
|
27
|
+
lineHeight: '16px',
|
28
|
+
textAlign : 'center',
|
29
|
+
padding : '10px',
|
30
|
+
width : 'auto',
|
31
|
+
position : 'relative'
|
32
|
+
});
|
33
|
+
|
34
|
+
this.$closeButton.css({
|
35
|
+
position : 'absolute',
|
36
|
+
top : 4, right: 4,
|
37
|
+
width : 10, height: 10,
|
38
|
+
background: "url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAQAAAAnOwc2AAAAxUlEQVR4AR3MPUoDURSA0e++uSkkOxC3IAOWNtaCIDaChfgXBMEZbQRByxCwk+BasgQRZLSYoLgDQbARxry8nyumPcVRKDfd0Aa8AsgDv1zp6pYd5jWOwhvebRTbzNNEw5BSsIpsj/kurQBnmk7sIFcCF5yyZPDRG6trQhujXYosaFoc+2f1MJ89uc76IND6F9BvlXUdpb6xwD2+4q3me3bysiHvtLYrUJto7PD/ve7LNHxSg/woN2kSz4txasBdhyiz3ugPGetTjm3XRokAAAAASUVORK5CYII=)",
|
39
|
+
display : 'none',
|
40
|
+
cursor : 'pointer'
|
41
|
+
});
|
42
|
+
|
43
|
+
this.$buttons.css({
|
44
|
+
padding : 5,
|
45
|
+
textAlign : 'right',
|
46
|
+
borderTop : '1px solid #ccc',
|
47
|
+
backgroundColor: '#fff'
|
48
|
+
});
|
49
|
+
|
50
|
+
this.$buttons.find('button').css({
|
51
|
+
marginLeft: 5
|
52
|
+
});
|
53
|
+
|
54
|
+
this.$buttons.find('button:first').css({
|
55
|
+
marginLeft: 0
|
56
|
+
});
|
57
|
+
|
58
|
+
this.$bar.on({
|
59
|
+
mouseenter: function() {
|
60
|
+
$(this).find('.noty_close').stop().fadeTo('normal', 1);
|
61
|
+
},
|
62
|
+
mouseleave: function() {
|
63
|
+
$(this).find('.noty_close').stop().fadeTo('normal', 0);
|
64
|
+
}
|
65
|
+
});
|
66
|
+
|
67
|
+
switch(this.options.layout.name) {
|
68
|
+
case 'top':
|
69
|
+
this.$bar.css({
|
70
|
+
borderBottom: '2px solid #eee',
|
71
|
+
borderLeft : '2px solid #eee',
|
72
|
+
borderRight : '2px solid #eee',
|
73
|
+
borderTop : '2px solid #eee',
|
74
|
+
boxShadow : "0 2px 4px rgba(0, 0, 0, 0.1)"
|
75
|
+
});
|
76
|
+
break;
|
77
|
+
case 'topCenter':
|
78
|
+
case 'center':
|
79
|
+
case 'bottomCenter':
|
80
|
+
case 'inline':
|
81
|
+
this.$bar.css({
|
82
|
+
border : '1px solid #eee',
|
83
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
84
|
+
});
|
85
|
+
this.$message.css({fontSize: '13px', textAlign: 'center'});
|
86
|
+
break;
|
87
|
+
case 'topLeft':
|
88
|
+
case 'topRight':
|
89
|
+
case 'bottomLeft':
|
90
|
+
case 'bottomRight':
|
91
|
+
case 'centerLeft':
|
92
|
+
case 'centerRight':
|
93
|
+
this.$bar.css({
|
94
|
+
border : '1px solid #eee',
|
95
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
96
|
+
});
|
97
|
+
this.$message.css({fontSize: '13px', textAlign: 'left'});
|
98
|
+
break;
|
99
|
+
case 'bottom':
|
100
|
+
this.$bar.css({
|
101
|
+
borderTop : '2px solid #eee',
|
102
|
+
borderLeft : '2px solid #eee',
|
103
|
+
borderRight : '2px solid #eee',
|
104
|
+
borderBottom: '2px solid #eee',
|
105
|
+
boxShadow : "0 -2px 4px rgba(0, 0, 0, 0.1)"
|
106
|
+
});
|
107
|
+
break;
|
108
|
+
default:
|
109
|
+
this.$bar.css({
|
110
|
+
border : '2px solid #eee',
|
111
|
+
boxShadow: "0 2px 4px rgba(0, 0, 0, 0.1)"
|
112
|
+
});
|
113
|
+
break;
|
114
|
+
}
|
115
|
+
|
116
|
+
switch(this.options.type) {
|
117
|
+
case 'alert':
|
118
|
+
case 'notification':
|
119
|
+
this.$bar.css({backgroundColor: '#FFF', borderColor: '#dedede', color: '#444'});
|
120
|
+
break;
|
121
|
+
case 'warning':
|
122
|
+
this.$bar.css({backgroundColor: '#FFEAA8', borderColor: '#FFC237', color: '#826200'});
|
123
|
+
this.$buttons.css({borderTop: '1px solid #FFC237'});
|
124
|
+
break;
|
125
|
+
case 'error':
|
126
|
+
this.$bar.css({backgroundColor: '#FF8181', borderColor: '#e25353', color: '#FFF'});
|
127
|
+
this.$message.css({fontWeight: 'bold'});
|
128
|
+
this.$buttons.css({borderTop: '1px solid darkred'});
|
129
|
+
break;
|
130
|
+
case 'information':
|
131
|
+
this.$bar.css({backgroundColor: '#78C5E7', borderColor: '#3badd6', color: '#FFF'});
|
132
|
+
this.$buttons.css({borderTop: '1px solid #0B90C4'});
|
133
|
+
break;
|
134
|
+
case 'success':
|
135
|
+
this.$bar.css({backgroundColor: '#BCF5BC', borderColor: '#7cdd77', color: 'darkgreen'});
|
136
|
+
this.$buttons.css({borderTop: '1px solid #50C24E'});
|
137
|
+
break;
|
138
|
+
default:
|
139
|
+
this.$bar.css({backgroundColor: '#FFF', borderColor: '#CCC', color: '#444'});
|
140
|
+
break;
|
141
|
+
}
|
142
|
+
},
|
143
|
+
callback: {
|
144
|
+
onShow : function() {
|
145
|
+
|
146
|
+
},
|
147
|
+
onClose: function() {
|
148
|
+
|
149
|
+
}
|
150
|
+
}
|
151
|
+
};
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: noty-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PikachuEXE
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: This gem provides Noty, a jQuery Notification Plugin, for your Rails
|
14
14
|
application.
|
@@ -43,11 +43,13 @@ files:
|
|
43
43
|
- vendor/assets/javascripts/noty/promise.js
|
44
44
|
- vendor/assets/javascripts/noty/themes/bootstrap.js
|
45
45
|
- vendor/assets/javascripts/noty/themes/default.js
|
46
|
+
- vendor/assets/javascripts/noty/themes/relax.js
|
46
47
|
homepage: https://github.com/noty/noty-rails
|
47
48
|
licenses:
|
48
49
|
- MIT
|
49
50
|
metadata: {}
|
50
|
-
post_install_message:
|
51
|
+
post_install_message: "\n This gem is deprecated.\n Please read the deprecation
|
52
|
+
note on README.\n "
|
51
53
|
rdoc_options: []
|
52
54
|
require_paths:
|
53
55
|
- lib
|
@@ -63,7 +65,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
63
65
|
version: '0'
|
64
66
|
requirements: []
|
65
67
|
rubyforge_project:
|
66
|
-
rubygems_version: 2.
|
68
|
+
rubygems_version: 2.4.3
|
67
69
|
signing_key:
|
68
70
|
specification_version: 4
|
69
71
|
summary: Noty asset pipeline provider/wrapper
|