alertifyjs-rails 1.2.1 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
data/README.md
CHANGED
@@ -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 1.
|
10
|
+
* @version 1.3.0
|
11
11
|
*/
|
12
12
|
( function ( window ) {
|
13
13
|
'use strict';
|
@@ -44,6 +44,7 @@
|
|
44
44
|
overflow:true,
|
45
45
|
maintainFocus:true,
|
46
46
|
transition:'pulse',
|
47
|
+
autoReset:true,
|
47
48
|
notifier:{
|
48
49
|
delay:5,
|
49
50
|
position:'bottom-right'
|
@@ -341,6 +342,21 @@
|
|
341
342
|
instance.hooks = {};
|
342
343
|
}
|
343
344
|
|
345
|
+
//copy buttons defintion
|
346
|
+
var buttonsDefinition = [];
|
347
|
+
if(Array.isArray(setup.buttons)){
|
348
|
+
for(var b=0;b<setup.buttons.length;b+=1){
|
349
|
+
var ref = setup.buttons[b],
|
350
|
+
copy = {};
|
351
|
+
for (var i in ref) {
|
352
|
+
if (ref.hasOwnProperty(i)) {
|
353
|
+
copy[i] = ref[i];
|
354
|
+
}
|
355
|
+
}
|
356
|
+
buttonsDefinition.push(copy);
|
357
|
+
}
|
358
|
+
}
|
359
|
+
|
344
360
|
var internal = instance.__internal = {
|
345
361
|
/**
|
346
362
|
* Flag holding the open state of the dialog
|
@@ -358,7 +374,7 @@
|
|
358
374
|
activeElement:document.body,
|
359
375
|
timerIn:undefined,
|
360
376
|
timerOut:undefined,
|
361
|
-
buttons:
|
377
|
+
buttons: buttonsDefinition,
|
362
378
|
focus: setup.focus,
|
363
379
|
options: {
|
364
380
|
title: undefined,
|
@@ -368,6 +384,7 @@
|
|
368
384
|
pinned: undefined,
|
369
385
|
movable: undefined,
|
370
386
|
resizable: undefined,
|
387
|
+
autoReset: undefined,
|
371
388
|
closable: undefined,
|
372
389
|
closableByDimmer: undefined,
|
373
390
|
maximizable: undefined,
|
@@ -493,6 +510,7 @@
|
|
493
510
|
|
494
511
|
instance.set('movable', setup.options.movable === undefined ? alertify.defaults.movable : setup.options.movable);
|
495
512
|
instance.set('resizable', setup.options.resizable === undefined ? alertify.defaults.resizable : setup.options.resizable);
|
513
|
+
instance.set('autoReset', setup.options.autoReset === undefined ? alertify.defaults.autoReset : setup.options.autoReset);
|
496
514
|
|
497
515
|
instance.set('closable', setup.options.closable === undefined ? alertify.defaults.closable : setup.options.closable);
|
498
516
|
instance.set('closableByDimmer', setup.options.closableByDimmer === undefined ? alertify.defaults.closableByDimmer : setup.options.closableByDimmer);
|
@@ -1693,8 +1711,10 @@
|
|
1693
1711
|
function windowResize(/*event*/) {
|
1694
1712
|
for (var x = 0; x < openDialogs.length; x += 1) {
|
1695
1713
|
var instance = openDialogs[x];
|
1696
|
-
|
1697
|
-
|
1714
|
+
if (instance.get('autoReset')) {
|
1715
|
+
resetMove(instance);
|
1716
|
+
resetResize(instance);
|
1717
|
+
}
|
1698
1718
|
}
|
1699
1719
|
}
|
1700
1720
|
/**
|
@@ -27,6 +27,7 @@
|
|
27
27
|
max-width: 500px;
|
28
28
|
padding: 24px 24px 0 24px;
|
29
29
|
outline: 0;
|
30
|
+
background-color: #fff;
|
30
31
|
}
|
31
32
|
.alertify .ajs-dialog.ajs-capture:before {
|
32
33
|
content: '';
|
@@ -73,6 +74,7 @@
|
|
73
74
|
margin: -24px;
|
74
75
|
margin-bottom: 0;
|
75
76
|
padding: 16px 24px;
|
77
|
+
background-color: #fff;
|
76
78
|
}
|
77
79
|
.alertify .ajs-body {
|
78
80
|
min-height: 56px;
|
@@ -85,6 +87,7 @@
|
|
85
87
|
margin-left: -24px;
|
86
88
|
margin-right: -24px;
|
87
89
|
min-height: 43px;
|
90
|
+
background-color: #fff;
|
88
91
|
}
|
89
92
|
.alertify .ajs-footer .ajs-buttons.ajs-primary {
|
90
93
|
text-align: right;
|
@@ -848,6 +851,15 @@
|
|
848
851
|
padding: 15px;
|
849
852
|
margin-top: 10px;
|
850
853
|
}
|
854
|
+
.alertify-notifier .ajs-message.ajs-success {
|
855
|
+
background: rgba(91, 189, 114, 0.95);
|
856
|
+
}
|
857
|
+
.alertify-notifier .ajs-message.ajs-error {
|
858
|
+
background: rgba(217, 92, 92, 0.95);
|
859
|
+
}
|
860
|
+
.alertify-notifier .ajs-message.ajs-warning {
|
861
|
+
background: rgba(252, 248, 215, 0.95);
|
862
|
+
}
|
851
863
|
.alertify-notifier.ajs-top {
|
852
864
|
top: 10px;
|
853
865
|
}
|
@@ -27,6 +27,7 @@
|
|
27
27
|
max-width: 500px;
|
28
28
|
padding: 24px 24px 0 24px;
|
29
29
|
outline: 0;
|
30
|
+
background-color: #fff;
|
30
31
|
}
|
31
32
|
.alertify .ajs-dialog.ajs-capture:before {
|
32
33
|
content: '';
|
@@ -73,6 +74,7 @@
|
|
73
74
|
margin: -24px;
|
74
75
|
margin-bottom: 0;
|
75
76
|
padding: 16px 24px;
|
77
|
+
background-color: #fff;
|
76
78
|
}
|
77
79
|
.alertify .ajs-body {
|
78
80
|
min-height: 56px;
|
@@ -85,6 +87,7 @@
|
|
85
87
|
margin-right: -24px;
|
86
88
|
margin-left: -24px;
|
87
89
|
min-height: 43px;
|
90
|
+
background-color: #fff;
|
88
91
|
}
|
89
92
|
.alertify .ajs-footer .ajs-buttons.ajs-primary {
|
90
93
|
text-align: left;
|
@@ -848,6 +851,15 @@
|
|
848
851
|
padding: 15px;
|
849
852
|
margin-top: 10px;
|
850
853
|
}
|
854
|
+
.alertify-notifier .ajs-message.ajs-success {
|
855
|
+
background: rgba(91, 189, 114, 0.95);
|
856
|
+
}
|
857
|
+
.alertify-notifier .ajs-message.ajs-error {
|
858
|
+
background: rgba(217, 92, 92, 0.95);
|
859
|
+
}
|
860
|
+
.alertify-notifier .ajs-message.ajs-warning {
|
861
|
+
background: rgba(252, 248, 215, 0.95);
|
862
|
+
}
|
851
863
|
.alertify-notifier.ajs-top {
|
852
864
|
top: 10px;
|
853
865
|
}
|
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: 1.
|
4
|
+
version: 1.3.0
|
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: 2015-03-
|
12
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Use Alertify.js (alertifyjs.com) with Rails 3 and 4
|
15
15
|
email:
|