devmate 0.0.1 → 0.1.0

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