sweet-alert 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2496a19e486c4e0d910addeeae63f5903b4ff4e3
4
- data.tar.gz: 1d2bb9e339ba8860ff7831b0f220be63a201f13b
3
+ metadata.gz: 29df968afc1140b043fbb232b5c8713d8da06c00
4
+ data.tar.gz: b8c7665e366791bc871909ef13ea6abd65e309ec
5
5
  SHA512:
6
- metadata.gz: 7b0ac5465d2d1b859a8161e2924d84cdca2e43eba22f48eb55598517ffca3db1cbc7a061d5d40f78db537e31503488021d621860754578293c3aeb54feb6e387
7
- data.tar.gz: 3db817086e0ec1ef6d370c44aa23b2d646cf454c18a3050fe077ff041ed02aa93c47ec6c52a5be9130d0424b02ad796c84863c57ee0371be7dc5741aa27a910a
6
+ metadata.gz: 2484701b8cec5a38ca1ed6808715a059e2928c0e527ccae2c0836f1d3a8d1bd485007eb9dd9ff7445d763e1691c36c866268892f0d5bfecb85af5e84a3114ea4
7
+ data.tar.gz: f171b802dba0c738509ca9ce0c4aea48cd82100e42c78e7923f474a79d1d9f21c480bff18e8200c0d99234ad5716d4ac4c750da68ffde5f8081a8f57b3b0dff2
@@ -1,7 +1,7 @@
1
1
  // SweetAlert
2
2
  // 2014 (c) - Tristan Edwards
3
3
  // github.com/t4t5/sweetalert
