noty-rails 2.2.2 → 2.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -0
- data/lib/noty-rails/version.rb +1 -1
- data/vendor/assets/javascripts/noty/jquery.noty.js +180 -166
- data/vendor/assets/javascripts/noty/layouts/bottom.js +30 -30
- data/vendor/assets/javascripts/noty/layouts/bottomCenter.js +35 -35
- data/vendor/assets/javascripts/noty/layouts/bottomLeft.js +38 -38
- data/vendor/assets/javascripts/noty/layouts/bottomRight.js +38 -38
- data/vendor/assets/javascripts/noty/layouts/center.js +51 -50
- data/vendor/assets/javascripts/noty/layouts/centerLeft.js +53 -52
- data/vendor/assets/javascripts/noty/layouts/centerRight.js +53 -52
- data/vendor/assets/javascripts/noty/layouts/inline.js +27 -27
- data/vendor/assets/javascripts/noty/layouts/top.js +30 -30
- data/vendor/assets/javascripts/noty/layouts/topCenter.js +35 -35
- data/vendor/assets/javascripts/noty/layouts/topLeft.js +38 -38
- data/vendor/assets/javascripts/noty/layouts/topRight.js +38 -38
- data/vendor/assets/javascripts/noty/packaged/jquery.noty.packaged.js +879 -767
- data/vendor/assets/javascripts/noty/packaged/jquery.noty.packaged.min.js +10 -1
- data/vendor/assets/javascripts/noty/themes/bootstrap.js +62 -0
- data/vendor/assets/javascripts/noty/themes/default.js +175 -143
- metadata +6 -5
@@ -1,16 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
Object.create = function (o) {
|
1
|
+
/*!
|
2
|
+
@package noty - jQuery Notification Plugin
|
3
|
+
@version version: 2.2.9
|
4
|
+
@contributors https://github.com/needim/noty/graphs/contributors
|
5
|
+
|
6
|
+
@documentation Examples and Documentation - http://needim.github.com/noty/
|
7
|
+
|
8
|
+
@license Licensed under the MIT licenses: http://www.opensource.org/licenses/mit-license.php
|
9
|
+
*/
|
10
|
+
|
11
|
+
if(typeof Object.create !== 'function') {
|
12
|
+
Object.create = function(o) {
|
14
13
|
function F() {
|
15
14
|
}
|
16
15
|
|
@@ -19,21 +18,21 @@ if (typeof Object.create !== 'function') {
|
|
19
18
|
};
|
20
19
|
}
|
21
20
|
|
22
|
-
(function
|
21
|
+
(function($) {
|
23
22
|
|
24
23
|
var NotyObject = {
|
25
24
|
|
26
|
-
init:function
|
25
|
+
init: function(options) {
|
27
26
|
|
28
27
|
// Mix in the passed in options with the default options
|
29
28
|
this.options = $.extend({}, $.noty.defaults, options);
|
30
29
|
|
31
30
|
this.options.layout = (this.options.custom) ? $.noty.layouts['inline'] : $.noty.layouts[this.options.layout];
|
32
31
|
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
32
|
+
if($.noty.themes[this.options.theme])
|
33
|
+
this.options.theme = $.noty.themes[this.options.theme];
|
34
|
+
else
|
35
|
+
options.themeClassName = this.options.theme;
|
37
36
|
|
38
37
|
delete options.layout;
|
39
38
|
delete options.theme;
|
@@ -50,7 +49,7 @@ if (typeof Object.create !== 'function') {
|
|
50
49
|
return this;
|
51
50
|
}, // end init
|
52
51
|
|
53
|
-
_build:function
|
52
|
+
_build: function() {
|
54
53
|
|
55
54
|
// Generating noty bar
|
56
55
|
var $bar = $('<div class="noty_bar noty_type_' + this.options.type + '"></div>').attr('id', this.options.id);
|
@@ -58,11 +57,11 @@ if (typeof Object.create !== 'function') {
|
|
58
57
|
|
59
58
|
this.$bar = (this.options.layout.parent.object !== null) ? $(this.options.layout.parent.object).css(this.options.layout.parent.css).append($bar) : $bar;
|
60
59
|
|
61
|
-
|
62
|
-
|
60
|
+
if(this.options.themeClassName)
|
61
|
+
this.$bar.addClass(this.options.themeClassName).addClass('noty_container_type_' + this.options.type);
|
63
62
|
|
64
63
|
// Set buttons if available
|
65
|
-
if
|
64
|
+
if(this.options.buttons) {
|
66
65
|
|
67
66
|
// If we have button disable closeWith & timeout options
|
68
67
|
this.options.closeWith = [];
|
@@ -74,11 +73,11 @@ if (typeof Object.create !== 'function') {
|
|
74
73
|
|
75
74
|
var self = this;
|
76
75
|
|
77
|
-
$.each(this.options.buttons, function
|
76
|
+
$.each(this.options.buttons, function(i, button) {
|
78
77
|
var $button = $('<button/>').addClass((button.addClass) ? button.addClass : 'gray').html(button.text).attr('id', button.id ? button.id : 'button-' + i)
|
79
78
|
.appendTo(self.$bar.find('.noty_buttons'))
|
80
|
-
.
|
81
|
-
if
|
79
|
+
.on('click', function() {
|
80
|
+
if($.isFunction(button.onClick)) {
|
82
81
|
button.onClick.call($button, self);
|
83
82
|
}
|
84
83
|
});
|
@@ -94,14 +93,14 @@ if (typeof Object.create !== 'function') {
|
|
94
93
|
|
95
94
|
}, // end _build
|
96
95
|
|
97
|
-
show:function
|
96
|
+
show: function() {
|
98
97
|
|
99
98
|
var self = this;
|
100
99
|
|
101
|
-
|
100
|
+
(self.options.custom) ? self.options.custom.find(self.options.layout.container.selector).append(self.$bar) : $(self.options.layout.container.selector).append(self.$bar);
|
102
101
|
|
103
|
-
|
104
|
-
|
102
|
+
if(self.options.theme && self.options.theme.style)
|
103
|
+
self.options.theme.style.apply(self);
|
105
104
|
|
106
105
|
($.type(self.options.layout.css) === 'function') ? this.options.layout.css.apply(self.$bar) : self.$bar.css(this.options.layout.css || {});
|
107
106
|
|
@@ -111,48 +110,48 @@ if (typeof Object.create !== 'function') {
|
|
111
110
|
|
112
111
|
self.showing = true;
|
113
112
|
|
114
|
-
|
115
|
-
|
113
|
+
if(self.options.theme && self.options.theme.style)
|
114
|
+
self.options.theme.callback.onShow.apply(this);
|
116
115
|
|
117
|
-
if
|
118
|
-
self.$bar.css('cursor', 'pointer').one('click', function
|
116
|
+
if($.inArray('click', self.options.closeWith) > -1)
|
117
|
+
self.$bar.css('cursor', 'pointer').one('click', function(evt) {
|
119
118
|
self.stopPropagation(evt);
|
120
|
-
if
|
119
|
+
if(self.options.callback.onCloseClick) {
|
121
120
|
self.options.callback.onCloseClick.apply(self);
|
122
121
|
}
|
123
122
|
self.close();
|
124
123
|
});
|
125
124
|
|
126
|
-
if
|
127
|
-
self.$bar.one('mouseenter', function
|
125
|
+
if($.inArray('hover', self.options.closeWith) > -1)
|
126
|
+
self.$bar.one('mouseenter', function() {
|
128
127
|
self.close();
|
129
128
|
});
|
130
129
|
|
131
|
-
if
|
132
|
-
self.$closeButton.one('click', function
|
130
|
+
if($.inArray('button', self.options.closeWith) > -1)
|
131
|
+
self.$closeButton.one('click', function(evt) {
|
133
132
|
self.stopPropagation(evt);
|
134
133
|
self.close();
|
135
134
|
});
|
136
135
|
|
137
|
-
if
|
136
|
+
if($.inArray('button', self.options.closeWith) == -1)
|
138
137
|
self.$closeButton.remove();
|
139
138
|
|
140
|
-
if
|
139
|
+
if(self.options.callback.onShow)
|
141
140
|
self.options.callback.onShow.apply(self);
|
142
141
|
|
143
142
|
self.$bar.animate(
|
144
143
|
self.options.animation.open,
|
145
144
|
self.options.animation.speed,
|
146
145
|
self.options.animation.easing,
|
147
|
-
function
|
148
|
-
if
|
146
|
+
function() {
|
147
|
+
if(self.options.callback.afterShow) self.options.callback.afterShow.apply(self);
|
149
148
|
self.showing = false;
|
150
149
|
self.shown = true;
|
151
150
|
});
|
152
151
|
|
153
152
|
// If noty is have a timeout option
|
154
|
-
if
|
155
|
-
self.$bar.delay(self.options.timeout).promise().done(function
|
153
|
+
if(self.options.timeout)
|
154
|
+
self.$bar.delay(self.options.timeout).promise().done(function() {
|
156
155
|
self.close();
|
157
156
|
});
|
158
157
|
|
@@ -160,26 +159,28 @@ if (typeof Object.create !== 'function') {
|
|
160
159
|
|
161
160
|
}, // end show
|
162
161
|
|
163
|
-
close:function
|
162
|
+
close: function() {
|
164
163
|
|
165
|
-
if
|
166
|
-
if
|
164
|
+
if(this.closed) return;
|
165
|
+
if(this.$bar && this.$bar.hasClass('i-am-closing-now')) return;
|
167
166
|
|
168
167
|
var self = this;
|
169
168
|
|
170
|
-
if
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
169
|
+
if(this.showing) {
|
170
|
+
self.$bar.queue(
|
171
|
+
function() {
|
172
|
+
self.close.apply(self);
|
173
|
+
}
|
174
|
+
);
|
175
|
+
return;
|
177
176
|
}
|
178
177
|
|
179
|
-
|
178
|
+
this.$bar.dequeue();
|
179
|
+
|
180
|
+
if(!this.shown && !this.showing) { // If we are still waiting in the queue just delete from queue
|
180
181
|
var queue = [];
|
181
|
-
$.each($.noty.queue, function
|
182
|
-
if
|
182
|
+
$.each($.noty.queue, function(i, n) {
|
183
|
+
if(n.options.id != self.options.id) {
|
183
184
|
queue.push(n);
|
184
185
|
}
|
185
186
|
});
|
@@ -189,7 +190,7 @@ if (typeof Object.create !== 'function') {
|
|
189
190
|
|
190
191
|
self.$bar.addClass('i-am-closing-now');
|
191
192
|
|
192
|
-
if
|
193
|
+
if(self.options.callback.onClose) {
|
193
194
|
self.options.callback.onClose.apply(self);
|
194
195
|
}
|
195
196
|
|
@@ -197,25 +198,25 @@ if (typeof Object.create !== 'function') {
|
|
197
198
|
self.options.animation.close,
|
198
199
|
self.options.animation.speed,
|
199
200
|
self.options.animation.easing,
|
200
|
-
function
|
201
|
-
if
|
201
|
+
function() {
|
202
|
+
if(self.options.callback.afterClose) self.options.callback.afterClose.apply(self);
|
202
203
|
})
|
203
|
-
.promise().done(function
|
204
|
+
.promise().done(function() {
|
204
205
|
|
205
206
|
// Modal Cleaning
|
206
|
-
if
|
207
|
+
if(self.options.modal) {
|
207
208
|
$.notyRenderer.setModalCount(-1);
|
208
|
-
if
|
209
|
+
if($.notyRenderer.getModalCount() == 0) $('.noty_modal').fadeOut('fast', function() {
|
209
210
|
$(this).remove();
|
210
211
|
});
|
211
212
|
}
|
212
213
|
|
213
214
|
// Layout Cleaning
|
214
215
|
$.notyRenderer.setLayoutCountFor(self, -1);
|
215
|
-
if
|
216
|
+
if($.notyRenderer.getLayoutCountFor(self) == 0) $(self.options.layout.container.selector).remove();
|
216
217
|
|
217
218
|
// Make sure self.$bar has not been removed before attempting to remove it
|
218
|
-
if
|
219
|
+
if(typeof self.$bar !== 'undefined' && self.$bar !== null) {
|
219
220
|
self.$bar.remove();
|
220
221
|
self.$bar = null;
|
221
222
|
self.closed = true;
|
@@ -227,30 +228,30 @@ if (typeof Object.create !== 'function') {
|
|
227
228
|
self.options.theme.callback.onClose.apply(self);
|
228
229
|
}
|
229
230
|
|
230
|
-
if
|
231
|
+
if(!self.options.dismissQueue) {
|
231
232
|
// Queue render
|
232
233
|
$.noty.ontap = true;
|
233
234
|
|
234
235
|
$.notyRenderer.render();
|
235
236
|
}
|
236
237
|
|
237
|
-
|
238
|
-
|
239
|
-
|
238
|
+
if(self.options.maxVisible > 0 && self.options.dismissQueue) {
|
239
|
+
$.notyRenderer.render();
|
240
|
+
}
|
240
241
|
})
|
241
242
|
|
242
243
|
}, // end close
|
243
244
|
|
244
|
-
setText:function
|
245
|
-
if
|
245
|
+
setText: function(text) {
|
246
|
+
if(!this.closed) {
|
246
247
|
this.options.text = text;
|
247
248
|
this.$bar.find('.noty_text').html(text);
|
248
249
|
}
|
249
250
|
return this;
|
250
251
|
},
|
251
252
|
|
252
|
-
setType:function
|
253
|
-
if
|
253
|
+
setType: function(type) {
|
254
|
+
if(!this.closed) {
|
254
255
|
this.options.type = type;
|
255
256
|
this.options.theme.style.apply(this);
|
256
257
|
this.options.theme.callback.onShow.apply(this);
|
@@ -258,41 +259,42 @@ if (typeof Object.create !== 'function') {
|
|
258
259
|
return this;
|
259
260
|
},
|
260
261
|
|
261
|
-
setTimeout:function
|
262
|
-
if
|
262
|
+
setTimeout: function(time) {
|
263
|
+
if(!this.closed) {
|
263
264
|
var self = this;
|
264
265
|
this.options.timeout = time;
|
265
|
-
self.$bar.delay(self.options.timeout).promise().done(function
|
266
|
+
self.$bar.delay(self.options.timeout).promise().done(function() {
|
266
267
|
self.close();
|
267
268
|
});
|
268
269
|
}
|
269
270
|
return this;
|
270
271
|
},
|
271
272
|
|
272
|
-
stopPropagation:function
|
273
|
+
stopPropagation: function(evt) {
|
273
274
|
evt = evt || window.event;
|
274
|
-
if
|
275
|
+
if(typeof evt.stopPropagation !== "undefined") {
|
275
276
|
evt.stopPropagation();
|
276
|
-
}
|
277
|
+
}
|
278
|
+
else {
|
277
279
|
evt.cancelBubble = true;
|
278
280
|
}
|
279
281
|
},
|
280
282
|
|
281
|
-
closed:false,
|
282
|
-
showing:false,
|
283
|
-
shown:false
|
283
|
+
closed : false,
|
284
|
+
showing: false,
|
285
|
+
shown : false
|
284
286
|
|
285
287
|
}; // end NotyObject
|
286
288
|
|
287
289
|
$.notyRenderer = {};
|
288
290
|
|
289
|
-
$.notyRenderer.init = function
|
291
|
+
$.notyRenderer.init = function(options) {
|
290
292
|
|
291
293
|
// Renderer creates a new noty
|
292
294
|
var notification = Object.create(NotyObject).init(options);
|
293
295
|
|
294
|
-
|
295
|
-
|
296
|
+
if(notification.options.killer)
|
297
|
+
$.noty.closeAll();
|
296
298
|
|
297
299
|
(notification.options.force) ? $.noty.queue.unshift(notification) : $.noty.queue.push(notification);
|
298
300
|
|
@@ -301,89 +303,101 @@ if (typeof Object.create !== 'function') {
|
|
301
303
|
return ($.noty.returns == 'object') ? notification : notification.options.id;
|
302
304
|
};
|
303
305
|
|
304
|
-
$.notyRenderer.render = function
|
306
|
+
$.notyRenderer.render = function() {
|
305
307
|
|
306
308
|
var instance = $.noty.queue[0];
|
307
309
|
|
308
|
-
if
|
309
|
-
if
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
310
|
+
if($.type(instance) === 'object') {
|
311
|
+
if(instance.options.dismissQueue) {
|
312
|
+
if(instance.options.maxVisible > 0) {
|
313
|
+
if($(instance.options.layout.container.selector + ' li').length < instance.options.maxVisible) {
|
314
|
+
$.notyRenderer.show($.noty.queue.shift());
|
315
|
+
}
|
316
|
+
else {
|
317
|
+
|
318
|
+
}
|
319
|
+
}
|
320
|
+
else {
|
321
|
+
$.notyRenderer.show($.noty.queue.shift());
|
322
|
+
}
|
323
|
+
}
|
324
|
+
else {
|
325
|
+
if($.noty.ontap) {
|
321
326
|
$.notyRenderer.show($.noty.queue.shift());
|
322
327
|
$.noty.ontap = false;
|
323
328
|
}
|
324
329
|
}
|
325
|
-
}
|
330
|
+
}
|
331
|
+
else {
|
326
332
|
$.noty.ontap = true; // Queue is over
|
327
333
|
}
|
328
334
|
|
329
335
|
};
|
330
336
|
|
331
|
-
$.notyRenderer.show = function
|
337
|
+
$.notyRenderer.show = function(notification) {
|
332
338
|
|
333
|
-
if
|
339
|
+
if(notification.options.modal) {
|
334
340
|
$.notyRenderer.createModalFor(notification);
|
335
341
|
$.notyRenderer.setModalCount(+1);
|
336
342
|
}
|
337
343
|
|
338
344
|
// Where is the container?
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
345
|
+
if(notification.options.custom) {
|
346
|
+
if(notification.options.custom.find(notification.options.layout.container.selector).length == 0) {
|
347
|
+
notification.options.custom.append($(notification.options.layout.container.object).addClass('i-am-new'));
|
348
|
+
}
|
349
|
+
else {
|
350
|
+
notification.options.custom.find(notification.options.layout.container.selector).removeClass('i-am-new');
|
351
|
+
}
|
352
|
+
}
|
353
|
+
else {
|
354
|
+
if($(notification.options.layout.container.selector).length == 0) {
|
355
|
+
$('body').append($(notification.options.layout.container.object).addClass('i-am-new'));
|
356
|
+
}
|
357
|
+
else {
|
358
|
+
$(notification.options.layout.container.selector).removeClass('i-am-new');
|
359
|
+
}
|
360
|
+
}
|
352
361
|
|
353
362
|
$.notyRenderer.setLayoutCountFor(notification, +1);
|
354
363
|
|
355
364
|
notification.show();
|
356
365
|
};
|
357
366
|
|
358
|
-
$.notyRenderer.createModalFor = function
|
359
|
-
if
|
360
|
-
|
367
|
+
$.notyRenderer.createModalFor = function(notification) {
|
368
|
+
if($('.noty_modal').length == 0) {
|
369
|
+
var modal = $('<div/>').addClass('noty_modal').addClass(notification.options.theme).data('noty_modal_count', 0);
|
361
370
|
|
362
|
-
|
363
|
-
|
371
|
+
if(notification.options.theme.modal && notification.options.theme.modal.css)
|
372
|
+
modal.css(notification.options.theme.modal.css);
|
364
373
|
|
365
|
-
|
366
|
-
|
374
|
+
modal.prependTo($('body')).fadeIn('fast');
|
375
|
+
|
376
|
+
if($.inArray('backdrop', notification.options.closeWith) > -1)
|
377
|
+
modal.on('click', function(e) {
|
378
|
+
$.noty.closeAll();
|
379
|
+
});
|
380
|
+
}
|
367
381
|
};
|
368
382
|
|
369
|
-
$.notyRenderer.getLayoutCountFor = function
|
383
|
+
$.notyRenderer.getLayoutCountFor = function(notification) {
|
370
384
|
return $(notification.options.layout.container.selector).data('noty_layout_count') || 0;
|
371
385
|
};
|
372
386
|
|
373
|
-
$.notyRenderer.setLayoutCountFor = function
|
387
|
+
$.notyRenderer.setLayoutCountFor = function(notification, arg) {
|
374
388
|
return $(notification.options.layout.container.selector).data('noty_layout_count', $.notyRenderer.getLayoutCountFor(notification) + arg);
|
375
389
|
};
|
376
390
|
|
377
|
-
$.notyRenderer.getModalCount = function
|
391
|
+
$.notyRenderer.getModalCount = function() {
|
378
392
|
return $('.noty_modal').data('noty_modal_count') || 0;
|
379
393
|
};
|
380
394
|
|
381
|
-
$.notyRenderer.setModalCount = function
|
395
|
+
$.notyRenderer.setModalCount = function(arg) {
|
382
396
|
return $('.noty_modal').data('noty_modal_count', $.notyRenderer.getModalCount() + arg);
|
383
397
|
};
|
384
398
|
|
385
399
|
// This is for custom container
|
386
|
-
$.fn.noty = function
|
400
|
+
$.fn.noty = function(options) {
|
387
401
|
options.custom = $(this);
|
388
402
|
return $.notyRenderer.init(options);
|
389
403
|
};
|
@@ -396,86 +410,86 @@ if (typeof Object.create !== 'function') {
|
|
396
410
|
$.noty.returns = 'object';
|
397
411
|
$.noty.store = {};
|
398
412
|
|
399
|
-
$.noty.get = function
|
413
|
+
$.noty.get = function(id) {
|
400
414
|
return $.noty.store.hasOwnProperty(id) ? $.noty.store[id] : false;
|
401
415
|
};
|
402
416
|
|
403
|
-
$.noty.close = function
|
417
|
+
$.noty.close = function(id) {
|
404
418
|
return $.noty.get(id) ? $.noty.get(id).close() : false;
|
405
419
|
};
|
406
420
|
|
407
|
-
$.noty.setText = function
|
421
|
+
$.noty.setText = function(id, text) {
|
408
422
|
return $.noty.get(id) ? $.noty.get(id).setText(text) : false;
|
409
423
|
};
|
410
424
|
|
411
|
-
$.noty.setType = function
|
425
|
+
$.noty.setType = function(id, type) {
|
412
426
|
return $.noty.get(id) ? $.noty.get(id).setType(type) : false;
|
413
427
|
};
|
414
428
|
|
415
|
-
$.noty.clearQueue = function
|
429
|
+
$.noty.clearQueue = function() {
|
416
430
|
$.noty.queue = [];
|
417
431
|
};
|
418
432
|
|
419
|
-
$.noty.closeAll = function
|
433
|
+
$.noty.closeAll = function() {
|
420
434
|
$.noty.clearQueue();
|
421
|
-
$.each($.noty.store, function
|
435
|
+
$.each($.noty.store, function(id, noty) {
|
422
436
|
noty.close();
|
423
437
|
});
|
424
438
|
};
|
425
439
|
|
426
440
|
var windowAlert = window.alert;
|
427
441
|
|
428
|
-
$.noty.consumeAlert = function
|
429
|
-
window.alert = function
|
430
|
-
if
|
442
|
+
$.noty.consumeAlert = function(options) {
|
443
|
+
window.alert = function(text) {
|
444
|
+
if(options)
|
431
445
|
options.text = text;
|
432
446
|
else
|
433
|
-
options = {text:text};
|
447
|
+
options = {text: text};
|
434
448
|
|
435
449
|
$.notyRenderer.init(options);
|
436
450
|
};
|
437
451
|
};
|
438
452
|
|
439
|
-
$.noty.stopConsumeAlert = function
|
453
|
+
$.noty.stopConsumeAlert = function() {
|
440
454
|
window.alert = windowAlert;
|
441
455
|
};
|
442
456
|
|
443
457
|
$.noty.defaults = {
|
444
|
-
layout:'top',
|
445
|
-
theme:'defaultTheme',
|
446
|
-
type:'alert',
|
447
|
-
text:'',
|
448
|
-
dismissQueue:true,
|
449
|
-
template:'<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',
|
450
|
-
animation:{
|
451
|
-
open:{height:'toggle'},
|
452
|
-
close:{height:'toggle'},
|
453
|
-
easing:'swing',
|
454
|
-
speed:500
|
458
|
+
layout : 'top',
|
459
|
+
theme : 'defaultTheme',
|
460
|
+
type : 'alert',
|
461
|
+
text : '',
|
462
|
+
dismissQueue: true,
|
463
|
+
template : '<div class="noty_message"><span class="noty_text"></span><div class="noty_close"></div></div>',
|
464
|
+
animation : {
|
465
|
+
open : {height: 'toggle'},
|
466
|
+
close : {height: 'toggle'},
|
467
|
+
easing: 'swing',
|
468
|
+
speed : 500
|
455
469
|
},
|
456
|
-
timeout:false,
|
457
|
-
force:false,
|
458
|
-
modal:false,
|
459
|
-
maxVisible:5,
|
460
|
-
|
461
|
-
closeWith:['click'],
|
462
|
-
callback:{
|
463
|
-
onShow:function
|
470
|
+
timeout : false,
|
471
|
+
force : false,
|
472
|
+
modal : false,
|
473
|
+
maxVisible : 5,
|
474
|
+
killer : false,
|
475
|
+
closeWith : ['click'],
|
476
|
+
callback : {
|
477
|
+
onShow : function() {
|
464
478
|
},
|
465
|
-
afterShow:function
|
479
|
+
afterShow : function() {
|
466
480
|
},
|
467
|
-
onClose:function
|
481
|
+
onClose : function() {
|
468
482
|
},
|
469
|
-
afterClose:function
|
483
|
+
afterClose : function() {
|
470
484
|
},
|
471
|
-
onCloseClick:function
|
485
|
+
onCloseClick: function() {
|
472
486
|
}
|
473
487
|
},
|
474
|
-
buttons:false
|
488
|
+
buttons : false
|
475
489
|
};
|
476
490
|
|
477
|
-
$(window).resize
|
478
|
-
$.each($.noty.layouts, function
|
491
|
+
$(window).on('resize', function() {
|
492
|
+
$.each($.noty.layouts, function(index, layout) {
|
479
493
|
layout.container.style.apply($(layout.container.selector));
|
480
494
|
});
|
481
495
|
});
|
@@ -489,565 +503,546 @@ window.noty = function noty(options) {
|
|
489
503
|
|
490
504
|
(function($) {
|
491
505
|
|
492
|
-
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
512
|
-
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
|
521
|
-
|
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
|
+
};
|
522
536
|
|
523
537
|
})(jQuery);
|
524
538
|
(function($) {
|
525
539
|
|
526
|
-
|
527
|
-
|
528
|
-
|
540
|
+
$.noty.layouts.bottomCenter = {
|
541
|
+
name : 'bottomCenter',
|
542
|
+
options : { // overrides options
|
529
543
|
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
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
|
+
});
|
560
|
+
|
561
|
+
$(this).css({
|
562
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
|
563
|
+
});
|
564
|
+
}
|
565
|
+
},
|
566
|
+
parent : {
|
567
|
+
object : '<li />',
|
568
|
+
selector: 'li',
|
569
|
+
css : {}
|
570
|
+
},
|
571
|
+
css : {
|
572
|
+
display: 'none',
|
573
|
+
width : '310px'
|
574
|
+
},
|
575
|
+
addClass : ''
|
576
|
+
};
|
563
577
|
|
564
578
|
})(jQuery);
|
565
579
|
|
566
580
|
(function($) {
|
567
581
|
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
|
584
|
-
|
585
|
-
|
586
|
-
|
587
|
-
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
582
|
+
$.noty.layouts.bottomLeft = {
|
583
|
+
name : 'bottomLeft',
|
584
|
+
options : { // overrides options
|
585
|
+
|
586
|
+
},
|
587
|
+
container: {
|
588
|
+
object : '<ul id="noty_bottomLeft_layout_container" />',
|
589
|
+
selector: 'ul#noty_bottomLeft_layout_container',
|
590
|
+
style : function() {
|
591
|
+
$(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
|
601
|
+
});
|
602
|
+
|
603
|
+
if(window.innerWidth < 600) {
|
604
|
+
$(this).css({
|
605
|
+
left: 5
|
606
|
+
});
|
607
|
+
}
|
608
|
+
}
|
609
|
+
},
|
610
|
+
parent : {
|
611
|
+
object : '<li />',
|
612
|
+
selector: 'li',
|
613
|
+
css : {}
|
614
|
+
},
|
615
|
+
css : {
|
616
|
+
display: 'none',
|
617
|
+
width : '310px'
|
618
|
+
},
|
619
|
+
addClass : ''
|
620
|
+
};
|
607
621
|
|
608
622
|
})(jQuery);
|
609
623
|
(function($) {
|
610
624
|
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
625
|
+
$.noty.layouts.bottomRight = {
|
626
|
+
name : 'bottomRight',
|
627
|
+
options : { // overrides options
|
628
|
+
|
629
|
+
},
|
630
|
+
container: {
|
631
|
+
object : '<ul id="noty_bottomRight_layout_container" />',
|
632
|
+
selector: 'ul#noty_bottomRight_layout_container',
|
633
|
+
style : function() {
|
634
|
+
$(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
|
644
|
+
});
|
645
|
+
|
646
|
+
if(window.innerWidth < 600) {
|
647
|
+
$(this).css({
|
648
|
+
right: 5
|
649
|
+
});
|
650
|
+
}
|
651
|
+
}
|
652
|
+
},
|
653
|
+
parent : {
|
654
|
+
object : '<li />',
|
655
|
+
selector: 'li',
|
656
|
+
css : {}
|
657
|
+
},
|
658
|
+
css : {
|
659
|
+
display: 'none',
|
660
|
+
width : '310px'
|
661
|
+
},
|
662
|
+
addClass : ''
|
663
|
+
};
|
650
664
|
|
651
665
|
})(jQuery);
|
652
666
|
(function($) {
|
653
667
|
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
668
|
+
$.noty.layouts.center = {
|
669
|
+
name : 'center',
|
670
|
+
options : { // overrides options
|
671
|
+
|
672
|
+
},
|
673
|
+
container: {
|
674
|
+
object : '<ul id="noty_center_layout_container" />',
|
675
|
+
selector: 'ul#noty_center_layout_container',
|
676
|
+
style : function() {
|
677
|
+
$(this).css({
|
678
|
+
position : 'fixed',
|
679
|
+
width : '310px',
|
680
|
+
height : 'auto',
|
681
|
+
margin : 0,
|
682
|
+
padding : 0,
|
683
|
+
listStyleType: 'none',
|
684
|
+
zIndex : 10000000
|
685
|
+
});
|
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
|
+
}
|
709
|
+
},
|
710
|
+
parent : {
|
711
|
+
object : '<li />',
|
712
|
+
selector: 'li',
|
713
|
+
css : {}
|
714
|
+
},
|
715
|
+
css : {
|
716
|
+
display: 'none',
|
717
|
+
width : '310px'
|
718
|
+
},
|
719
|
+
addClass : ''
|
720
|
+
};
|
706
721
|
|
707
722
|
})(jQuery);
|
708
723
|
(function($) {
|
709
724
|
|
710
|
-
|
711
|
-
|
712
|
-
|
725
|
+
$.noty.layouts.centerLeft = {
|
726
|
+
name : 'centerLeft',
|
727
|
+
options : { // overrides options
|
713
728
|
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
// getting hidden height
|
731
|
-
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
732
|
-
$("body").append(dupe);
|
733
|
-
dupe.find('.i-am-closing-now').remove();
|
734
|
-
dupe.find('li').css('display', 'block');
|
735
|
-
var actual_height = dupe.height();
|
736
|
-
dupe.remove();
|
737
|
-
|
738
|
-
if ($(this).hasClass('i-am-new')) {
|
739
|
-
$(this).css({
|
740
|
-
top: ($(window).height() - actual_height) / 2 + 'px'
|
741
|
-
});
|
742
|
-
} else {
|
743
|
-
$(this).animate({
|
744
|
-
top: ($(window).height() - actual_height) / 2 + 'px'
|
745
|
-
}, 500);
|
746
|
-
}
|
747
|
-
|
748
|
-
if (window.innerWidth < 600) {
|
749
|
-
$(this).css({
|
750
|
-
left: 5
|
751
|
-
});
|
752
|
-
}
|
729
|
+
},
|
730
|
+
container: {
|
731
|
+
object : '<ul id="noty_centerLeft_layout_container" />',
|
732
|
+
selector: 'ul#noty_centerLeft_layout_container',
|
733
|
+
style : function() {
|
734
|
+
$(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
|
743
|
+
});
|
753
744
|
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
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
|
+
}
|
771
|
+
},
|
772
|
+
parent : {
|
773
|
+
object : '<li />',
|
774
|
+
selector: 'li',
|
775
|
+
css : {}
|
776
|
+
},
|
777
|
+
css : {
|
778
|
+
display: 'none',
|
779
|
+
width : '310px'
|
780
|
+
},
|
781
|
+
addClass : ''
|
782
|
+
};
|
767
783
|
|
768
784
|
})(jQuery);
|
769
785
|
|
770
786
|
(function($) {
|
771
787
|
|
772
|
-
|
773
|
-
|
774
|
-
|
788
|
+
$.noty.layouts.centerRight = {
|
789
|
+
name : 'centerRight',
|
790
|
+
options : { // overrides options
|
775
791
|
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
// getting hidden height
|
793
|
-
var dupe = $(this).clone().css({visibility:"hidden", display:"block", position:"absolute", top: 0, left: 0}).attr('id', 'dupe');
|
794
|
-
$("body").append(dupe);
|
795
|
-
dupe.find('.i-am-closing-now').remove();
|
796
|
-
dupe.find('li').css('display', 'block');
|
797
|
-
var actual_height = dupe.height();
|
798
|
-
dupe.remove();
|
799
|
-
|
800
|
-
if ($(this).hasClass('i-am-new')) {
|
801
|
-
$(this).css({
|
802
|
-
top: ($(window).height() - actual_height) / 2 + 'px'
|
803
|
-
});
|
804
|
-
} else {
|
805
|
-
$(this).animate({
|
806
|
-
top: ($(window).height() - actual_height) / 2 + 'px'
|
807
|
-
}, 500);
|
808
|
-
}
|
809
|
-
|
810
|
-
if (window.innerWidth < 600) {
|
811
|
-
$(this).css({
|
812
|
-
right: 5
|
813
|
-
});
|
814
|
-
}
|
792
|
+
},
|
793
|
+
container: {
|
794
|
+
object : '<ul id="noty_centerRight_layout_container" />',
|
795
|
+
selector: 'ul#noty_centerRight_layout_container',
|
796
|
+
style : function() {
|
797
|
+
$(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
|
806
|
+
});
|
815
807
|
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
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
|
+
},
|
835
|
+
parent : {
|
836
|
+
object : '<li />',
|
837
|
+
selector: 'li',
|
838
|
+
css : {}
|
839
|
+
},
|
840
|
+
css : {
|
841
|
+
display: 'none',
|
842
|
+
width : '310px'
|
843
|
+
},
|
844
|
+
addClass : ''
|
845
|
+
};
|
829
846
|
|
830
847
|
})(jQuery);
|
831
848
|
|
832
849
|
(function($) {
|
833
850
|
|
834
|
-
|
835
|
-
|
836
|
-
|
837
|
-
|
838
|
-
|
839
|
-
|
840
|
-
|
841
|
-
|
842
|
-
|
843
|
-
|
844
|
-
|
845
|
-
|
846
|
-
|
847
|
-
|
848
|
-
|
849
|
-
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
|
856
|
-
|
857
|
-
|
858
|
-
|
859
|
-
|
860
|
-
|
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() {
|
858
|
+
$(this).css({
|
859
|
+
width : '100%',
|
860
|
+
height : 'auto',
|
861
|
+
margin : 0,
|
862
|
+
padding : 0,
|
863
|
+
listStyleType: 'none',
|
864
|
+
zIndex : 9999999
|
865
|
+
});
|
866
|
+
}
|
867
|
+
},
|
868
|
+
parent : {
|
869
|
+
object : '<li />',
|
870
|
+
selector: 'li',
|
871
|
+
css : {}
|
872
|
+
},
|
873
|
+
css : {
|
874
|
+
display: 'none'
|
875
|
+
},
|
876
|
+
addClass : ''
|
877
|
+
};
|
861
878
|
|
862
879
|
})(jQuery);
|
863
880
|
(function($) {
|
864
881
|
|
865
|
-
|
866
|
-
|
867
|
-
|
868
|
-
|
869
|
-
|
870
|
-
|
871
|
-
|
872
|
-
|
873
|
-
|
874
|
-
|
875
|
-
|
876
|
-
|
877
|
-
|
878
|
-
|
879
|
-
|
880
|
-
|
881
|
-
|
882
|
-
|
883
|
-
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
|
889
|
-
|
890
|
-
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
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
|
+
};
|
895
912
|
|
896
913
|
})(jQuery);
|
897
914
|
(function($) {
|
898
915
|
|
899
|
-
|
900
|
-
|
901
|
-
|
916
|
+
$.noty.layouts.topCenter = {
|
917
|
+
name : 'topCenter',
|
918
|
+
options : { // overrides options
|
902
919
|
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
|
916
|
-
|
917
|
-
|
918
|
-
|
919
|
-
|
920
|
-
|
921
|
-
|
922
|
-
|
923
|
-
|
924
|
-
|
925
|
-
|
926
|
-
|
927
|
-
|
928
|
-
|
929
|
-
|
930
|
-
|
931
|
-
|
932
|
-
|
933
|
-
|
934
|
-
|
935
|
-
|
920
|
+
},
|
921
|
+
container: {
|
922
|
+
object : '<ul id="noty_topCenter_layout_container" />',
|
923
|
+
selector: 'ul#noty_topCenter_layout_container',
|
924
|
+
style : function() {
|
925
|
+
$(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
|
935
|
+
});
|
936
|
+
|
937
|
+
$(this).css({
|
938
|
+
left: ($(window).width() - $(this).outerWidth(false)) / 2 + 'px'
|
939
|
+
});
|
940
|
+
}
|
941
|
+
},
|
942
|
+
parent : {
|
943
|
+
object : '<li />',
|
944
|
+
selector: 'li',
|
945
|
+
css : {}
|
946
|
+
},
|
947
|
+
css : {
|
948
|
+
display: 'none',
|
949
|
+
width : '310px'
|
950
|
+
},
|
951
|
+
addClass : ''
|
952
|
+
};
|
936
953
|
|
937
954
|
})(jQuery);
|
938
955
|
|
939
956
|
(function($) {
|
940
957
|
|
941
|
-
|
942
|
-
|
943
|
-
|
944
|
-
|
945
|
-
|
946
|
-
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
|
952
|
-
|
953
|
-
|
954
|
-
|
955
|
-
|
956
|
-
|
957
|
-
|
958
|
-
|
959
|
-
|
960
|
-
|
961
|
-
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
|
968
|
-
|
969
|
-
|
970
|
-
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
|
976
|
-
|
977
|
-
|
978
|
-
|
979
|
-
|
958
|
+
$.noty.layouts.topLeft = {
|
959
|
+
name : 'topLeft',
|
960
|
+
options : { // overrides options
|
961
|
+
|
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
|
+
|
979
|
+
if(window.innerWidth < 600) {
|
980
|
+
$(this).css({
|
981
|
+
left: 5
|
982
|
+
});
|
983
|
+
}
|
984
|
+
}
|
985
|
+
},
|
986
|
+
parent : {
|
987
|
+
object : '<li />',
|
988
|
+
selector: 'li',
|
989
|
+
css : {}
|
990
|
+
},
|
991
|
+
css : {
|
992
|
+
display: 'none',
|
993
|
+
width : '310px'
|
994
|
+
},
|
995
|
+
addClass : ''
|
996
|
+
};
|
980
997
|
|
981
998
|
})(jQuery);
|
982
999
|
(function($) {
|
983
1000
|
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1001
|
+
$.noty.layouts.topRight = {
|
1002
|
+
name : 'topRight',
|
1003
|
+
options : { // overrides options
|
1004
|
+
|
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
|
+
});
|
1021
|
+
|
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
|
+
};
|
1023
1040
|
|
1024
1041
|
})(jQuery);
|
1025
1042
|
(function($) {
|
1026
1043
|
|
1027
|
-
$.noty.themes.
|
1028
|
-
name: '
|
1029
|
-
helpers: {
|
1030
|
-
borderFix: function() {
|
1031
|
-
if (this.options.dismissQueue) {
|
1032
|
-
var selector = this.options.layout.container.selector + ' ' + this.options.layout.parent.selector;
|
1033
|
-
switch (this.options.layout.name) {
|
1034
|
-
case 'top':
|
1035
|
-
$(selector).css({borderRadius: '0px 0px 0px 0px'});
|
1036
|
-
$(selector).last().css({borderRadius: '0px 0px 5px 5px'}); break;
|
1037
|
-
case 'topCenter': case 'topLeft': case 'topRight':
|
1038
|
-
case 'bottomCenter': case 'bottomLeft': case 'bottomRight':
|
1039
|
-
case 'center': case 'centerLeft': case 'centerRight': case 'inline':
|
1040
|
-
$(selector).css({borderRadius: '0px 0px 0px 0px'});
|
1041
|
-
$(selector).first().css({'border-top-left-radius': '5px', 'border-top-right-radius': '5px'});
|
1042
|
-
$(selector).last().css({'border-bottom-left-radius': '5px', 'border-bottom-right-radius': '5px'}); break;
|
1043
|
-
case 'bottom':
|
1044
|
-
$(selector).css({borderRadius: '0px 0px 0px 0px'});
|
1045
|
-
$(selector).first().css({borderRadius: '5px 5px 0px 0px'}); break;
|
1046
|
-
default: break;
|
1047
|
-
}
|
1048
|
-
}
|
1049
|
-
}
|
1050
|
-
},
|
1044
|
+
$.noty.themes.bootstrapTheme = {
|
1045
|
+
name: 'bootstrapTheme',
|
1051
1046
|
modal: {
|
1052
1047
|
css: {
|
1053
1048
|
position: 'fixed',
|
@@ -1062,12 +1057,33 @@ window.noty = function noty(options) {
|
|
1062
1057
|
}
|
1063
1058
|
},
|
1064
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">×</span><span class="sr-only">Close</span>');
|
1065
|
+
this.$closeButton.addClass('close');
|
1066
|
+
|
1067
|
+
this.$bar.addClass( "list-group-item" ).css('padding', '0px');
|
1065
1068
|
|
1066
|
-
this
|
1067
|
-
|
1068
|
-
|
1069
|
-
|
1070
|
-
|
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
|
+
|
1071
1087
|
this.$message.css({
|
1072
1088
|
fontSize: '13px',
|
1073
1089
|
lineHeight: '16px',
|
@@ -1076,105 +1092,201 @@ window.noty = function noty(options) {
|
|
1076
1092
|
width: 'auto',
|
1077
1093
|
position: 'relative'
|
1078
1094
|
});
|
1095
|
+
},
|
1096
|
+
callback: {
|
1097
|
+
onShow: function() { },
|
1098
|
+
onClose: function() { }
|
1099
|
+
}
|
1100
|
+
};
|
1079
1101
|
|
1080
|
-
|
1081
|
-
position: 'absolute',
|
1082
|
-
top: 4, right: 4,
|
1083
|
-
width: 10, height: 10,
|
1084
|
-
background: "url(data:image/png;base64,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)",
|
1085
|
-
display: 'none',
|
1086
|
-
cursor: 'pointer'
|
1087
|
-
});
|
1088
|
-
|
1089
|
-
this.$buttons.css({
|
1090
|
-
padding: 5,
|
1091
|
-
textAlign: 'right',
|
1092
|
-
borderTop: '1px solid #ccc',
|
1093
|
-
backgroundColor: '#fff'
|
1094
|
-
});
|
1095
|
-
|
1096
|
-
this.$buttons.find('button').css({
|
1097
|
-
marginLeft: 5
|
1098
|
-
});
|
1102
|
+
})(jQuery);
|
1099
1103
|
|
1100
|
-
this.$buttons.find('button:first').css({
|
1101
|
-
marginLeft: 0
|
1102
|
-
});
|
1103
1104
|
|
1104
|
-
|
1105
|
-
mouseenter: function() { $(this).find('.noty_close').stop().fadeTo('normal',1); },
|
1106
|
-
mouseleave: function() { $(this).find('.noty_close').stop().fadeTo('normal',0); }
|
1107
|
-
});
|
1105
|
+
(function($) {
|
1108
1106
|
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
|
1113
|
-
|
1114
|
-
|
1115
|
-
|
1116
|
-
|
1117
|
-
|
1118
|
-
|
1119
|
-
|
1120
|
-
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1130
|
-
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1136
|
-
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
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
|
1153
|
+
}
|
1154
|
+
},
|
1155
|
+
style : function() {
|
1156
|
+
|
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
|
+
});
|
1161
|
+
|
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
|
+
});
|
1170
|
+
|
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
|
+
});
|
1179
|
+
|
1180
|
+
this.$buttons.css({
|
1181
|
+
padding : 5,
|
1182
|
+
textAlign : 'right',
|
1183
|
+
borderTop : '1px solid #ccc',
|
1184
|
+
backgroundColor: '#fff'
|
1185
|
+
});
|
1186
|
+
|
1187
|
+
this.$buttons.find('button').css({
|
1188
|
+
marginLeft: 5
|
1189
|
+
});
|
1190
|
+
|
1191
|
+
this.$buttons.find('button:first').css({
|
1192
|
+
marginLeft: 0
|
1193
|
+
});
|
1194
|
+
|
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
|
+
});
|
1203
|
+
|
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;
|
1253
|
+
}
|
1153
1254
|
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
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
|
+
},
|
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
|
+
}
|
1289
|
+
}
|
1290
|
+
};
|
1179
1291
|
|
1180
1292
|
})(jQuery);
|