rails-alertify 0.2.13 → 0.3.2
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/Gemfile +5 -1
- data/README.md +11 -1
- data/lib/rails-alertify/version.rb +1 -1
- data/vendor/assets/javascripts/alertify.js +95 -18
- data/vendor/assets/stylesheets/alertify/bootstrap.css +118 -0
- data/vendor/assets/stylesheets/alertify/core.css +23 -1
- data/vendor/assets/stylesheets/alertify/default.css +40 -39
- metadata +9 -2
data/Gemfile
CHANGED
@@ -3,4 +3,8 @@ source "http://rubygems.org"
|
|
3
3
|
# Declare your gem's dependencies in alertify-rails.gemspec.
|
4
4
|
# Bundler will treat runtime dependencies like base dependencies, and
|
5
5
|
# development dependencies will be added by default to the :development group.
|
6
|
-
gemspec
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
group :development do
|
9
|
+
gem "rake"
|
10
|
+
end
|
data/README.md
CHANGED
@@ -24,7 +24,7 @@ If your manifest is written in CoffeeScript:
|
|
24
24
|
#= require alertify
|
25
25
|
```
|
26
26
|
|
27
|
-
Last step is to add the <code>core</code> and <code>default</code> stylesheets tou your application if you want to use the default ones.
|
27
|
+
Last step is to add the <code>core</code> and <code>default</code> or <code>bootstrap</code> stylesheets tou your application if you want to use the default ones.
|
28
28
|
|
29
29
|
```css
|
30
30
|
/*
|
@@ -34,6 +34,16 @@ Last step is to add the <code>core</code> and <code>default</code> stylesheets t
|
|
34
34
|
*/
|
35
35
|
```
|
36
36
|
|
37
|
+
If you want to use the bootstrap theme instead:
|
38
|
+
|
39
|
+
```css
|
40
|
+
/*
|
41
|
+
*= require alertify/core
|
42
|
+
*= require alertify/bootstrap
|
43
|
+
*
|
44
|
+
*/
|
45
|
+
```
|
46
|
+
|
37
47
|
### About me
|
38
48
|
|
39
49
|
Senior Developer @ Datenspiel GmbH (Leipzig/Germany)
|
@@ -5,9 +5,9 @@
|
|
5
5
|
* @author Fabien Doiron <fabien.doiron@gmail.com>
|
6
6
|
* @copyright Fabien Doiron 2012
|
7
7
|
* @license MIT <http://opensource.org/licenses/mit-license.php>
|
8
|
-
* @link http://
|
8
|
+
* @link http://fabien-d.github.com/alertify.js/
|
9
9
|
* @module alertify
|
10
|
-
* @version 0.2
|
10
|
+
* @version 0.3.2
|
11
11
|
*/
|
12
12
|
|
13
13
|
/*global define*/
|
@@ -24,7 +24,7 @@
|
|
24
24
|
isopen = false,
|
25
25
|
keys = { ENTER: 13, ESC: 27, SPACE: 32 },
|
26
26
|
queue = [],
|
27
|
-
$, elCallee, elCover, elDialog, elLog;
|
27
|
+
$, elCallee, elCover, elDialog, elLog, getTransitionEvent;
|
28
28
|
|
29
29
|
/**
|
30
30
|
* Markup pieces
|
@@ -37,11 +37,31 @@
|
|
37
37
|
ok : "<a href=\"#\" class=\"alertify-button alertify-button-ok\" id=\"alertify-ok\">{{ok}}</a>",
|
38
38
|
cancel : "<a href=\"#\" class=\"alertify-button alertify-button-cancel\" id=\"alertify-cancel\">{{cancel}}</a>"
|
39
39
|
},
|
40
|
-
input : "<input type=\"text\" class=\"alertify-text\" id=\"alertify-text\">",
|
40
|
+
input : "<div class=\"alertify-text-wrapper\"><input type=\"text\" class=\"alertify-text\" id=\"alertify-text\"></div>",
|
41
41
|
message : "<p class=\"alertify-message\">{{message}}</p>",
|
42
42
|
log : "<article class=\"alertify-log{{class}}\">{{message}}</article>"
|
43
43
|
};
|
44
44
|
|
45
|
+
/**
|
46
|
+
* Return the proper transitionend event
|
47
|
+
* @return {String} Transition type string
|
48
|
+
*/
|
49
|
+
getTransitionEvent = function () {
|
50
|
+
var t,
|
51
|
+
el = document.createElement("fakeelement"),
|
52
|
+
transitions = {
|
53
|
+
"transition" : "transitionend",
|
54
|
+
"OTransition" : "otransitionend",
|
55
|
+
"MSTransition" : "msTransitionEnd",
|
56
|
+
"MozTransition" : "transitionend",
|
57
|
+
"WebkitTransition" : "webkitTransitionEnd"
|
58
|
+
};
|
59
|
+
|
60
|
+
for (t in transitions) {
|
61
|
+
if (el.style[t] !== undefined) return transitions[t];
|
62
|
+
}
|
63
|
+
};
|
64
|
+
|
45
65
|
/**
|
46
66
|
* Shorthand for document.getElementById()
|
47
67
|
*
|
@@ -73,6 +93,18 @@
|
|
73
93
|
*/
|
74
94
|
delay : 5000,
|
75
95
|
|
96
|
+
/**
|
97
|
+
* Whether buttons are reversed (default is secondary/primary)
|
98
|
+
* @type {Boolean}
|
99
|
+
*/
|
100
|
+
buttonReverse : false,
|
101
|
+
|
102
|
+
/**
|
103
|
+
* Set the transition event on load
|
104
|
+
* @type {[type]}
|
105
|
+
*/
|
106
|
+
transition : undefined,
|
107
|
+
|
76
108
|
/**
|
77
109
|
* Set the proper button click events
|
78
110
|
*
|
@@ -172,6 +204,18 @@
|
|
172
204
|
}
|
173
205
|
},
|
174
206
|
|
207
|
+
/**
|
208
|
+
* Append button HTML strings
|
209
|
+
*
|
210
|
+
* @param {String} secondary The secondary button HTML string
|
211
|
+
* @param {String} primary The primary button HTML string
|
212
|
+
*
|
213
|
+
* @return {String} The appended button HTML strings
|
214
|
+
*/
|
215
|
+
appendButtons : function (secondary, primary) {
|
216
|
+
return this.buttonReverse ? primary + secondary : secondary + primary;
|
217
|
+
},
|
218
|
+
|
175
219
|
/**
|
176
220
|
* Build the proper message box
|
177
221
|
*
|
@@ -182,7 +226,8 @@
|
|
182
226
|
build : function (item) {
|
183
227
|
var html = "",
|
184
228
|
type = item.type,
|
185
|
-
message = item.message
|
229
|
+
message = item.message,
|
230
|
+
css = item.cssClass || "";
|
186
231
|
|
187
232
|
html += "<div class=\"alertify-dialog\">";
|
188
233
|
|
@@ -203,11 +248,11 @@
|
|
203
248
|
|
204
249
|
switch (type) {
|
205
250
|
case "confirm":
|
206
|
-
html = html.replace("{{buttons}}", dialogs.buttons.cancel
|
251
|
+
html = html.replace("{{buttons}}", this.appendButtons(dialogs.buttons.cancel, dialogs.buttons.ok));
|
207
252
|
html = html.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
|
208
253
|
break;
|
209
254
|
case "prompt":
|
210
|
-
html = html.replace("{{buttons}}", dialogs.buttons.cancel
|
255
|
+
html = html.replace("{{buttons}}", this.appendButtons(dialogs.buttons.cancel, dialogs.buttons.submit));
|
211
256
|
html = html.replace("{{ok}}", this.labels.ok).replace("{{cancel}}", this.labels.cancel);
|
212
257
|
break;
|
213
258
|
case "alert":
|
@@ -218,7 +263,7 @@
|
|
218
263
|
break;
|
219
264
|
}
|
220
265
|
|
221
|
-
elDialog.className = "alertify alertify-show alertify-" + type;
|
266
|
+
elDialog.className = "alertify alertify-show alertify-" + type + " " + css;
|
222
267
|
elCover.className = "alertify-cover";
|
223
268
|
return html;
|
224
269
|
},
|
@@ -227,17 +272,42 @@
|
|
227
272
|
* Close the log messages
|
228
273
|
*
|
229
274
|
* @param {Object} elem HTML Element of log message to close
|
230
|
-
* @param {Number} wait [optional] Time (in ms) to wait before automatically hiding the message
|
275
|
+
* @param {Number} wait [optional] Time (in ms) to wait before automatically hiding the message, if 0 never hide
|
231
276
|
*
|
232
277
|
* @return {undefined}
|
233
278
|
*/
|
234
279
|
close : function (elem, wait) {
|
235
|
-
|
280
|
+
// Unary Plus: +"2" === 2
|
281
|
+
var timer = (wait && !isNaN(wait)) ? +wait : this.delay,
|
282
|
+
self = this,
|
283
|
+
removeElement;
|
284
|
+
|
236
285
|
this.bind(elem, "click", function () {
|
237
286
|
elLog.removeChild(elem);
|
238
287
|
});
|
288
|
+
|
289
|
+
// Remove element after transition is done
|
290
|
+
removeElement = function (event) {
|
291
|
+
event.stopPropagation();
|
292
|
+
// transitionend event gets fired for every property
|
293
|
+
// this ensures it only tries to remove the element once
|
294
|
+
if (event.propertyName === "opacity") elLog.removeChild(this);
|
295
|
+
};
|
296
|
+
|
297
|
+
// never close (until click) if wait is set to 0
|
298
|
+
if (wait === 0) return;
|
299
|
+
|
239
300
|
setTimeout(function () {
|
240
|
-
|
301
|
+
// ensure element exists
|
302
|
+
if (typeof elem !== "undefined" && elem.parentNode === elLog) {
|
303
|
+
// whether CSS transition exists
|
304
|
+
if (typeof self.transition !== "undefined") {
|
305
|
+
self.bind(elem, self.transition, removeElement);
|
306
|
+
elem.className += " alertify-log-hide";
|
307
|
+
} else {
|
308
|
+
elLog.removeChild(elem);
|
309
|
+
}
|
310
|
+
}
|
241
311
|
}, timer);
|
242
312
|
},
|
243
313
|
|
@@ -248,10 +318,11 @@
|
|
248
318
|
* @param {String} type Type of dialog to create
|
249
319
|
* @param {Function} fn [Optional] Callback function
|
250
320
|
* @param {String} placeholder [Optional] Default value for prompt input field
|
321
|
+
* @param {String} cssClass [Optional] Class(es) to append to dialog box
|
251
322
|
*
|
252
323
|
* @return {Object}
|
253
324
|
*/
|
254
|
-
dialog : function (message, type, fn, placeholder) {
|
325
|
+
dialog : function (message, type, fn, placeholder, cssClass) {
|
255
326
|
// set the current active element
|
256
327
|
// this allows the keyboard focus to be resetted
|
257
328
|
// after the dialog box is closed
|
@@ -272,7 +343,7 @@
|
|
272
343
|
check();
|
273
344
|
}
|
274
345
|
|
275
|
-
queue.push({ type: type, message: message, callback: fn, placeholder: placeholder });
|
346
|
+
queue.push({ type: type, message: message, callback: fn, placeholder: placeholder, cssClass: cssClass });
|
276
347
|
if (!isopen) this.setup();
|
277
348
|
|
278
349
|
return this;
|
@@ -286,7 +357,11 @@
|
|
286
357
|
* @return {Function}
|
287
358
|
*/
|
288
359
|
extend : function (type) {
|
289
|
-
|
360
|
+
if (typeof type !== "string") throw new Error("extend method must have exactly one paramter");
|
361
|
+
return function (message, wait) {
|
362
|
+
this.log(message, type, wait);
|
363
|
+
return this;
|
364
|
+
};
|
290
365
|
},
|
291
366
|
|
292
367
|
/**
|
@@ -339,6 +414,8 @@
|
|
339
414
|
// this allows script to give it focus
|
340
415
|
// after the dialog is closed
|
341
416
|
document.body.setAttribute("tabindex", "0");
|
417
|
+
// set transition type
|
418
|
+
this.transition = getTransitionEvent();
|
342
419
|
// clean up init method
|
343
420
|
delete this.init;
|
344
421
|
},
|
@@ -419,7 +496,7 @@
|
|
419
496
|
|
420
497
|
isopen = true;
|
421
498
|
elDialog.innerHTML = this.build(item);
|
422
|
-
if (typeof item.placeholder === "string") $("alertify-text").value = item.placeholder;
|
499
|
+
if (typeof item.placeholder === "string" && item.placeholder !== "") $("alertify-text").value = item.placeholder;
|
423
500
|
this.addListeners(item.callback);
|
424
501
|
},
|
425
502
|
|
@@ -442,12 +519,12 @@
|
|
442
519
|
};
|
443
520
|
|
444
521
|
return {
|
445
|
-
alert : function (message, fn) { _alertify.dialog(message, "alert", fn); return this; },
|
446
|
-
confirm : function (message, fn) { _alertify.dialog(message, "confirm", fn); return this; },
|
522
|
+
alert : function (message, fn, cssClass) { _alertify.dialog(message, "alert", fn, "", cssClass); return this; },
|
523
|
+
confirm : function (message, fn, cssClass) { _alertify.dialog(message, "confirm", fn, "", cssClass); return this; },
|
447
524
|
extend : _alertify.extend,
|
448
525
|
init : _alertify.init,
|
449
526
|
log : function (message, type, wait) { _alertify.log(message, type, wait); return this; },
|
450
|
-
prompt : function (message, fn, placeholder) { _alertify.dialog(message, "prompt", fn, placeholder); return this; },
|
527
|
+
prompt : function (message, fn, placeholder, cssClass) { _alertify.dialog(message, "prompt", fn, placeholder, cssClass); return this; },
|
451
528
|
success : function (message, wait) { _alertify.log(message, "success", wait); return this; },
|
452
529
|
error : function (message, wait) { _alertify.log(message, "error", wait); return this; },
|
453
530
|
set : function (args) { _alertify.set(args); },
|
@@ -0,0 +1,118 @@
|
|
1
|
+
/**
|
2
|
+
* Twitter Bootstrap Look and Feel
|
3
|
+
* Based on http://twitter.github.com/bootstrap/
|
4
|
+
*/
|
5
|
+
.alertify,
|
6
|
+
.alertify-log {
|
7
|
+
font-family: sans-serif;
|
8
|
+
}
|
9
|
+
.alertify {
|
10
|
+
background: #FFF;
|
11
|
+
border: 1px solid #8E8E8E; /* browsers that don't support rgba */
|
12
|
+
border: 1px solid rgba(0,0,0,.3);
|
13
|
+
border-radius: 6px;
|
14
|
+
box-shadow: 0 3px 7px rgba(0,0,0,.3);
|
15
|
+
-webkit-background-clip: padding; /* Safari 4? Chrome 6? */
|
16
|
+
-moz-background-clip: padding; /* Firefox 3.6 */
|
17
|
+
background-clip: padding-box; /* Firefox 4, Safari 5, Opera 10, IE 9 */
|
18
|
+
}
|
19
|
+
.alertify-dialog {
|
20
|
+
padding: 0;
|
21
|
+
}
|
22
|
+
.alertify-inner {
|
23
|
+
text-align: left;
|
24
|
+
}
|
25
|
+
.alertify-message {
|
26
|
+
padding: 15px;
|
27
|
+
margin: 0;
|
28
|
+
}
|
29
|
+
.alertify-text-wrapper {
|
30
|
+
padding: 0 15px;
|
31
|
+
}
|
32
|
+
.alertify-text {
|
33
|
+
color: #555;
|
34
|
+
border-radius: 4px;
|
35
|
+
padding: 8px;
|
36
|
+
background-color: #FFF;
|
37
|
+
border: 1px solid #CCC;
|
38
|
+
box-shadow: inset 0 1px 1px rgba(0,0,0,.075);
|
39
|
+
}
|
40
|
+
.alertify-text:focus {
|
41
|
+
border-color: rgba(82,168,236,.8);
|
42
|
+
outline: 0;
|
43
|
+
box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
|
44
|
+
}
|
45
|
+
|
46
|
+
.alertify-buttons {
|
47
|
+
padding: 14px 15px 15px;
|
48
|
+
background: #F5F5F5;
|
49
|
+
border-top: 1px solid #DDD;
|
50
|
+
border-radius: 0 0 6px 6px;
|
51
|
+
box-shadow: inset 0 1px 0 #FFF;
|
52
|
+
text-align: right;
|
53
|
+
}
|
54
|
+
.alertify-button {
|
55
|
+
margin-left: 10px;
|
56
|
+
border-radius: 4px;
|
57
|
+
font-weight: normal;
|
58
|
+
padding: 4px 12px;
|
59
|
+
text-decoration: none;
|
60
|
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .05);
|
61
|
+
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
62
|
+
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
63
|
+
background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
64
|
+
background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
65
|
+
background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
66
|
+
}
|
67
|
+
.alertify-button:focus {
|
68
|
+
outline: none;
|
69
|
+
box-shadow: 0 0 5px #2B72D5;
|
70
|
+
}
|
71
|
+
.alertify-button:active {
|
72
|
+
position: relative;
|
73
|
+
box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);
|
74
|
+
}
|
75
|
+
.alertify-button-cancel {
|
76
|
+
text-shadow: 0 -1px 0 rgba(255,255,255,.75);
|
77
|
+
background-color: #E6E6E6;
|
78
|
+
border: 1px solid #BBB;
|
79
|
+
color: #333;
|
80
|
+
background-image: -webkit-linear-gradient(top, #FFF, #E6E6E6);
|
81
|
+
background-image: -moz-linear-gradient(top, #FFF, #E6E6E6);
|
82
|
+
background-image: -ms-linear-gradient(top, #FFF, #E6E6E6);
|
83
|
+
background-image: -o-linear-gradient(top, #FFF, #E6E6E6);
|
84
|
+
background-image: linear-gradient(top, #FFF, #E6E6E6);
|
85
|
+
}
|
86
|
+
.alertify-button-cancel:hover {
|
87
|
+
background: #E6E6E6;
|
88
|
+
}
|
89
|
+
.alertify-button-ok {
|
90
|
+
text-shadow: 0 -1px 0 rgba(0,0,0,.25);
|
91
|
+
background-color: #04C;
|
92
|
+
border: 1px solid #04C;
|
93
|
+
border-color: #04C #04C #002A80;
|
94
|
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
95
|
+
color: #FFF;
|
96
|
+
}
|
97
|
+
.alertify-button-ok:hover {
|
98
|
+
background: #04C;
|
99
|
+
}
|
100
|
+
|
101
|
+
.alertify-log {
|
102
|
+
background: #D9EDF7;
|
103
|
+
padding: 8px 14px;
|
104
|
+
border-radius: 4px;
|
105
|
+
color: #3A8ABF;
|
106
|
+
text-shadow: 0 1px 0 rgba(255,255,255,.5);
|
107
|
+
border: 1px solid #BCE8F1;
|
108
|
+
}
|
109
|
+
.alertify-log-error {
|
110
|
+
color: #B94A48;
|
111
|
+
background: #F2DEDE;
|
112
|
+
border: 1px solid #EED3D7;
|
113
|
+
}
|
114
|
+
.alertify-log-success {
|
115
|
+
color: #468847;
|
116
|
+
background: #DFF0D8;
|
117
|
+
border: 1px solid #D6E9C6;
|
118
|
+
}
|
@@ -15,6 +15,14 @@
|
|
15
15
|
-o-transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
16
16
|
transition: all 250ms cubic-bezier(0.600, -0.280, 0.735, 0.045); /* easeInBack */
|
17
17
|
}
|
18
|
+
.alertify-log-hide {
|
19
|
+
-webkit-transition: all 500ms cubic-bezier(0.600, 0, 0.735, 0.045); /* older webkit */
|
20
|
+
-webkit-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
21
|
+
-moz-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
22
|
+
-ms-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
23
|
+
-o-transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045);
|
24
|
+
transition: all 500ms cubic-bezier(0.600, -0.280, 0.735, 0.045); /* easeInBack */
|
25
|
+
}
|
18
26
|
.alertify-cover {
|
19
27
|
position: fixed; z-index: 99999;
|
20
28
|
top: 0; right: 0; bottom: 0; left: 0;
|
@@ -26,7 +34,11 @@
|
|
26
34
|
margin-left: -275px;
|
27
35
|
}
|
28
36
|
.alertify-hidden {
|
29
|
-
|
37
|
+
-webkit-transform: translate(0,-150px);
|
38
|
+
-moz-transform: translate(0,-150px);
|
39
|
+
-ms-transform: translate(0,-150px);
|
40
|
+
-o-transform: translate(0,-150px);
|
41
|
+
transform: translate(0,-150px);
|
30
42
|
visibility: hidden;
|
31
43
|
}
|
32
44
|
.alertify-logs {
|
@@ -41,9 +53,19 @@
|
|
41
53
|
margin-top: 10px;
|
42
54
|
position: relative;
|
43
55
|
right: -300px;
|
56
|
+
opacity: 0;
|
44
57
|
}
|
45
58
|
.alertify-log-show {
|
46
59
|
right: 0;
|
60
|
+
opacity: 1;
|
61
|
+
}
|
62
|
+
.alertify-log-hide {
|
63
|
+
-webkit-transform: translate(300px, 0);
|
64
|
+
-moz-transform: translate(300px, 0);
|
65
|
+
-ms-transform: translate(300px, 0);
|
66
|
+
-o-transform: translate(300px, 0);
|
67
|
+
transform: translate(300px, 0);
|
68
|
+
opacity: 0;
|
47
69
|
}
|
48
70
|
.alertify-dialog {
|
49
71
|
padding: 25px;
|
@@ -15,47 +15,48 @@
|
|
15
15
|
-moz-background-clip: padding; /* Firefox 3.6 */
|
16
16
|
background-clip: padding-box; /* Firefox 4, Safari 5, Opera 10, IE 9 */
|
17
17
|
}
|
18
|
-
.alertify-text {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
}
|
23
|
-
.alertify-button {
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
}
|
37
|
-
.alertify-button:hover,
|
38
|
-
.alertify-button:focus {
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
}
|
47
|
-
.alertify-button:active {
|
48
|
-
position: relative;
|
49
|
-
top: 1px;
|
50
|
-
}
|
51
|
-
.alertify-button-cancel {
|
52
|
-
background-color: #FE1A00;
|
53
|
-
border: 1px solid #D83526;
|
18
|
+
.alertify-text {
|
19
|
+
border: 1px solid #CCC;
|
20
|
+
padding: 10px;
|
21
|
+
border-radius: 4px;
|
22
|
+
}
|
23
|
+
.alertify-button {
|
24
|
+
border-radius: 4px;
|
25
|
+
color: #FFF;
|
26
|
+
font-weight: bold;
|
27
|
+
padding: 6px 15px;
|
28
|
+
text-decoration: none;
|
29
|
+
text-shadow: 1px 1px 0 rgba(0,0,0,.5);
|
30
|
+
box-shadow: inset 0 1px 0 0 rgba(255,255,255,.5);
|
31
|
+
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
32
|
+
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
33
|
+
background-image: -ms-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
34
|
+
background-image: -o-linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
35
|
+
background-image: linear-gradient(top, rgba(255,255,255,.3), rgba(255,255,255,0));
|
36
|
+
}
|
37
|
+
.alertify-button:hover,
|
38
|
+
.alertify-button:focus {
|
39
|
+
outline: none;
|
40
|
+
box-shadow: 0 0 15px #2B72D5;
|
41
|
+
background-image: -webkit-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
|
42
|
+
background-image: -moz-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
|
43
|
+
background-image: -ms-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
|
44
|
+
background-image: -o-linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
|
45
|
+
background-image: linear-gradient(top, rgba(0,0,0,.1), rgba(0,0,0,0));
|
54
46
|
}
|
55
|
-
.alertify-button
|
56
|
-
|
57
|
-
|
47
|
+
.alertify-button:active {
|
48
|
+
position: relative;
|
49
|
+
top: 1px;
|
58
50
|
}
|
51
|
+
.alertify-button-cancel {
|
52
|
+
background-color: #FE1A00;
|
53
|
+
border: 1px solid #D83526;
|
54
|
+
}
|
55
|
+
.alertify-button-ok {
|
56
|
+
background-color: #5CB811;
|
57
|
+
border: 1px solid #3B7808;
|
58
|
+
}
|
59
|
+
|
59
60
|
.alertify-log {
|
60
61
|
background: #1F1F1F;
|
61
62
|
background: rgba(0,0,0,.9);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-alertify
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2
|
4
|
+
version: 0.3.2
|
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:
|
12
|
+
date: 2013-01-09 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description:
|
15
15
|
email:
|
@@ -27,6 +27,7 @@ files:
|
|
27
27
|
- lib/rails-alertify/version.rb
|
28
28
|
- rails-alertify.gemspec
|
29
29
|
- vendor/assets/javascripts/alertify.js
|
30
|
+
- vendor/assets/stylesheets/alertify/bootstrap.css
|
30
31
|
- vendor/assets/stylesheets/alertify/core.css
|
31
32
|
- vendor/assets/stylesheets/alertify/default.css
|
32
33
|
homepage: https://github.com/dsci/rails-alertify
|
@@ -41,12 +42,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
41
42
|
- - ! '>='
|
42
43
|
- !ruby/object:Gem::Version
|
43
44
|
version: '0'
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
hash: -1108957417410191220
|
44
48
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
49
|
none: false
|
46
50
|
requirements:
|
47
51
|
- - ! '>='
|
48
52
|
- !ruby/object:Gem::Version
|
49
53
|
version: '0'
|
54
|
+
segments:
|
55
|
+
- 0
|
56
|
+
hash: -1108957417410191220
|
50
57
|
requirements: []
|
51
58
|
rubyforge_project:
|
52
59
|
rubygems_version: 1.8.24
|