alertifyjs-rails 0.1.0 → 0.1.1

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.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # alertifyjs-rails
2
2
 
3
- This gem provides [alertify.js](http://alertifyjs.com/) (v0.4.0) for Rails.
3
+ This gem provides [alertify.js](http://alertifyjs.com/) (v0.6.0) for Rails.
4
4
 
5
5
 
6
6
  ## Installation
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
 
11
11
  gem.description = %q{Use Alertify.js (alertifyjs.com) with Rails 3 and 4}
12
12
  gem.summary = %q{This gem provides the Alertify.js (alertifyjs.com) for Rails applications}
13
- gem.homepage = ""
13
+ gem.homepage = "https://github.com/mkhairi/alertifyjs-rails.git"
14
14
 
15
15
  gem.files = `git ls-files`.split($/)
16
16
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
@@ -1,6 +1,6 @@
1
1
  module Alertifyjs #:nodoc:
2
2
  module Rails #:nodoc:
3
- VERSION = "0.1.0"
4
- ALERTIFY_VERSION = "0.4.0"
3
+ VERSION = "0.1.1"
4
+ ALERTIFYJS_VERSION = "0.6.0"
5
5
  end
6
- end
6
+ end
@@ -7,7 +7,7 @@
7
7
  * @license MIT <http://opensource.org/licenses/mit-license.php>
8
8
  * @link http://alertifyjs.com
9
9
  * @module AlertifyJS
10
- * @version 0.4.0
10
+ * @version 0.6.0
11
11
  */
12
12
  ( function ( window ) {
13
13
  'use strict';
@@ -34,9 +34,10 @@
34
34
  maximizable:true,
35
35
  pinnable:true,
36
36
  pinned:true,
37
- transition:'pulse',
38
37
  padding: true,
39
38
  overflow:true,
39
+ maintainFocus:true,
40
+ transition:'pulse',
40
41
  notifier:{
41
42
  delay:5,
42
43
  position:'bottom-right'
@@ -178,16 +179,16 @@
178
179
  var transition = (function () {
179
180
  var t, type;
180
181
  var supported = false;
181
- var el = document.createElement('fakeelement');
182
182
  var transitions = {
183
- 'WebkitTransition': 'webkitTransitionEnd',
184
- 'MozTransition': 'transitionend',
185
- 'OTransition': 'otransitionend',
186
- 'transition': 'transitionend'
183
+ 'animation' : 'animationend',
184
+ 'OAnimation' : 'oAnimationEnd oanimationend',
185
+ 'msAnimation' : 'MSAnimationEnd',
186
+ 'MozAnimation' : 'animationend',
187
+ 'WebkitAnimation' : 'webkitAnimationEnd'
187
188
  };
188
189
 
189
190
  for (t in transitions) {
190
- if (el.style[t] !== undefined) {
191
+ if (document.body.style[t] !== undefined) {
191
192
  type = transitions[t];
192
193
  supported = true;
193
194
  break;
@@ -340,6 +341,8 @@
340
341
  * @type {Node}
341
342
  */
342
343
  activeElement:document.body,
344
+ timerIn:undefined,
345
+ timerOut:undefined,
343
346
  buttons: setup.buttons,
344
347
  focus: setup.focus,
345
348
  options: {
@@ -1165,8 +1168,6 @@
1165
1168
  setFocus(instance, resetTarget);
1166
1169
  }
1167
1170
  }
1168
- //animation timers
1169
- var transitionInTimeout, transitionOutTimeout;
1170
1171
  /**
1171
1172
  * Transition in transitionend event handler.
1172
1173
  *
@@ -1177,7 +1178,7 @@
1177
1178
  */
1178
1179
  function handleTransitionInEvent(event, instance) {
1179
1180
  // clear the timer
1180
- clearTimeout(transitionInTimeout);
1181
+ clearTimeout(instance.__internal.timerIn);
1181
1182
 
1182
1183
  // once transition is complete, set focus
1183
1184
  setFocus(instance);
@@ -1206,7 +1207,7 @@
1206
1207
  */
1207
1208
  function handleTransitionOutEvent(event, instance) {
1208
1209
  // clear the timer
1209
- clearTimeout(transitionOutTimeout);
1210
+ clearTimeout(instance.__internal.timerOut);
1210
1211
  // unbind the event
1211
1212
  off(instance.elements.dialog, transition.type, instance.__internal.transitionOutHandler);
1212
1213
 
@@ -1221,7 +1222,10 @@
1221
1222
  }
1222
1223
 
1223
1224
  // return focus to the last active element
1224
- instance.__internal.activeElement.focus();
1225
+ if (alertify.defaults.maintainFocus && instance.__internal.activeElement) {
1226
+ instance.__internal.activeElement.focus();
1227
+ instance.__internal.activeElement = null;
1228
+ }
1225
1229
  }
1226
1230
  /* Controls moving a dialog around */
1227
1231
  //holde the current moving instance
@@ -1851,6 +1855,19 @@
1851
1855
  return this;
1852
1856
  }
1853
1857
  },
1858
+ /**
1859
+ * [Alias] Sets dialog settings/options
1860
+ */
1861
+ set:function(key, value){
1862
+ this.setting(key,value);
1863
+ return this;
1864
+ },
1865
+ /**
1866
+ * [Alias] Gets dialog settings/options
1867
+ */
1868
+ get:function(key){
1869
+ return this.setting(key);
1870
+ },
1854
1871
  /**
1855
1872
  * Sets dialog header
1856
1873
  * @content {string or element}
@@ -1906,7 +1923,9 @@
1906
1923
  openInstances.push(this);
1907
1924
 
1908
1925
  // save last focused element
1909
- this.__internal.activeElement = document.activeElement;
1926
+ if(alertify.defaults.maintainFocus){
1927
+ this.__internal.activeElement = document.activeElement;
1928
+ }
1910
1929
 
1911
1930
  //allow custom dom manipulation updates before showing the dialog.
1912
1931
  if(typeof this.prepare === 'function'){
@@ -1933,8 +1952,8 @@
1933
1952
  addClass(this.elements.root, classes.animationIn);
1934
1953
 
1935
1954
  // set 1s fallback in case transition event doesn't fire
1936
- clearTimeout( transitionInTimeout );
1937
- transitionInTimeout = setTimeout( this.__internal.transitionInHandler, transition.supported ? 1000 : 100 );
1955
+ clearTimeout( this.__internal.timerIn);
1956
+ this.__internal.timerIn = setTimeout( this.__internal.transitionInHandler, transition.supported ? 1000 : 100 );
1938
1957
 
1939
1958
  if(isSafari){
1940
1959
  // force desktop safari reflow
@@ -1981,9 +2000,8 @@
1981
2000
  addClass(this.elements.root, classes.animationOut);
1982
2001
 
1983
2002
  // set 1s fallback in case transition event doesn't fire
1984
- clearTimeout( transitionOutTimeout );
1985
- transitionOutTimeout = setTimeout( this.__internal.transitionOutHandler, transition.supported ? 1000 : 100 );
1986
-
2003
+ clearTimeout( this.__internal.timerOut );
2004
+ this.__internal.timerOut = setTimeout( this.__internal.transitionOutHandler, transition.supported ? 1000 : 100 );
1987
2005
  // hide dialog
1988
2006
  addClass(this.elements.root, classes.hidden);
1989
2007
  //reflow
@@ -2085,9 +2103,9 @@
2085
2103
 
2086
2104
  function transitionDone(event, instance) {
2087
2105
  // unbind event
2088
- off(instance.__internal.element, transition.type, transitionDone);
2106
+ off(instance.element, transition.type, transitionDone);
2089
2107
  // remove the message
2090
- element.removeChild(instance.__internal.element);
2108
+ element.removeChild(instance.element);
2091
2109
  }
2092
2110
 
2093
2111
  function initialize(instance) {
@@ -2096,7 +2114,6 @@
2096
2114
  pushed: false,
2097
2115
  delay : undefined,
2098
2116
  timer: undefined,
2099
- element: div,
2100
2117
  clickHandler: undefined,
2101
2118
  transitionEndHandler: undefined,
2102
2119
  transitionTimeout: undefined
@@ -2111,6 +2128,8 @@
2111
2128
  clearTimeout(instance.__internal.transitionTimeout);
2112
2129
  }
2113
2130
  return initialize({
2131
+ /* notification DOM element*/
2132
+ element: div,
2114
2133
  /*
2115
2134
  * Pushes a notification message
2116
2135
  * @param {string or DOMElement} content The notification message content
@@ -2133,6 +2152,7 @@
2133
2152
  wait = _content;
2134
2153
  } else {
2135
2154
  content = _content;
2155
+ wait = this.__internal.delay;
2136
2156
  }
2137
2157
  break;
2138
2158
  case 2:
@@ -2146,14 +2166,14 @@
2146
2166
  }
2147
2167
  // append or insert
2148
2168
  if (notifier.__internal.position.indexOf('top') < 0) {
2149
- element.appendChild(this.__internal.element);
2169
+ element.appendChild(this.element);
2150
2170
  } else {
2151
- element.insertBefore(this.__internal.element, element.firstChild);
2171
+ element.insertBefore(this.element, element.firstChild);
2152
2172
  }
2153
- reflow = this.__internal.element.offsetWidth;
2154
- addClass(this.__internal.element, classes.visible);
2173
+ reflow = this.element.offsetWidth;
2174
+ addClass(this.element, classes.visible);
2155
2175
  // attach click event
2156
- on(this.__internal.element, 'click', this.__internal.clickHandler);
2176
+ on(this.element, 'click', this.__internal.clickHandler);
2157
2177
  return this.delay(wait);
2158
2178
  }
2159
2179
  return this;
@@ -2179,12 +2199,12 @@
2179
2199
  clearTimers(this);
2180
2200
  if (!(typeof this.ondismiss === 'function' && this.ondismiss.call(this) === false)) {
2181
2201
  //detach click event
2182
- off(this.__internal.element, 'click', this.__internal.clickHandler);
2202
+ off(this.element, 'click', this.__internal.clickHandler);
2183
2203
  // ensure element exists
2184
- if (typeof this.__internal.element !== 'undefined' && this.__internal.element.parentNode === element) {
2204
+ if (typeof this.element !== 'undefined' && this.element.parentNode === element) {
2185
2205
  //transition end or fallback
2186
2206
  this.__internal.transitionTimeout = setTimeout(this.__internal.transitionEndHandler, transition.supported ? 1000 : 100);
2187
- removeClass(this.__internal.element, classes.visible);
2207
+ removeClass(this.element, classes.visible);
2188
2208
 
2189
2209
  // custom callback on dismiss
2190
2210
  if (typeof this.callback === 'function') {
@@ -2217,9 +2237,9 @@
2217
2237
  */
2218
2238
  setContent: function (content) {
2219
2239
  if (typeof content === 'string') {
2220
- this.__internal.element.innerHTML = content;
2240
+ this.element.innerHTML = content;
2221
2241
  } else {
2222
- this.__internal.element.appendChild(content);
2242
+ this.element.appendChild(content);
2223
2243
  }
2224
2244
  return this;
2225
2245
  }
@@ -2257,6 +2277,19 @@
2257
2277
  }
2258
2278
  return this;
2259
2279
  },
2280
+ /**
2281
+ * [Alias] Sets dialog settings/options
2282
+ */
2283
+ set:function(key,value){
2284
+ this.setting(key,value);
2285
+ return this;
2286
+ },
2287
+ /**
2288
+ * [Alias] Gets dialog settings/options
2289
+ */
2290
+ get:function(key){
2291
+ return this.setting(key);
2292
+ },
2260
2293
  /**
2261
2294
  * Creates a new notification message
2262
2295
  *
@@ -2365,8 +2398,8 @@
2365
2398
  *
2366
2399
  * @param {string} Dialog name.
2367
2400
  * @param {Function} A Dialog factory function.
2368
- * @param {Boolean} indicates whether to create a singleton or transient dialog.
2369
- * @type {Object}
2401
+ * @param {Boolean} Indicates whether to create a singleton or transient dialog.
2402
+ * @param {String} The name of the base type to inherit from.
2370
2403
  */
2371
2404
  dialog: function (name, Factory, transient, base) {
2372
2405
 
@@ -2437,17 +2470,29 @@
2437
2470
  return dialog.setting(key, value);
2438
2471
  }
2439
2472
  },
2473
+ /**
2474
+ * [Alias] Sets dialog settings/options
2475
+ */
2476
+ set: function(name,key,value){
2477
+ return this.setting(name, key,value);
2478
+ },
2479
+ /**
2480
+ * [Alias] Gets dialog settings/options
2481
+ */
2482
+ get: function(name, key){
2483
+ return this.setting(name, key);
2484
+ },
2440
2485
  /**
2441
2486
  * Creates a new notification message.
2442
2487
  * If a type is passed, a class name "ajs-{type}" will be added.
2443
2488
  * This allows for custom look and feel for various types of notifications.
2444
2489
  *
2445
- * @param {String} [message=undefined] Message text
2446
- * @param {String} [type=''] Type of log message
2447
- * @param {String} [value=''] Time (in ms) to wait before auto-close
2448
- * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed.
2490
+ * @param {String | DOMElement} [message=undefined] Message text
2491
+ * @param {String} [type=''] Type of log message
2492
+ * @param {String} [wait=''] Time (in seconds) to wait before auto-close
2493
+ * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed.
2449
2494
  *
2450
- * @return {undefined}
2495
+ * @return {Object} Notification object.
2451
2496
  */
2452
2497
  notify: function (message, type, wait, callback) {
2453
2498
  return notifier.create(type, callback).push(message, wait);
@@ -2456,11 +2501,10 @@
2456
2501
  * Creates a new notification message.
2457
2502
  *
2458
2503
  * @param {String} [message=undefined] Message text
2459
- * @param {String} [type=''] Type of log message
2460
- * @param {String} [value=''] Time (in ms) to wait before auto-close
2504
+ * @param {String} [wait=''] Time (in seconds) to wait before auto-close
2461
2505
  * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed.
2462
2506
  *
2463
- * @return {undefined}
2507
+ * @return {Object} Notification object.
2464
2508
  */
2465
2509
  message: function (message, wait, callback) {
2466
2510
  return notifier.create(null, callback).push(message, wait);
@@ -2469,11 +2513,10 @@
2469
2513
  * Creates a new notification message of type 'success'.
2470
2514
  *
2471
2515
  * @param {String} [message=undefined] Message text
2472
- * @param {String} [type=''] Type of log message
2473
- * @param {String} [value=''] Time (in ms) to wait before auto-close
2516
+ * @param {String} [wait=''] Time (in seconds) to wait before auto-close
2474
2517
  * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed.
2475
2518
  *
2476
- * @return {undefined}
2519
+ * @return {Object} Notification object.
2477
2520
  */
2478
2521
  success: function (message, wait, callback) {
2479
2522
  return notifier.create('success', callback).push(message, wait);
@@ -2482,11 +2525,10 @@
2482
2525
  * Creates a new notification message of type 'error'.
2483
2526
  *
2484
2527
  * @param {String} [message=undefined] Message text
2485
- * @param {String} [type=''] Type of log message
2486
- * @param {String} [value=''] Time (in ms) to wait before auto-close
2528
+ * @param {String} [wait=''] Time (in seconds) to wait before auto-close
2487
2529
  * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed.
2488
2530
  *
2489
- * @return {undefined}
2531
+ * @return {Object} Notification object.
2490
2532
  */
2491
2533
  error: function (message, wait, callback) {
2492
2534
  return notifier.create('error', callback).push(message, wait);
@@ -2495,11 +2537,10 @@
2495
2537
  * Creates a new notification message of type 'warning'.
2496
2538
  *
2497
2539
  * @param {String} [message=undefined] Message text
2498
- * @param {String} [type=''] Type of log message
2499
- * @param {String} [value=''] Time (in ms) to wait before auto-close
2540
+ * @param {String} [wait=''] Time (in seconds) to wait before auto-close
2500
2541
  * @param {Function} [callback=undefined] A callback function to be invoked when the log is closed.
2501
2542
  *
2502
- * @return {undefined}
2543
+ * @return {Object} Notification object.
2503
2544
  */
2504
2545
  warning: function (message, wait, callback) {
2505
2546
  return notifier.create('warning', callback).push(message, wait);
@@ -266,14 +266,14 @@
266
266
  animation-duration: 250ms;
267
267
  }
268
268
  .alertify .ajs-dialog.ajs-shake {
269
- -webkit-animation-name: shake;
270
- animation-name: shake;
269
+ -webkit-animation-name: ajs-shake;
270
+ animation-name: ajs-shake;
271
271
  -webkit-animation-duration: .1s;
272
272
  animation-duration: .1s;
273
273
  -webkit-animation-fill-mode: both;
274
274
  animation-fill-mode: both;
275
275
  }
276
- @-webkit-keyframes shake {
276
+ @-webkit-keyframes ajs-shake {
277
277
  0%,
278
278
  100% {
279
279
  -webkit-transform: translate3d(0, 0, 0);
@@ -295,7 +295,7 @@
295
295
  transform: translate3d(10px, 0, 0);
296
296
  }
297
297
  }
298
- @keyframes shake {
298
+ @keyframes ajs-shake {
299
299
  0%,
300
300
  100% {
301
301
  -webkit-transform: translate3d(0, 0, 0);
@@ -317,66 +317,59 @@
317
317
  transform: translate3d(10px, 0, 0);
318
318
  }
319
319
  }
320
- .alertify.ajs-slide.ajs-hidden .ajs-dialog {
321
- margin: -100% auto !important;
322
- }
323
- .alertify.ajs-slide .ajs-dialog {
324
- -webkit-transition-property: margin, visibility;
325
- transition-property: margin, visibility;
326
- }
327
320
  .alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog {
328
- -webkit-transition-duration: 500ms;
329
- transition-duration: 500ms;
330
- -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
331
- transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
321
+ -webkit-animation-name: ajs-slideIn;
322
+ animation-name: ajs-slideIn;
323
+ -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
324
+ animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
332
325
  }
333
326
  .alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog {
334
- -webkit-transition-duration: 250ms;
335
- transition-duration: 250ms;
336
- -webkit-transition-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
337
- transition-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
327
+ -webkit-animation-name: ajs-slideOut;
328
+ animation-name: ajs-slideOut;
329
+ -webkit-animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
330
+ animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
338
331
  }
339
332
  .alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog {
340
- -webkit-animation-name: zoomIn;
341
- animation-name: zoomIn;
333
+ -webkit-animation-name: ajs-zoomIn;
334
+ animation-name: ajs-zoomIn;
342
335
  }
343
336
  .alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog {
344
- -webkit-animation-name: zoomOut;
345
- animation-name: zoomOut;
337
+ -webkit-animation-name: ajs-zoomOut;
338
+ animation-name: ajs-zoomOut;
346
339
  }
347
340
  .alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog {
348
- -webkit-animation-name: fadeIn;
349
- animation-name: fadeIn;
341
+ -webkit-animation-name: ajs-fadeIn;
342
+ animation-name: ajs-fadeIn;
350
343
  }
351
344
  .alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog {
352
- -webkit-animation-name: fadeOut;
353
- animation-name: fadeOut;
345
+ -webkit-animation-name: ajs-fadeOut;
346
+ animation-name: ajs-fadeOut;
354
347
  }
355
348
  .alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog {
356
- -webkit-animation-name: pulseIn;
357
- animation-name: pulseIn;
349
+ -webkit-animation-name: ajs-pulseIn;
350
+ animation-name: ajs-pulseIn;
358
351
  }
359
352
  .alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog {
360
- -webkit-animation-name: pulseOut;
361
- animation-name: pulseOut;
353
+ -webkit-animation-name: ajs-pulseOut;
354
+ animation-name: ajs-pulseOut;
362
355
  }
363
356
  .alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog {
364
- -webkit-animation-name: flipInX;
365
- animation-name: flipInX;
357
+ -webkit-animation-name: ajs-flipInX;
358
+ animation-name: ajs-flipInX;
366
359
  }
367
360
  .alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog {
368
- -webkit-animation-name: flipOutX;
369
- animation-name: flipOutX;
361
+ -webkit-animation-name: ajs-flipOutX;
362
+ animation-name: ajs-flipOutX;
370
363
  }
371
364
  .alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog {
372
- -webkit-animation-name: flipInY;
373
- animation-name: flipInY;
365
+ -webkit-animation-name: ajs-flipInY;
366
+ animation-name: ajs-flipInY;
374
367
  }
375
368
  .alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog {
376
- -webkit-animation-name: flipOutY;
377
- animation-name: flipOutY;
369
+ -webkit-animation-name: ajs-flipOutY;
370
+ animation-name: ajs-flipOutY;
378
371
  }
379
- @-webkit-keyframes pulseIn {
372
+ @-webkit-keyframes ajs-pulseIn {
380
373
  0%,
381
374
  20%,
382
375
  40%,
@@ -414,7 +407,7 @@
414
407
  transform: scale3d(1, 1, 1);
415
408
  }
416
409
  }
417
- @keyframes pulseIn {
410
+ @keyframes ajs-pulseIn {
418
411
  0%,
419
412
  20%,
420
413
  40%,
@@ -452,7 +445,7 @@
452
445
  transform: scale3d(1, 1, 1);
453
446
  }
454
447
  }
455
- @-webkit-keyframes pulseOut {
448
+ @-webkit-keyframes ajs-pulseOut {
456
449
  20% {
457
450
  -webkit-transform: scale3d(0.9, 0.9, 0.9);
458
451
  transform: scale3d(0.9, 0.9, 0.9);
@@ -469,7 +462,7 @@
469
462
  transform: scale3d(0.3, 0.3, 0.3);
470
463
  }
471
464
  }
472
- @keyframes pulseOut {
465
+ @keyframes ajs-pulseOut {
473
466
  20% {
474
467
  -webkit-transform: scale3d(0.9, 0.9, 0.9);
475
468
  transform: scale3d(0.9, 0.9, 0.9);
@@ -486,7 +479,7 @@
486
479
  transform: scale3d(0.3, 0.3, 0.3);
487
480
  }
488
481
  }
489
- @-webkit-keyframes zoomIn {
482
+ @-webkit-keyframes ajs-zoomIn {
490
483
  0% {
491
484
  opacity: 0;
492
485
  -webkit-transform: scale3d(0.25, 0.25, 0.25);
@@ -498,7 +491,7 @@
498
491
  transform: scale3d(1, 1, 1);
499
492
  }
500
493
  }
501
- @keyframes zoomIn {
494
+ @keyframes ajs-zoomIn {
502
495
  0% {
503
496
  opacity: 0;
504
497
  -webkit-transform: scale3d(0.25, 0.25, 0.25);
@@ -510,7 +503,7 @@
510
503
  transform: scale3d(1, 1, 1);
511
504
  }
512
505
  }
513
- @-webkit-keyframes zoomOut {
506
+ @-webkit-keyframes ajs-zoomOut {
514
507
  0% {
515
508
  opacity: 1;
516
509
  -webkit-transform: scale3d(1, 1, 1);
@@ -522,7 +515,7 @@
522
515
  transform: scale3d(0.25, 0.25, 0.25);
523
516
  }
524
517
  }
525
- @keyframes zoomOut {
518
+ @keyframes ajs-zoomOut {
526
519
  0% {
527
520
  opacity: 1;
528
521
  -webkit-transform: scale3d(1, 1, 1);
@@ -534,7 +527,7 @@
534
527
  transform: scale3d(0.25, 0.25, 0.25);
535
528
  }
536
529
  }
537
- @-webkit-keyframes fadeIn {
530
+ @-webkit-keyframes ajs-fadeIn {
538
531
  0% {
539
532
  opacity: 0;
540
533
  }
@@ -542,7 +535,7 @@
542
535
  opacity: 1;
543
536
  }
544
537
  }
545
- @keyframes fadeIn {
538
+ @keyframes ajs-fadeIn {
546
539
  0% {
547
540
  opacity: 0;
548
541
  }
@@ -550,7 +543,7 @@
550
543
  opacity: 1;
551
544
  }
552
545
  }
553
- @-webkit-keyframes fadeOut {
546
+ @-webkit-keyframes ajs-fadeOut {
554
547
  0% {
555
548
  opacity: 1;
556
549
  }
@@ -558,7 +551,7 @@
558
551
  opacity: 0;
559
552
  }
560
553
  }
561
- @keyframes fadeOut {
554
+ @keyframes ajs-fadeOut {
562
555
  0% {
563
556
  opacity: 1;
564
557
  }
@@ -566,7 +559,7 @@
566
559
  opacity: 0;
567
560
  }
568
561
  }
569
- @-webkit-keyframes flipInX {
562
+ @-webkit-keyframes ajs-flipInX {
570
563
  0% {
571
564
  -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
572
565
  transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
@@ -594,7 +587,7 @@
594
587
  transform: perspective(400px);
595
588
  }
596
589
  }
597
- @keyframes flipInX {
590
+ @keyframes ajs-flipInX {
598
591
  0% {
599
592
  -webkit-transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
600
593
  transform: perspective(400px) rotate3d(1, 0, 0, 90deg);
@@ -622,7 +615,7 @@
622
615
  transform: perspective(400px);
623
616
  }
624
617
  }
625
- @-webkit-keyframes flipOutX {
618
+ @-webkit-keyframes ajs-flipOutX {
626
619
  0% {
627
620
  -webkit-transform: perspective(400px);
628
621
  transform: perspective(400px);
@@ -638,7 +631,7 @@
638
631
  opacity: 0;
639
632
  }
640
633
  }
641
- @keyframes flipOutX {
634
+ @keyframes ajs-flipOutX {
642
635
  0% {
643
636
  -webkit-transform: perspective(400px);
644
637
  transform: perspective(400px);
@@ -654,7 +647,7 @@
654
647
  opacity: 0;
655
648
  }
656
649
  }
657
- @-webkit-keyframes flipInY {
650
+ @-webkit-keyframes ajs-flipInY {
658
651
  0% {
659
652
  -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
660
653
  transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
@@ -682,7 +675,7 @@
682
675
  transform: perspective(400px);
683
676
  }
684
677
  }
685
- @keyframes flipInY {
678
+ @keyframes ajs-flipInY {
686
679
  0% {
687
680
  -webkit-transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
688
681
  transform: perspective(400px) rotate3d(0, 1, 0, 90deg);
@@ -710,7 +703,7 @@
710
703
  transform: perspective(400px);
711
704
  }
712
705
  }
713
- @-webkit-keyframes flipOutY {
706
+ @-webkit-keyframes ajs-flipOutY {
714
707
  0% {
715
708
  -webkit-transform: perspective(400px);
716
709
  transform: perspective(400px);
@@ -726,7 +719,7 @@
726
719
  opacity: 0;
727
720
  }
728
721
  }
729
- @keyframes flipOutY {
722
+ @keyframes ajs-flipOutY {
730
723
  0% {
731
724
  -webkit-transform: perspective(400px);
732
725
  transform: perspective(400px);
@@ -742,6 +735,38 @@
742
735
  opacity: 0;
743
736
  }
744
737
  }
738
+ @-webkit-keyframes ajs-slideIn {
739
+ 0% {
740
+ margin-top: -100%;
741
+ }
742
+ 100% {
743
+ margin-top: 5%;
744
+ }
745
+ }
746
+ @keyframes ajs-slideIn {
747
+ 0% {
748
+ margin-top: -100%;
749
+ }
750
+ 100% {
751
+ margin-top: 5%;
752
+ }
753
+ }
754
+ @-webkit-keyframes ajs-slideOut {
755
+ 0% {
756
+ margin-top: 5%;
757
+ }
758
+ 100% {
759
+ margin-top: -100%;
760
+ }
761
+ }
762
+ @keyframes ajs-slideOut {
763
+ 0% {
764
+ margin-top: 5%;
765
+ }
766
+ 100% {
767
+ margin-top: -100%;
768
+ }
769
+ }
745
770
  .alertify-notifier {
746
771
  position: fixed;
747
772
  width: 0;
@@ -266,14 +266,14 @@
266
266
  animation-duration: 250ms;
267
267
  }
268
268
  .alertify .ajs-dialog.ajs-shake {
269
- -webkit-animation-name: shake;
270
- animation-name: shake;
269
+ -webkit-animation-name: ajs-shake;
270
+ animation-name: ajs-shake;
271
271
  -webkit-animation-duration: .1s;
272
272
  animation-duration: .1s;
273
273
  -webkit-animation-fill-mode: both;
274
274
  animation-fill-mode: both;
275
275
  }
276
- @-webkit-keyframes shake {
276
+ @-webkit-keyframes ajs-shake {
277
277
  0%,
278
278
  100% {
279
279
  -webkit-transform: translate3d(0, 0, 0);
@@ -295,7 +295,7 @@
295
295
  transform: translate3d(-10px, 0, 0);
296
296
  }
297
297
  }
298
- @keyframes shake {
298
+ @keyframes ajs-shake {
299
299
  0%,
300
300
  100% {
301
301
  -webkit-transform: translate3d(0, 0, 0);
@@ -317,66 +317,59 @@
317
317
  transform: translate3d(-10px, 0, 0);
318
318
  }
319
319
  }
320
- .alertify.ajs-slide.ajs-hidden .ajs-dialog {
321
- margin: -100% auto !important;
322
- }
323
- .alertify.ajs-slide .ajs-dialog {
324
- -webkit-transition-property: margin, visibility;
325
- transition-property: margin, visibility;
326
- }
327
320
  .alertify.ajs-slide.ajs-in:not(.ajs-hidden) .ajs-dialog {
328
- -webkit-transition-duration: 500ms;
329
- transition-duration: 500ms;
330
- -webkit-transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
331
- transition-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
321
+ -webkit-animation-name: ajs-slideIn;
322
+ animation-name: ajs-slideIn;
323
+ -webkit-animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
324
+ animation-timing-function: cubic-bezier(0.175, 0.885, 0.32, 1.275);
332
325
  }
333
326
  .alertify.ajs-slide.ajs-out.ajs-hidden .ajs-dialog {
334
- -webkit-transition-duration: 250ms;
335
- transition-duration: 250ms;
336
- -webkit-transition-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
337
- transition-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
327
+ -webkit-animation-name: ajs-slideOut;
328
+ animation-name: ajs-slideOut;
329
+ -webkit-animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
330
+ animation-timing-function: cubic-bezier(0.6, -0.28, 0.735, 0.045);
338
331
  }
339
332
  .alertify.ajs-zoom.ajs-in:not(.ajs-hidden) .ajs-dialog {
340
- -webkit-animation-name: zoomIn;
341
- animation-name: zoomIn;
333
+ -webkit-animation-name: ajs-zoomIn;
334
+ animation-name: ajs-zoomIn;
342
335
  }
343
336
  .alertify.ajs-zoom.ajs-out.ajs-hidden .ajs-dialog {
344
- -webkit-animation-name: zoomOut;
345
- animation-name: zoomOut;
337
+ -webkit-animation-name: ajs-zoomOut;
338
+ animation-name: ajs-zoomOut;
346
339
  }
347
340
  .alertify.ajs-fade.ajs-in:not(.ajs-hidden) .ajs-dialog {
348
- -webkit-animation-name: fadeIn;
349
- animation-name: fadeIn;
341
+ -webkit-animation-name: ajs-fadeIn;
342
+ animation-name: ajs-fadeIn;
350
343
  }
351
344
  .alertify.ajs-fade.ajs-out.ajs-hidden .ajs-dialog {
352
- -webkit-animation-name: fadeOut;
353
- animation-name: fadeOut;
345
+ -webkit-animation-name: ajs-fadeOut;
346
+ animation-name: ajs-fadeOut;
354
347
  }
355
348
  .alertify.ajs-pulse.ajs-in:not(.ajs-hidden) .ajs-dialog {
356
- -webkit-animation-name: pulseIn;
357
- animation-name: pulseIn;
349
+ -webkit-animation-name: ajs-pulseIn;
350
+ animation-name: ajs-pulseIn;
358
351
  }
359
352
  .alertify.ajs-pulse.ajs-out.ajs-hidden .ajs-dialog {
360
- -webkit-animation-name: pulseOut;
361
- animation-name: pulseOut;
353
+ -webkit-animation-name: ajs-pulseOut;
354
+ animation-name: ajs-pulseOut;
362
355
  }
363
356
  .alertify.ajs-flipx.ajs-in:not(.ajs-hidden) .ajs-dialog {
364
- -webkit-animation-name: flipInX;
365
- animation-name: flipInX;
357
+ -webkit-animation-name: ajs-flipInX;
358
+ animation-name: ajs-flipInX;
366
359
  }
367
360
  .alertify.ajs-flipx.ajs-out.ajs-hidden .ajs-dialog {
368
- -webkit-animation-name: flipOutX;
369
- animation-name: flipOutX;
361
+ -webkit-animation-name: ajs-flipOutX;
362
+ animation-name: ajs-flipOutX;
370
363
  }
371
364
  .alertify.ajs-flipy.ajs-in:not(.ajs-hidden) .ajs-dialog {
372
- -webkit-animation-name: flipInY;
373
- animation-name: flipInY;
365
+ -webkit-animation-name: ajs-flipInY;
366
+ animation-name: ajs-flipInY;
374
367
  }
375
368
  .alertify.ajs-flipy.ajs-out.ajs-hidden .ajs-dialog {
376
- -webkit-animation-name: flipOutY;
377
- animation-name: flipOutY;
369
+ -webkit-animation-name: ajs-flipOutY;
370
+ animation-name: ajs-flipOutY;
378
371
  }
379
- @-webkit-keyframes pulseIn {
372
+ @-webkit-keyframes ajs-pulseIn {
380
373
  0%,
381
374
  20%,
382
375
  40%,
@@ -414,7 +407,7 @@
414
407
  transform: scale3d(1, 1, 1);
415
408
  }
416
409
  }
417
- @keyframes pulseIn {
410
+ @keyframes ajs-pulseIn {
418
411
  0%,
419
412
  20%,
420
413
  40%,
@@ -452,7 +445,7 @@
452
445
  transform: scale3d(1, 1, 1);
453
446
  }
454
447
  }
455
- @-webkit-keyframes pulseOut {
448
+ @-webkit-keyframes ajs-pulseOut {
456
449
  20% {
457
450
  -webkit-transform: scale3d(0.9, 0.9, 0.9);
458
451
  transform: scale3d(0.9, 0.9, 0.9);
@@ -469,7 +462,7 @@
469
462
  transform: scale3d(0.3, 0.3, 0.3);
470
463
  }
471
464
  }
472
- @keyframes pulseOut {
465
+ @keyframes ajs-pulseOut {
473
466
  20% {
474
467
  -webkit-transform: scale3d(0.9, 0.9, 0.9);
475
468
  transform: scale3d(0.9, 0.9, 0.9);
@@ -486,7 +479,7 @@
486
479
  transform: scale3d(0.3, 0.3, 0.3);
487
480
  }
488
481
  }
489
- @-webkit-keyframes zoomIn {
482
+ @-webkit-keyframes ajs-zoomIn {
490
483
  0% {
491
484
  opacity: 0;
492
485
  -webkit-transform: scale3d(0.25, 0.25, 0.25);
@@ -498,7 +491,7 @@
498
491
  transform: scale3d(1, 1, 1);
499
492
  }
500
493
  }
501
- @keyframes zoomIn {
494
+ @keyframes ajs-zoomIn {
502
495
  0% {
503
496
  opacity: 0;
504
497
  -webkit-transform: scale3d(0.25, 0.25, 0.25);
@@ -510,7 +503,7 @@
510
503
  transform: scale3d(1, 1, 1);
511
504
  }
512
505
  }
513
- @-webkit-keyframes zoomOut {
506
+ @-webkit-keyframes ajs-zoomOut {
514
507
  0% {
515
508
  opacity: 1;
516
509
  -webkit-transform: scale3d(1, 1, 1);
@@ -522,7 +515,7 @@
522
515
  transform: scale3d(0.25, 0.25, 0.25);
523
516
  }
524
517
  }
525
- @keyframes zoomOut {
518
+ @keyframes ajs-zoomOut {
526
519
  0% {
527
520
  opacity: 1;
528
521
  -webkit-transform: scale3d(1, 1, 1);
@@ -534,7 +527,7 @@
534
527
  transform: scale3d(0.25, 0.25, 0.25);
535
528
  }
536
529
  }
537
- @-webkit-keyframes fadeIn {
530
+ @-webkit-keyframes ajs-fadeIn {
538
531
  0% {
539
532
  opacity: 0;
540
533
  }
@@ -542,7 +535,7 @@
542
535
  opacity: 1;
543
536
  }
544
537
  }
545
- @keyframes fadeIn {
538
+ @keyframes ajs-fadeIn {
546
539
  0% {
547
540
  opacity: 0;
548
541
  }
@@ -550,7 +543,7 @@
550
543
  opacity: 1;
551
544
  }
552
545
  }
553
- @-webkit-keyframes fadeOut {
546
+ @-webkit-keyframes ajs-fadeOut {
554
547
  0% {
555
548
  opacity: 1;
556
549
  }
@@ -558,7 +551,7 @@
558
551
  opacity: 0;
559
552
  }
560
553
  }
561
- @keyframes fadeOut {
554
+ @keyframes ajs-fadeOut {
562
555
  0% {
563
556
  opacity: 1;
564
557
  }
@@ -566,7 +559,7 @@
566
559
  opacity: 0;
567
560
  }
568
561
  }
569
- @-webkit-keyframes flipInX {
562
+ @-webkit-keyframes ajs-flipInX {
570
563
  0% {
571
564
  -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
572
565
  transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
@@ -594,7 +587,7 @@
594
587
  transform: perspective(400px);
595
588
  }
596
589
  }
597
- @keyframes flipInX {
590
+ @keyframes ajs-flipInX {
598
591
  0% {
599
592
  -webkit-transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
600
593
  transform: perspective(400px) rotate3d(1, 0, 0, -90deg);
@@ -622,7 +615,7 @@
622
615
  transform: perspective(400px);
623
616
  }
624
617
  }
625
- @-webkit-keyframes flipOutX {
618
+ @-webkit-keyframes ajs-flipOutX {
626
619
  0% {
627
620
  -webkit-transform: perspective(400px);
628
621
  transform: perspective(400px);
@@ -638,7 +631,7 @@
638
631
  opacity: 0;
639
632
  }
640
633
  }
641
- @keyframes flipOutX {
634
+ @keyframes ajs-flipOutX {
642
635
  0% {
643
636
  -webkit-transform: perspective(400px);
644
637
  transform: perspective(400px);
@@ -654,7 +647,7 @@
654
647
  opacity: 0;
655
648
  }
656
649
  }
657
- @-webkit-keyframes flipInY {
650
+ @-webkit-keyframes ajs-flipInY {
658
651
  0% {
659
652
  -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
660
653
  transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
@@ -682,7 +675,7 @@
682
675
  transform: perspective(400px);
683
676
  }
684
677
  }
685
- @keyframes flipInY {
678
+ @keyframes ajs-flipInY {
686
679
  0% {
687
680
  -webkit-transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
688
681
  transform: perspective(400px) rotate3d(0, -1, 0, -90deg);
@@ -710,7 +703,7 @@
710
703
  transform: perspective(400px);
711
704
  }
712
705
  }
713
- @-webkit-keyframes flipOutY {
706
+ @-webkit-keyframes ajs-flipOutY {
714
707
  0% {
715
708
  -webkit-transform: perspective(400px);
716
709
  transform: perspective(400px);
@@ -726,7 +719,7 @@
726
719
  opacity: 0;
727
720
  }
728
721
  }
729
- @keyframes flipOutY {
722
+ @keyframes ajs-flipOutY {
730
723
  0% {
731
724
  -webkit-transform: perspective(400px);
732
725
  transform: perspective(400px);
@@ -742,6 +735,38 @@
742
735
  opacity: 0;
743
736
  }
744
737
  }
738
+ @-webkit-keyframes ajs-slideIn {
739
+ 0% {
740
+ margin-top: -100%;
741
+ }
742
+ 100% {
743
+ margin-top: 5%;
744
+ }
745
+ }
746
+ @keyframes ajs-slideIn {
747
+ 0% {
748
+ margin-top: -100%;
749
+ }
750
+ 100% {
751
+ margin-top: 5%;
752
+ }
753
+ }
754
+ @-webkit-keyframes ajs-slideOut {
755
+ 0% {
756
+ margin-top: 5%;
757
+ }
758
+ 100% {
759
+ margin-top: -100%;
760
+ }
761
+ }
762
+ @keyframes ajs-slideOut {
763
+ 0% {
764
+ margin-top: 5%;
765
+ }
766
+ 100% {
767
+ margin-top: -100%;
768
+ }
769
+ }
745
770
  .alertify-notifier {
746
771
  position: fixed;
747
772
  width: 0;
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alertifyjs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-19 00:00:00.000000000 Z
12
+ date: 2014-09-22 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Use Alertify.js (alertifyjs.com) with Rails 3 and 4
15
15
  email:
@@ -38,7 +38,7 @@ files:
38
38
  - vendor/assets/stylesheets/alertify/default.rtl.css
39
39
  - vendor/assets/stylesheets/alertify/semantic.css
40
40
  - vendor/assets/stylesheets/alertify/semantic.rtl.css
41
- homepage: ''
41
+ homepage: https://github.com/mkhairi/alertifyjs-rails.git
42
42
  licenses: []
43
43
  post_install_message:
44
44
  rdoc_options: []