4
- ;(function(window, document) {
4
+ ;(function(window, document, undefined) {
5
5
 
6
6
  var modalClass = '.sweet-alert',
7
7
  overlayClass = '.sweet-overlay',
@@ -19,7 +19,11 @@
19
19
  cancelButtonText: 'Cancel',
20
20
  imageUrl: null,
21
21
  imageSize: null,
22
- timer: null
22
+ timer: null,
23
+ customClass: '',
24
+ html: false,
25
+ animation: true,
26
+ allowEscapeKey: true
23
27
  };
24
28
 
25
29
 
@@ -28,7 +32,14 @@
28
32
  */
29
33
 
30
34
  var getModal = function() {
31
- return document.querySelector(modalClass);
35
+ var $modal = document.querySelector(modalClass);
36
+
37
+ if (!$modal) {
38
+ sweetAlertInitialize();
39
+ $modal = getModal();
40
+ }
41
+
42
+ return $modal;
32
43
  },
33
44
  getOverlay = function() {
34
45
  return document.querySelector(overlayClass);
@@ -97,7 +108,7 @@
97
108
  padding;
98
109
  if (typeof getComputedStyle !== "undefined") { /* IE 8 */
99
110
  padding = parseInt(getComputedStyle(elem).getPropertyValue('padding'), 10);
100
- } else{
111
+ } else {
101
112
  padding = parseInt(elem.currentStyle.padding);
102
113
  }
103
114
 
@@ -142,7 +153,7 @@
142
153
  fireClick = function(node) {
143
154
  // Taken from http://www.nonobtrusive.com/2011/11/29/programatically-fire-crossbrowser-click-event-with-javascript/
144
155
  // Then fixed for today's Chrome browser.
145
- if (MouseEvent) {
156
+ if (typeof MouseEvent === 'function') {
146
157
  // Up-to-date approach
147
158
  var mevt = new MouseEvent('click', {
148
159
  view: window,
@@ -177,6 +188,7 @@
177
188
  previousWindowKeyDown,
178
189
  lastFocusedButton;
179
190
 
191
+
180
192
  /*
181
193
  * Add modal + overlay to DOM
182
194
  */
@@ -187,10 +199,13 @@
187
199
 
188
200
  sweetWrap.innerHTML = sweetHTML;
189
201
 
190
- // For readability: check sweet-alert.html
191
- document.body.appendChild(sweetWrap);
202
+ // Append elements to body
203
+ while (sweetWrap.firstChild) {
204
+ document.body.appendChild(sweetWrap.firstChild);
205
+ }
192
206
  };
193
207
 
208
+
194
209
  /*
195
210
  * Global sweetAlert function
196
211
  */
@@ -199,23 +214,40 @@
199
214
  // Copy arguments to the local args variable
200
215
  var args = arguments;
201
216
  if (getModal() !== null) {
202
- // If getModal returns values then continue
203
- modalDependant.apply(this, args);
217
+ // If getModal returns values then continue
218
+ modalDependant.apply(this, args);
204
219
  } else {
205
- // If getModal returns null i.e. no matches, then set up a interval event to check the return value until it is not null
206
- var modalCheckInterval = setInterval(function() {
207
- if (getModal() !== null) {
208
- clearInterval(modalCheckInterval);
209
- modalDependant.apply(this, args);
210
- }
220
+ // If getModal returns null i.e. no matches, then set up a interval event to check the return value until it is not null
221
+ var modalCheckInterval = setInterval(function() {
222
+ if (getModal() !== null) {
223
+ clearInterval(modalCheckInterval);
224
+ modalDependant.apply(this, args);
225
+ }
211
226
  }, 100);
212
227
  }
213
228
  };
214
-
229
+
215
230
  function modalDependant() {
216
231
 
232
+ var customizations = arguments[0];
233
+
234
+ /*
235
+ * Use argument if defined or default value from params object otherwise.
236
+ * Supports the case where a default value is boolean true and should be
237
+ * overridden by a corresponding explicit argument which is boolean false.
238
+ */
239
+ function argumentOrDefault(key) {
240
+ var args = customizations;
241
+
242
+ if (typeof args[key] !== 'undefined') {
243
+ return args[key];
244
+ } else {
245
+ return defaultParams[key];
246
+ }
247
+ }
248
+
217
249
  if (arguments[0] === undefined) {
218
- window.console.error('sweetAlert expects at least 1 attribute!');
250
+ logStr('SweetAlert expects at least 1 attribute!');
219
251
  return false;
220
252
  }
221
253
 
@@ -223,6 +255,7 @@
223
255
 
224
256
  switch (typeof arguments[0]) {
225
257
 
258
+ // Ex: swal("Hello", "Just testing", "info");
226
259
  case 'string':
227
260
  params.title = arguments[0];
228
261
  params.text = arguments[1] || '';
@@ -230,35 +263,50 @@
230
263
 
231
264
  break;
232
265
 
266
+ // Ex: swal({title:"Hello", text: "Just testing", type: "info"});
233
267
  case 'object':
234
268
  if (arguments[0].title === undefined) {
235
- window.console.error('Missing "title" argument!');
269
+ logStr('Missing "title" argument!');
236
270
  return false;
237
271
  }
238
272
 
239
- params.title = arguments[0].title;
240
- params.text = arguments[0].text || defaultParams.text;
241
- params.type = arguments[0].type || defaultParams.type;
242
- params.customClass = arguments[0].customClass || params.customClass;
243
- params.allowOutsideClick = arguments[0].allowOutsideClick || defaultParams.allowOutsideClick;
244
- params.showCancelButton = arguments[0].showCancelButton !== undefined ? arguments[0].showCancelButton : defaultParams.showCancelButton;
245
- params.closeOnConfirm = arguments[0].closeOnConfirm !== undefined ? arguments[0].closeOnConfirm : defaultParams.closeOnConfirm;
246
- params.closeOnCancel = arguments[0].closeOnCancel !== undefined ? arguments[0].closeOnCancel : defaultParams.closeOnCancel;
247
- params.timer = arguments[0].timer || defaultParams.timer;
273
+ params.title = arguments[0].title;
274
+
275
+ var availableCustoms = [
276
+ 'text',
277
+ 'type',
278
+ 'customClass',
279
+ 'allowOutsideClick',
280
+ 'showCancelButton',
281
+ 'closeOnConfirm',
282
+ 'closeOnCancel',
283
+ 'timer',
284
+ 'confirmButtonColor',
285
+ 'cancelButtonText',
286
+ 'imageUrl',
287
+ 'imageSize',
288
+ 'html',
289
+ 'animation',
290
+ 'allowEscapeKey'];
291
+
292
+ // It would be nice to just use .forEach here, but IE8... :(
293
+ var numCustoms = availableCustoms.length;
294
+ for (var customIndex = 0; customIndex < numCustoms; customIndex++) {
295
+ var customName = availableCustoms[customIndex];
296
+ params[customName] = argumentOrDefault(customName);
297
+ }
248
298
 
249
299
  // Show "Confirm" instead of "OK" if cancel button is visible
250
- params.confirmButtonText = (defaultParams.showCancelButton) ? 'Confirm' : defaultParams.confirmButtonText;
251
- params.confirmButtonText = arguments[0].confirmButtonText || defaultParams.confirmButtonText;
252
- params.confirmButtonColor = arguments[0].confirmButtonColor || defaultParams.confirmButtonColor;
253
- params.cancelButtonText = arguments[0].cancelButtonText || defaultParams.cancelButtonText;
254
- params.imageUrl = arguments[0].imageUrl || defaultParams.imageUrl;
255
- params.imageSize = arguments[0].imageSize || defaultParams.imageSize;
300
+ params.confirmButtonText = (params.showCancelButton) ? 'Confirm' : defaultParams.confirmButtonText;
301
+ params.confirmButtonText = argumentOrDefault('confirmButtonText');
302
+
303
+ // Function to call when clicking on cancel/OK
256
304
  params.doneFunction = arguments[1] || null;
257
305
 
258
306
  break;
259
307
 
260
308
  default:
261
- window.console.error('Unexpected type of argument! Expected "string" or "object", got ' + typeof arguments[0]);
309
+ logStr('Unexpected type of argument! Expected "string" or "object", got ' + typeof arguments[0]);
262
310
  return false;
263
311
 
264
312
  }
@@ -275,7 +323,7 @@
275
323
  var onButtonEvent = function(event) {
276
324
  var e = event || window.event;
277
325
  var target = e.target || e.srcElement,
278
- targetedConfirm = (target.className === 'confirm'),
326
+ targetedConfirm = (target.className.indexOf("confirm") !== -1),
279
327
  modalIsVisible = hasClass(modal, 'visible'),
280
328
  doneFunctionExists = (params.doneFunction && modal.getAttribute('data-has-done-function') === 'true');
281
329
 
@@ -316,7 +364,7 @@
316
364
  params.doneFunction(true);
317
365
 
318
366
  if (params.closeOnConfirm) {
319
- closeModal();
367
+ window.sweetAlert.close();
320
368
  }
321
369
  } else if (doneFunctionExists && modalIsVisible) { // Clicked "cancel"
322
370
 
@@ -329,10 +377,10 @@
329
377
  }
330
378
 
331
379
  if (params.closeOnCancel) {
332
- closeModal();
380
+ window.sweetAlert.close();
333
381
  }
334
382
  } else {
335
- closeModal();
383
+ window.sweetAlert.close();
336
384
  }
337
385
 
338
386
  break;
@@ -361,7 +409,7 @@
361
409
  outsideClickIsAllowed = modal.getAttribute('data-allow-ouside-click') === 'true';
362
410
 
363
411
  if (!clickedOnModal && !clickedOnModalChild && modalIsVisible && outsideClickIsAllowed) {
364
- closeModal();
412
+ window.sweetAlert.close();
365
413
  }
366
414
  };
367
415
 
@@ -369,7 +417,7 @@
369
417
  // Keyboard interactions
370
418
  var $okButton = modal.querySelector('button.confirm'),
371
419
  $cancelButton = modal.querySelector('button.cancel'),
372
- $modalButtons = modal.querySelectorAll('button:not([type=hidden])');
420
+ $modalButtons = modal.querySelectorAll('button[tabindex]');
373
421
 
374
422
 
375
423
  function handleKeyDown(event) {
@@ -418,8 +466,7 @@
418
466
  // Do nothing - let the browser handle it.
419
467
  $targetElement = undefined;
420
468
  }
421
- } else if (keyCode === 27 && !($cancelButton.hidden || $cancelButton.style.display === 'none')) {
422
- // ESC to cancel only if there's a cancel button displayed (like the alert() window).
469
+ } else if (keyCode === 27 && params.allowEscapeKey === true) {
423
470
  $targetElement = $cancelButton;
424
471
  } else {
425
472
  // Fallback - let the browser handle it.
@@ -433,6 +480,7 @@
433
480
  }
434
481
 
435
482
  previousWindowKeyDown = window.onkeydown;
483
+
436
484
  window.onkeydown = handleKeyDown;
437
485
 
438
486
  function handleOnBlur(event) {
@@ -480,11 +528,12 @@
480
528
  };
481
529
  }
482
530
 
483
- /**
531
+
532
+ /*
484
533
  * Set default params for each popup
485
534
  * @param {Object} userParams
486
535
  */
487
- window.swal.setDefaults = function(userParams) {
536
+ window.sweetAlert.setDefaults = window.swal.setDefaults = function(userParams) {
488
537
  if (!userParams) {
489
538
  throw new Error('userParams is required');
490
539
  }
@@ -495,6 +544,7 @@
495
544
  extend(defaultParams, userParams);
496
545
  };
497
546
 
547
+
498
548
  /*
499
549
  * Set type, text and actions on modal
500
550
  */
@@ -508,10 +558,11 @@
508
558
  $confirmBtn = modal.querySelector('button.confirm');
509
559
 
510
560
  // Title
511
- $title.innerHTML = escapeHtml(params.title).split("\n").join("<br>");
561
+ $title.innerHTML = (params.html) ? params.title : escapeHtml(params.title).split("\n").join("<br>");
512
562
 
513
563
  // Text
514
- $text.innerHTML = escapeHtml(params.text || '').split("\n").join("<br>");
564
+ $text.innerHTML = (params.html) ? params.text : escapeHtml(params.text || '').split("\n").join("<br>");
565
+
515
566
  if (params.text) {
516
567
  show($text);
517
568
  }
@@ -519,11 +570,17 @@
519
570
  //Custom Class
520
571
  if (params.customClass) {
521
572
  addClass(modal, params.customClass);
573
+ modal.setAttribute('data-custom-class', params.customClass);
574
+ } else {
575
+ // Find previously set classes and remove them
576
+ var customClass = modal.getAttribute('data-custom-class');
577
+ removeClass(modal, customClass);
578
+ modal.setAttribute('data-custom-class', "");
522
579
  }
523
580
 
524
581
  // Icon
525
582
  hide(modal.querySelectorAll('.icon'));
526
- if (params.type) {
583
+ if (params.type && !isIE8()) {
527
584
  var validType = false;
528
585
  for (var i = 0; i < alertTypes.length; i++) {
529
586
  if (params.type === alertTypes[i]) {
@@ -532,7 +589,7 @@
532
589
  }
533
590
  }
534
591
  if (!validType) {
535
- window.console.error('Unknown alert type: ' + params.type);
592
+ logStr('Unknown alert type: ' + params.type);
536
593
  return false;
537
594
  }
538
595
  var $icon = modal.querySelector('.icon.' + params.type);
@@ -555,7 +612,6 @@
555
612
  addClass($icon.querySelector('.dot'), 'pulseWarningIns');
556
613
  break;
557
614
  }
558
-
559
615
  }
560
616
 
561
617
  // Custom image
@@ -569,19 +625,15 @@
569
625
  _imgHeight = 80;
570
626
 
571
627
  if (params.imageSize) {
572
- var imgWidth = params.imageSize.split('x')[0];
573
- var imgHeight = params.imageSize.split('x')[1];
628
+ var dimensions = params.imageSize.toString().split('x');
629
+ var imgWidth = dimensions[0];
630
+ var imgHeight = dimensions[1];
574
631
 
575
632
  if (!imgWidth || !imgHeight) {
576
- window.console.error("Parameter imageSize expects value with format WIDTHxHEIGHT, got " + params.imageSize);
633
+ logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got " + params.imageSize);
577
634
  } else {
578
635
  _imgWidth = imgWidth;
579
636
  _imgHeight = imgHeight;
580
-
581
- $customIcon.css({
582
- 'width': imgWidth + 'px',
583
- 'height': imgHeight + 'px'
584
- });
585
637
  }
586
638
  }
587
639
  $customIcon.setAttribute('style', $customIcon.getAttribute('style') + 'width:' + _imgWidth + 'px; height:' + _imgHeight + 'px');
@@ -616,6 +668,13 @@
616
668
  var hasDoneFunction = (params.doneFunction) ? true : false;
617
669
  modal.setAttribute('data-has-done-function', hasDoneFunction);
618
670
 
671
+ // Prevent modal from animating
672
+ if (!params.animation){
673
+ modal.setAttribute('data-animation', 'none');
674
+ } else{
675
+ modal.setAttribute('data-animation', 'pop');
676
+ }
677
+
619
678
  // Close timer
620
679
  modal.setAttribute('data-timer', params.timer);
621
680
  }
@@ -666,11 +725,7 @@
666
725
  }
667
726
 
668
727
 
669
-
670
- /*
671
- * Animations
672
- */
673
-
728
+ // Animation when opening modal
674
729
  function openModal() {
675
730
  var modal = getModal();
676
731
  fadeIn(getOverlay(), 10);
@@ -690,12 +745,14 @@
690
745
 
691
746
  if (timer !== "null" && timer !== "") {
692
747
  modal.timeout = setTimeout(function() {
693
- closeModal();
748
+ window.sweetAlert.close();
694
749
  }, timer);
695
750
  }
696
751
  }
697
752
 
698
- function closeModal() {
753
+
754
+ // Aninmation when closing modal
755
+ window.sweetAlert.close = window.swal.close = function() {
699
756
  var modal = getModal();
700
757
  fadeOut(getOverlay(), 5);
701
758
  fadeOut(modal, 5);
@@ -729,7 +786,7 @@
729
786
  }
730
787
  lastFocusedButton = undefined;
731
788
  clearTimeout(modal.timeout);
732
- }
789
+ };
733
790
 
734
791
 
735
792
  /*
@@ -742,30 +799,20 @@
742
799
  modal.style.marginTop = getTopMargin(getModal());
743
800
  }
744
801
 
802
+ // If browser is Internet Explorer 8
803
+ function isIE8() {
804
+ if (window.attachEvent && !window.addEventListener) {
805
+ return true;
806
+ } else {
807
+ return false;
808
+ }
809
+ }
745
810
 
746
-
747
- /*
748
- * If library is injected after page has loaded
749
- */
750
-
751
- (function () {
752
- if (document.readyState === "complete" || document.readyState === "interactive" && document.body) {
753
- window.sweetAlertInitialize();
754
- } else {
755
- if (document.addEventListener) {
756
- document.addEventListener('DOMContentLoaded', function factorial() {
757
- document.removeEventListener('DOMContentLoaded', arguments.callee, false);
758
- window.sweetAlertInitialize();
759
- }, false);
760
- } else if (document.attachEvent) {
761
- document.attachEvent('onreadystatechange', function() {
762
- if (document.readyState === 'complete') {
763
- document.detachEvent('onreadystatechange', arguments.callee);
764
- window.sweetAlertInitialize();
765
- }
766
- });
767
- }
768
- }
769
- })();
811
+ // Error messages for developers
812
+ function logStr(string) {
813
+ if (window.console) { // IE...
814
+ window.console.log("SweetAlert: " + string);
815
+ }
816
+ }
770
817
 
771
818
  })(window, document);
@@ -1,606 +1 @@
1
- @import url(//fonts.googleapis.com/css?family=Open+Sans:400,600,700,300);
2
- .sweet-overlay {
3
- background-color: rgba(0, 0, 0, 0.4);
4
- position: fixed;
5
- left: 0;
6
- right: 0;
7
- top: 0;
8
- bottom: 0;
9
- display: none;
10
- z-index: 1000; }
11
-
12
- .sweet-alert {
13
- background-color: white;
14
- font-family: 'Open Sans', sans-serif;
15
- width: 478px;
16
- padding: 17px;
17
- border-radius: 5px;
18
- text-align: center;
19
- position: fixed;
20
- left: 50%;
21
- top: 50%;
22
- margin-left: -256px;
23
- margin-top: -200px;
24
- overflow: hidden;
25
- display: none;
26
- z-index: 2000; }
27
- @media all and (max-width: 540px) {
28
- .sweet-alert {
29
- width: auto;
30
- margin-left: 0;
31
- margin-right: 0;
32
- left: 15px;
33
- right: 15px; } }
34
- .sweet-alert h2 {
35
- color: #575757;
36
- font-size: 30px;
37
- text-align: center;
38
- font-weight: 600;
39
- text-transform: none;
40
- position: relative;
41
- margin: 25px 0;
42
- padding: 0;
43
- line-height: 40px;
44
- display: block; }
45
- .sweet-alert p {
46
- color: #797979;
47
- font-size: 16px;
48
- text-align: center;
49
- font-weight: 300;
50
- position: relative;
51
- text-align: inherit;
52
- float: none;
53
- margin: 0;
54
- padding: 0;
55
- line-height: normal; }
56
- .sweet-alert button {
57
- background-color: #AEDEF4;
58
- color: white;
59
- border: none;
60
- box-shadow: none;
61
- font-size: 17px;
62
- font-weight: 500;
63
- border-radius: 5px;
64
- padding: 10px 32px;
65
- margin: 26px 5px 0 5px;
66
- cursor: pointer; }
67
- .sweet-alert button:focus {
68
- outline: none;
69
- box-shadow: 0 0 2px rgba(128, 179, 235, 0.5), inset 0 0 0 1px rgba(0, 0, 0, 0.05); }
70
- .sweet-alert button:hover {
71
- background-color: #a1d9f2; }
72
- .sweet-alert button:active {
73
- background-color: #81ccee; }
74
- .sweet-alert button.cancel {
75
- background-color: #D0D0D0; }
76
- .sweet-alert button.cancel:hover {
77
- background-color: #c8c8c8; }
78
- .sweet-alert button.cancel:active {
79
- background-color: #b6b6b6; }
80
- .sweet-alert button.cancel:focus {
81
- box-shadow: rgba(197, 205, 211, 0.8) 0px 0px 2px, rgba(0, 0, 0, 0.0470588) 0px 0px 0px 1px inset !important; }
82
- .sweet-alert button::-moz-focus-inner {
83
- border: 0; }
84
- .sweet-alert[data-has-cancel-button=false] button {
85
- box-shadow: none !important; }
86
- .sweet-alert .icon {
87
- width: 80px;
88
- height: 80px;
89
- border: 4px solid gray;
90
- border-radius: 50%;
91
- margin: 20px auto;
92
- padding: 0;
93
- position: relative;
94
- box-sizing: content-box; }
95
- .sweet-alert .icon.error {
96
- border-color: #F27474; }
97
- .sweet-alert .icon.error .x-mark {
98
- position: relative;
99
- display: block; }
100
- .sweet-alert .icon.error .line {
101
- position: absolute;
102
- height: 5px;
103
- width: 47px;
104
- background-color: #F27474;
105
- display: block;
106
- top: 37px;
107
- border-radius: 2px; }
108
- .sweet-alert .icon.error .line.left {
109
- -webkit-transform: rotate(45deg);
110
- transform: rotate(45deg);
111
- left: 17px; }
112
- .sweet-alert .icon.error .line.right {
113
- -webkit-transform: rotate(-45deg);
114
- transform: rotate(-45deg);
115
- right: 16px; }
116
- .sweet-alert .icon.warning {
117
- border-color: #F8BB86; }
118
- .sweet-alert .icon.warning .body {
119
- position: absolute;
120
- width: 5px;
121
- height: 47px;
122
- left: 50%;
123
- top: 10px;
124
- border-radius: 2px;
125
- margin-left: -2px;
126
- background-color: #F8BB86; }
127
- .sweet-alert .icon.warning .dot {
128
- position: absolute;
129
- width: 7px;
130
- height: 7px;
131
- border-radius: 50%;
132
- margin-left: -3px;
133
- left: 50%;
134
- bottom: 10px;
135
- background-color: #F8BB86; }
136
- .sweet-alert .icon.info {
137
- border-color: #C9DAE1; }
138
- .sweet-alert .icon.info::before {
139
- content: "";
140
- position: absolute;
141
- width: 5px;
142
- height: 29px;
143
- left: 50%;
144
- bottom: 17px;
145
- border-radius: 2px;
146
- margin-left: -2px;
147
- background-color: #C9DAE1; }
148
- .sweet-alert .icon.info::after {
149
- content: "";
150
- position: absolute;
151
- width: 7px;
152
- height: 7px;
153
- border-radius: 50%;
154
- margin-left: -3px;
155
- top: 19px;
156
- background-color: #C9DAE1; }
157
- .sweet-alert .icon.success {
158
- border-color: #A5DC86; }
159
- .sweet-alert .icon.success::before, .sweet-alert .icon.success::after {
160
- content: '';
161
- border-radius: 50%;
162
- position: absolute;
163
- width: 60px;
164
- height: 120px;
165
- background: white;
166
- -webkit-transform: rotate(45deg);
167
- transform: rotate(45deg); }
168
- .sweet-alert .icon.success::before {
169
- border-radius: 120px 0 0 120px;
170
- top: -7px;
171
- left: -33px;
172
- -webkit-transform: rotate(-45deg);
173
- transform: rotate(-45deg);
174
- -webkit-transform-origin: 60px 60px;
175
- transform-origin: 60px 60px; }
176
- .sweet-alert .icon.success::after {
177
- border-radius: 0 120px 120px 0;
178
- top: -11px;
179
- left: 30px;
180
- -webkit-transform: rotate(-45deg);
181
- transform: rotate(-45deg);
182
- -webkit-transform-origin: 0px 60px;
183
- transform-origin: 0px 60px; }
184
- .sweet-alert .icon.success .placeholder {
185
- width: 80px;
186
- height: 80px;
187
- border: 4px solid rgba(165, 220, 134, 0.2);
188
- border-radius: 50%;
189
- box-sizing: content-box;
190
- position: absolute;
191
- left: -4px;
192
- top: -4px;
193
- z-index: 2; }
194
- .sweet-alert .icon.success .fix {
195
- width: 5px;
196
- height: 90px;
197
- background-color: white;
198
- position: absolute;
199
- left: 28px;
200
- top: 8px;
201
- z-index: 1;
202
- -webkit-transform: rotate(-45deg);
203
- transform: rotate(-45deg); }
204
- .sweet-alert .icon.success .line {
205
- height: 5px;
206
- background-color: #A5DC86;
207
- display: block;
208
- border-radius: 2px;
209
- position: absolute;
210
- z-index: 2; }
211
- .sweet-alert .icon.success .line.tip {
212
- width: 25px;
213
- left: 14px;
214
- top: 46px;
215
- -webkit-transform: rotate(45deg);
216
- transform: rotate(45deg); }
217
- .sweet-alert .icon.success .line.long {
218
- width: 47px;
219
- right: 8px;
220
- top: 38px;
221
- -webkit-transform: rotate(-45deg);
222
- transform: rotate(-45deg); }
223
- .sweet-alert .icon.custom {
224
- background-size: contain;
225
- border-radius: 0;
226
- border: none;
227
- background-position: center center;
228
- background-repeat: no-repeat; }
229
-
230
- /*
231
- * Animations
232
- */
233
- @-webkit-keyframes showSweetAlert {
234
- 0% {
235
- transform: scale(0.7);
236
- -webkit-transform: scale(0.7); }
237
- 45% {
238
- transform: scale(1.05);
239
- -webkit-transform: scale(1.05); }
240
- 80% {
241
- transform: scale(0.95);
242
- -webkit-tranform: scale(0.95); }
243
- 100% {
244
- transform: scale(1);
245
- -webkit-transform: scale(1); } }
246
- @-moz-keyframes showSweetAlert {
247
- 0% {
248
- transform: scale(0.7);
249
- -webkit-transform: scale(0.7); }
250
- 45% {
251
- transform: scale(1.05);
252
- -webkit-transform: scale(1.05); }
253
- 80% {
254
- transform: scale(0.95);
255
- -webkit-tranform: scale(0.95); }
256
- 100% {
257
- transform: scale(1);
258
- -webkit-transform: scale(1); } }
259
- @keyframes showSweetAlert {
260
- 0% {
261
- transform: scale(0.7);
262
- -webkit-transform: scale(0.7); }
263
- 45% {
264
- transform: scale(1.05);
265
- -webkit-transform: scale(1.05); }
266
- 80% {
267
- transform: scale(0.95);
268
- -webkit-tranform: scale(0.95); }
269
- 100% {
270
- transform: scale(1);
271
- -webkit-transform: scale(1); } }
272
- @-webkit-keyframes hideSweetAlert {
273
- 0% {
274
- transform: scale(1);
275
- -webkit-transform: scale(1); }
276
- 100% {
277
- transform: scale(0.5);
278
- -webkit-transform: scale(0.5); } }
279
- @-moz-keyframes hideSweetAlert {
280
- 0% {
281
- transform: scale(1);
282
- -webkit-transform: scale(1); }
283
- 100% {
284
- transform: scale(0.5);
285
- -webkit-transform: scale(0.5); } }
286
- @keyframes hideSweetAlert {
287
- 0% {
288
- transform: scale(1);
289
- -webkit-transform: scale(1); }
290
- 100% {
291
- transform: scale(0.5);
292
- -webkit-transform: scale(0.5); } }
293
- .showSweetAlert {
294
- -webkit-animation: showSweetAlert 0.3s;
295
- -moz-animation: showSweetAlert 0.3s;
296
- animation: showSweetAlert 0.3s; }
297
-
298
- .hideSweetAlert {
299
- -webkit-animation: hideSweetAlert 0.2s;
300
- -moz-animation: hideSweetAlert 0.2s;
301
- animation: hideSweetAlert 0.2s; }
302
-
303
- @-webkit-keyframes animateSuccessTip {
304
- 0% {
305
- width: 0;
306
- left: 1px;
307
- top: 19px; }
308
- 54% {
309
- width: 0;
310
- left: 1px;
311
- top: 19px; }
312
- 70% {
313
- width: 50px;
314
- left: -8px;
315
- top: 37px; }
316
- 84% {
317
- width: 17px;
318
- left: 21px;
319
- top: 48px; }
320
- 100% {
321
- width: 25px;
322
- left: 14px;
323
- top: 45px; } }
324
- @-moz-keyframes animateSuccessTip {
325
- 0% {
326
- width: 0;
327
- left: 1px;
328
- top: 19px; }
329
- 54% {
330
- width: 0;
331
- left: 1px;
332
- top: 19px; }
333
- 70% {
334
- width: 50px;
335
- left: -8px;
336
- top: 37px; }
337
- 84% {
338
- width: 17px;
339
- left: 21px;
340
- top: 48px; }
341
- 100% {
342
- width: 25px;
343
- left: 14px;
344
- top: 45px; } }
345
- @keyframes animateSuccessTip {
346
- 0% {
347
- width: 0;
348
- left: 1px;
349
- top: 19px; }
350
- 54% {
351
- width: 0;
352
- left: 1px;
353
- top: 19px; }
354
- 70% {
355
- width: 50px;
356
- left: -8px;
357
- top: 37px; }
358
- 84% {
359
- width: 17px;
360
- left: 21px;
361
- top: 48px; }
362
- 100% {
363
- width: 25px;
364
- left: 14px;
365
- top: 45px; } }
366
- @-webkit-keyframes animateSuccessLong {
367
- 0% {
368
- width: 0;
369
- right: 46px;
370
- top: 54px; }
371
- 65% {
372
- width: 0;
373
- right: 46px;
374
- top: 54px; }
375
- 84% {
376
- width: 55px;
377
- right: 0px;
378
- top: 35px; }
379
- 100% {
380
- width: 47px;
381
- right: 8px;
382
- top: 38px; } }
383
- @-moz-keyframes animateSuccessLong {
384
- 0% {
385
- width: 0;
386
- right: 46px;
387
- top: 54px; }
388
- 65% {
389
- width: 0;
390
- right: 46px;
391
- top: 54px; }
392
- 84% {
393
- width: 55px;
394
- right: 0px;
395
- top: 35px; }
396
- 100% {
397
- width: 47px;
398
- right: 8px;
399
- top: 38px; } }
400
- @keyframes animateSuccessLong {
401
- 0% {
402
- width: 0;
403
- right: 46px;
404
- top: 54px; }
405
- 65% {
406
- width: 0;
407
- right: 46px;
408
- top: 54px; }
409
- 84% {
410
- width: 55px;
411
- right: 0px;
412
- top: 35px; }
413
- 100% {
414
- width: 47px;
415
- right: 8px;
416
- top: 38px; } }
417
- @-webkit-keyframes rotatePlaceholder {
418
- 0% {
419
- transform: rotate(-45deg);
420
- -webkit-transform: rotate(-45deg); }
421
- 5% {
422
- transform: rotate(-45deg);
423
- -webkit-transform: rotate(-45deg); }
424
- 12% {
425
- transform: rotate(-405deg);
426
- -webkit-transform: rotate(-405deg); }
427
- 100% {
428
- transform: rotate(-405deg);
429
- -webkit-transform: rotate(-405deg); } }
430
- @-moz-keyframes rotatePlaceholder {
431
- 0% {
432
- transform: rotate(-45deg);
433
- -webkit-transform: rotate(-45deg); }
434
- 5% {
435
- transform: rotate(-45deg);
436
- -webkit-transform: rotate(-45deg); }
437
- 12% {
438
- transform: rotate(-405deg);
439
- -webkit-transform: rotate(-405deg); }
440
- 100% {
441
- transform: rotate(-405deg);
442
- -webkit-transform: rotate(-405deg); } }
443
- @keyframes rotatePlaceholder {
444
- 0% {
445
- transform: rotate(-45deg);
446
- -webkit-transform: rotate(-45deg); }
447
- 5% {
448
- transform: rotate(-45deg);
449
- -webkit-transform: rotate(-45deg); }
450
- 12% {
451
- transform: rotate(-405deg);
452
- -webkit-transform: rotate(-405deg); }
453
- 100% {
454
- transform: rotate(-405deg);
455
- -webkit-transform: rotate(-405deg); } }
456
- .animateSuccessTip {
457
- -webkit-animation: animateSuccessTip 0.75s;
458
- -moz-animation: animateSuccessTip 0.75s;
459
- animation: animateSuccessTip 0.75s; }
460
-
461
- .animateSuccessLong {
462
- -webkit-animation: animateSuccessLong 0.75s;
463
- -moz-animation: animateSuccessLong 0.75s;
464
- animation: animateSuccessLong 0.75s; }
465
-
466
- .icon.success.animate::after {
467
- -webkit-animation: rotatePlaceholder 4.25s ease-in;
468
- -moz-animation: rotatePlaceholder 4.25s ease-in;
469
- animation: rotatePlaceholder 4.25s ease-in; }
470
-
471
- @-webkit-keyframes animateErrorIcon {
472
- 0% {
473
- transform: rotateX(100deg);
474
- -webkit-transform: rotateX(100deg);
475
- opacity: 0; }
476
- 100% {
477
- transform: rotateX(0deg);
478
- -webkit-transform: rotateX(0deg);
479
- opacity: 1; } }
480
- @-moz-keyframes animateErrorIcon {
481
- 0% {
482
- transform: rotateX(100deg);
483
- -webkit-transform: rotateX(100deg);
484
- opacity: 0; }
485
- 100% {
486
- transform: rotateX(0deg);
487
- -webkit-transform: rotateX(0deg);
488
- opacity: 1; } }
489
- @keyframes animateErrorIcon {
490
- 0% {
491
- transform: rotateX(100deg);
492
- -webkit-transform: rotateX(100deg);
493
- opacity: 0; }
494
- 100% {
495
- transform: rotateX(0deg);
496
- -webkit-transform: rotateX(0deg);
497
- opacity: 1; } }
498
- .animateErrorIcon {
499
- -webkit-animation: animateErrorIcon 0.5s;
500
- -moz-animation: animateErrorIcon 0.5s;
501
- animation: animateErrorIcon 0.5s; }
502
-
503
- @-webkit-keyframes animateXMark {
504
- 0% {
505
- transform: scale(0.4);
506
- -webkit-transform: scale(0.4);
507
- margin-top: 26px;
508
- opacity: 0; }
509
- 50% {
510
- transform: scale(0.4);
511
- -webkit-transform: scale(0.4);
512
- margin-top: 26px;
513
- opacity: 0; }
514
- 80% {
515
- transform: scale(1.15);
516
- -webkit-transform: scale(1.15);
517
- margin-top: -6px; }
518
- 100% {
519
- transform: scale(1);
520
- -webkit-transform: scale(1);
521
- margin-top: 0;
522
- opacity: 1; } }
523
- @-moz-keyframes animateXMark {
524
- 0% {
525
- transform: scale(0.4);
526
- -webkit-transform: scale(0.4);
527
- margin-top: 26px;
528
- opacity: 0; }
529
- 50% {
530
- transform: scale(0.4);
531
- -webkit-transform: scale(0.4);
532
- margin-top: 26px;
533
- opacity: 0; }
534
- 80% {
535
- transform: scale(1.15);
536
- -webkit-transform: scale(1.15);
537
- margin-top: -6px; }
538
- 100% {
539
- transform: scale(1);
540
- -webkit-transform: scale(1);
541
- margin-top: 0;
542
- opacity: 1; } }
543
- @keyframes animateXMark {
544
- 0% {
545
- transform: scale(0.4);
546
- -webkit-transform: scale(0.4);
547
- margin-top: 26px;
548
- opacity: 0; }
549
- 50% {
550
- transform: scale(0.4);
551
- -webkit-transform: scale(0.4);
552
- margin-top: 26px;
553
- opacity: 0; }
554
- 80% {
555
- transform: scale(1.15);
556
- -webkit-transform: scale(1.15);
557
- margin-top: -6px; }
558
- 100% {
559
- transform: scale(1);
560
- -webkit-transform: scale(1);
561
- margin-top: 0;
562
- opacity: 1; } }
563
- .animateXMark {
564
- -webkit-animation: animateXMark 0.5s;
565
- -moz-animation: animateXMark 0.5s;
566
- animation: animateXMark 0.5s; }
567
-
568
- @-webkit-keyframes pulseWarning {
569
- 0% {
570
- border-color: #F8D486; }
571
- 100% {
572
- border-color: #F8BB86; } }
573
- @-moz-keyframes pulseWarning {
574
- 0% {
575
- border-color: #F8D486; }
576
- 100% {
577
- border-color: #F8BB86; } }
578
- @keyframes pulseWarning {
579
- 0% {
580
- border-color: #F8D486; }
581
- 100% {
582
- border-color: #F8BB86; } }
583
- .pulseWarning {
584
- -webkit-animation: pulseWarning 0.75s infinite alternate;
585
- -moz-animation: pulseWarning 0.75s infinite alternate;
586
- animation: pulseWarning 0.75s infinite alternate; }
587
-
588
- @-webkit-keyframes pulseWarningIns {
589
- 0% {
590
- background-color: #F8D486; }
591
- 100% {
592
- background-color: #F8BB86; } }
593
- @-moz-keyframes pulseWarningIns {
594
- 0% {
595
- background-color: #F8D486; }
596
- 100% {
597
- background-color: #F8BB86; } }
598
- @keyframes pulseWarningIns {
599
- 0% {
600
- background-color: #F8D486; }
601
- 100% {
602
- background-color: #F8BB86; } }
603
- .pulseWarningIns {
604
- -webkit-animation: pulseWarningIns 0.75s infinite alternate;
605
- -moz-animation: pulseWarningIns 0.75s infinite alternate;
606
- animation: pulseWarningIns 0.75s infinite alternate; }
1
+ .sweet-overlay{background-color:#000;-ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)";background-color:rgba(0,0,0,.4);position:fixed;left:0;right:0;top:0;bottom:0;display:none;z-index:10000}.sweet-alert{background-color:#fff;font-family:'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;width:478px;padding:17px;border-radius:5px;text-align:center;position:fixed;left:50%;top:50%;margin-left:-256px;margin-top:-200px;overflow:hidden;display:none;z-index:99999}@media all and (max-width:540px){.sweet-alert{width:auto;margin-left:0;margin-right:0;left:15px;right:15px}}.sweet-alert h2{color:#575757;font-size:30px;text-align:center;font-weight:600;text-transform:none;position:relative;margin:25px 0;padding:0;line-height:40px;display:block}.sweet-alert p{color:#797979;font-size:16px;font-weight:300;position:relative;text-align:inherit;float:none;margin:0;padding:0;line-height:normal}.sweet-alert button{background-color:#AEDEF4;color:#fff;border:none;box-shadow:none;font-size:17px;font-weight:500;-webkit-border-radius:4px;border-radius:5px;padding:10px 32px;margin:26px 5px 0;cursor:pointer}.sweet-alert button:focus{outline:0;box-shadow:0 0 2px rgba(128,179,235,.5),inset 0 0 0 1px rgba(0,0,0,.05)}.sweet-alert button:hover{background-color:#a1d9f2}.sweet-alert button:active{background-color:#81ccee}.sweet-alert button.cancel{background-color:#D0D0D0}.sweet-alert button.cancel:hover{background-color:#c8c8c8}.sweet-alert button.cancel:active{background-color:#b6b6b6}.sweet-alert button.cancel:focus{box-shadow:rgba(197,205,211,.8) 0 0 2px,rgba(0,0,0,.0470588) 0 0 0 1px inset!important}.sweet-alert button::-moz-focus-inner{border:0}.sweet-alert[data-has-cancel-button=false] button{box-shadow:none!important}.sweet-alert .icon{width:80px;height:80px;border:4px solid gray;-webkit-border-radius:40px;border-radius:50%;margin:20px auto;padding:0;position:relative;box-sizing:content-box}.sweet-alert .icon.error{border-color:#F27474}.sweet-alert .icon.error .x-mark{position:relative;display:block}.sweet-alert .icon.error .line{position:absolute;height:5px;width:47px;background-color:#F27474;display:block;top:37px;border-radius:2px}.sweet-alert .icon.error .line.left{-webkit-transform:rotate(45deg);transform:rotate(45deg);left:17px}.sweet-alert .icon.error .line.right{-webkit-transform:rotate(-45deg);transform:rotate(-45deg);right:16px}.sweet-alert .icon.warning{border-color:#F8BB86}.sweet-alert .icon.warning .body{position:absolute;width:5px;height:47px;left:50%;top:10px;-webkit-border-radius:2px;border-radius:2px;margin-left:-2px;background-color:#F8BB86}.sweet-alert .icon.warning .dot{position:absolute;width:7px;height:7px;-webkit-border-radius:50%;border-radius:50%;margin-left:-3px;left:50%;bottom:10px;background-color:#F8BB86}.sweet-alert .icon.info{border-color:#C9DAE1}.sweet-alert .icon.info::before{content:"";position:absolute;width:5px;height:29px;left:50%;bottom:17px;border-radius:2px;margin-left:-2px;background-color:#C9DAE1}.sweet-alert .icon.info::after{content:"";position:absolute;width:7px;height:7px;border-radius:50%;margin-left:-3px;top:19px;background-color:#C9DAE1}.sweet-alert .icon.success{border-color:#A5DC86}.sweet-alert .icon.success::after,.sweet-alert .icon.success::before{content:'';position:absolute;width:60px;height:120px;background:#fff;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.sweet-alert .icon.success::before{-webkit-border-radius:120px 0 0 120px;border-radius:120px 0 0 120px;top:-7px;left:-33px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:60px 60px;transform-origin:60px 60px}.sweet-alert .icon.success::after{-webkit-border-radius:0 120px 120px 0;border-radius:0 120px 120px 0;top:-11px;left:30px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg);-webkit-transform-origin:0 60px;transform-origin:0 60px}.sweet-alert .icon.success .placeholder{width:80px;height:80px;border:4px solid rgba(165,220,134,.2);-webkit-border-radius:40px;border-radius:50%;box-sizing:content-box;position:absolute;left:-4px;top:-4px;z-index:2}.sweet-alert .icon.success .fix{width:5px;height:90px;background-color:#fff;position:absolute;left:28px;top:8px;z-index:1;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.sweet-alert .icon.success .line{height:5px;background-color:#A5DC86;display:block;border-radius:2px;position:absolute;z-index:2}.sweet-alert .icon.success .line.tip{width:25px;left:14px;top:46px;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.sweet-alert .icon.success .line.long{width:47px;right:8px;top:38px;-webkit-transform:rotate(-45deg);transform:rotate(-45deg)}.sweet-alert .icon.custom{background-size:contain;border-radius:0;border:none;background-position:center center;background-repeat:no-repeat}@-webkit-keyframes showSweetAlert{0%{transform:scale(.7);-webkit-transform:scale(.7)}45%{transform:scale(1.05);-webkit-transform:scale(1.05)}80%{transform:scale(.95);-webkit-tranform:scale(.95)}100%{transform:scale(1);-webkit-transform:scale(1)}}@keyframes showSweetAlert{0%{transform:scale(.7);-webkit-transform:scale(.7)}45%{transform:scale(1.05);-webkit-transform:scale(1.05)}80%{transform:scale(.95);-webkit-tranform:scale(.95)}100%{transform:scale(1);-webkit-transform:scale(1)}}@-webkit-keyframes hideSweetAlert{0%{transform:scale(1);-webkit-transform:scale(1)}100%{transform:scale(.5);-webkit-transform:scale(.5)}}@keyframes hideSweetAlert{0%{transform:scale(1);-webkit-transform:scale(1)}100%{transform:scale(.5);-webkit-transform:scale(.5)}}.showSweetAlert{-webkit-animation:showSweetAlert .3s;animation:showSweetAlert .3s}.showSweetAlert[data-animation=none]{-webkit-animation:none;animation:none}.hideSweetAlert{-webkit-animation:hideSweetAlert .2s;animation:hideSweetAlert .2s}.hideSweetAlert[data-animation=none]{-webkit-animation:none;animation:none}@-webkit-keyframes animateSuccessTip{0%,54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@keyframes animateSuccessTip{0%,54%{width:0;left:1px;top:19px}70%{width:50px;left:-8px;top:37px}84%{width:17px;left:21px;top:48px}100%{width:25px;left:14px;top:45px}}@-webkit-keyframes animateSuccessLong{0%,65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@keyframes animateSuccessLong{0%,65%{width:0;right:46px;top:54px}84%{width:55px;right:0;top:35px}100%{width:47px;right:8px;top:38px}}@-webkit-keyframes rotatePlaceholder{0%,5%{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}100%,12%{transform:rotate(-405deg);-webkit-transform:rotate(-405deg)}}@keyframes rotatePlaceholder{0%,5%{transform:rotate(-45deg);-webkit-transform:rotate(-45deg)}100%,12%{transform:rotate(-405deg);-webkit-transform:rotate(-405deg)}}.animateSuccessTip{-webkit-animation:animateSuccessTip .75s;animation:animateSuccessTip .75s}.animateSuccessLong{-webkit-animation:animateSuccessLong .75s;animation:animateSuccessLong .75s}.icon.success.animate::after{-webkit-animation:rotatePlaceholder 4.25s ease-in;animation:rotatePlaceholder 4.25s ease-in}@-webkit-keyframes animateErrorIcon{0%{transform:rotateX(100deg);-webkit-transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);-webkit-transform:rotateX(0deg);opacity:1}}@keyframes animateErrorIcon{0%{transform:rotateX(100deg);-webkit-transform:rotateX(100deg);opacity:0}100%{transform:rotateX(0deg);-webkit-transform:rotateX(0deg);opacity:1}}.animateErrorIcon{-webkit-animation:animateErrorIcon .5s;animation:animateErrorIcon .5s}@-webkit-keyframes animateXMark{0%,50%{transform:scale(.4);-webkit-transform:scale(.4);margin-top:26px;opacity:0}80%{transform:scale(1.15);-webkit-transform:scale(1.15);margin-top:-6px}100%{transform:scale(1);-webkit-transform:scale(1);margin-top:0;opacity:1}}@keyframes animateXMark{0%,50%{transform:scale(.4);-webkit-transform:scale(.4);margin-top:26px;opacity:0}80%{transform:scale(1.15);-webkit-transform:scale(1.15);margin-top:-6px}100%{transform:scale(1);-webkit-transform:scale(1);margin-top:0;opacity:1}}.animateXMark{-webkit-animation:animateXMark .5s;animation:animateXMark .5s}@-webkit-keyframes pulseWarning{0%{border-color:#F8D486}100%{border-color:#F8BB86}}@keyframes pulseWarning{0%{border-color:#F8D486}100%{border-color:#F8BB86}}.pulseWarning{-webkit-animation:pulseWarning .75s infinite alternate;animation:pulseWarning .75s infinite alternate}@-webkit-keyframes pulseWarningIns{0%{background-color:#F8D486}100%{background-color:#F8BB86}}@keyframes pulseWarningIns{0%{background-color:#F8D486}100%{background-color:#F8BB86}}.pulseWarningIns{-webkit-animation:pulseWarningIns .75s infinite alternate;animation:pulseWarningIns .75s infinite alternate}
@@ -2,9 +2,9 @@
2
2
  // 2014 (c) - Tristan Edwards
3
3
  // github.com/t4t5/sweetalert
4
4
 
5
- @import url(//fonts.googleapis.com/css?family=Open+Sans:400,600,700,300); // Open Sans font
6
-
7
5
  .sweet-overlay {
6
+ background-color: rgb(0, 0, 0); /* IE8 */
7
+ -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=40)"; /* IE8 */
8
8
  background-color: rgba(black, 0.4);
9
9
 
10
10
  position: fixed;
@@ -14,7 +14,7 @@
14
14
  bottom: 0;
15
15
 
16
16
  display: none;
17
- z-index: 1000;
17
+ z-index: 10000;
18
18
  }
19
19
 
20
20
  .sweet-alert {
@@ -22,7 +22,7 @@
22
22
  $padding: 17px;
23
23
 
24
24
  background-color: white;
25
- font-family: 'Open Sans', sans-serif;
25
+ font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
26
26
  width: $width;
27
27
  padding: $padding;
28
28
  border-radius: 5px;
@@ -36,7 +36,7 @@
36
36
 
37
37
  overflow: hidden;
38
38
  display: none;
39
- z-index: 2000;
39
+ z-index: 99999;
40
40
 
41
41
  @media all and (max-width: 540px) {
42
42
  width: auto;
@@ -83,6 +83,7 @@
83
83
  box-shadow: none;
84
84
  font-size: 17px;
85
85
  font-weight: 500;
86
+ -webkit-border-radius: 4px;
86
87
  border-radius: 5px;
87
88
  padding: 10px 32px;
88
89
  margin: 26px 5px 0 5px;
@@ -131,6 +132,8 @@
131
132
  width: 80px;
132
133
  height: 80px;
133
134
  border: 4px solid gray;
135
+ -webkit-border-radius: 40px;
136
+ border-radius: 40px;
134
137
  border-radius: 50%;
135
138
  margin: 20px auto;
136
139
  padding: 0;
@@ -175,6 +178,7 @@
175
178
  height: 47px;
176
179
  left: 50%;
177
180
  top: 10px;
181
+ -webkit-border-radius: 2px;
178
182
  border-radius: 2px;
179
183
  margin-left: -2px;
180
184
  background-color: $orange;
@@ -183,6 +187,7 @@
183
187
  position: absolute;
184
188
  width: 7px;
185
189
  height: 7px;
190
+ -webkit-border-radius: 50%;
186
191
  border-radius: 50%;
187
192
  margin-left: -3px;
188
193
  left: 50%;
@@ -220,6 +225,8 @@
220
225
 
221
226
  &::before, &::after { // Emulate moving circular line
222
227
  content: '';
228
+ -webkit-border-radius: 40px;
229
+ border-radius: 40px;
223
230
  border-radius: 50%;
224
231
  position: absolute;
225
232
  width: 60px;
@@ -229,6 +236,7 @@
229
236
  transform: rotate(45deg);
230
237
  }
231
238
  &::before {
239
+ -webkit-border-radius: 120px 0 0 120px;
232
240
  border-radius: 120px 0 0 120px;
233
241
  top: -7px;
234
242
  left: -33px;
@@ -239,6 +247,7 @@
239
247
  transform-origin: 60px 60px;
240
248
  }
241
249
  &::after {
250
+ -webkit-border-radius: 0 120px 120px 0;
242
251
  border-radius: 0 120px 120px 0;
243
252
  top: -11px;
244
253
  left: 30px;
@@ -253,6 +262,8 @@
253
262
  width: 80px;
254
263
  height: 80px;
255
264
  border: 4px solid rgba($green, 0.2);
265
+ -webkit-border-radius: 40px;
266
+ border-radius: 40px;
256
267
  border-radius: 50%;
257
268
  box-sizing: content-box;
258
269
 
@@ -324,16 +335,12 @@
324
335
  @-webkit-keyframes #{$animation-name} {
325
336
  @content;
326
337
  }
327
- @-moz-keyframes #{$animation-name} {
328
- @content;
329
- }
330
338
  @keyframes #{$animation-name} {
331
339
  @content;
332
340
  }
333
341
  }
334
342
  @mixin animation($str) {
335
343
  -webkit-animation: #{$str};
336
- -moz-animation: #{$str};
337
344
  animation: #{$str};
338
345
  }
339
346
 
@@ -353,9 +360,17 @@
353
360
 
354
361
  .showSweetAlert {
355
362
  @include animation('showSweetAlert 0.3s');
363
+
364
+ &[data-animation=none] {
365
+ @include animation('none');
366
+ }
356
367
  }
357
368
  .hideSweetAlert {
358
369
  @include animation('hideSweetAlert 0.2s');
370
+
371
+ &[data-animation=none] {
372
+ @include animation('none');
373
+ }
359
374
  }
360
375
 
361
376
 
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'sweet-alert'
6
- s.version = '0.0.6'
6
+ s.version = '0.0.7'
7
7
  s.summary = "The awesome replacement for Javascript's alert"
8
8
  s.authors = ["Najtmare"]
9
9
  s.email = 'millan@sino.net'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sweet-alert
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Najtmare
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-06 00:00:00.000000000 Z
11
+ date: 2015-01-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email: millan@sino.net