mice 0.2.2 → 0.2.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/mice/version.rb +1 -1
- data/vendor/assets/javascripts/mice/alert.js +92 -0
- data/vendor/assets/javascripts/mice.js +1 -1
- data/vendor/assets/stylesheets/mice/_alerts.scss +70 -0
- data/vendor/assets/stylesheets/mice/_callouts.scss +5 -1
- data/vendor/assets/stylesheets/mice/_close.scss +35 -0
- data/vendor/assets/stylesheets/mice/_variables.scss +33 -0
- data/vendor/assets/stylesheets/mice.scss +2 -0
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 49bb1ba11442b35b4d2c399d19472de08b01b4df
|
4
|
+
data.tar.gz: d840ac9ac0112f48aa0b3af3154c82ffd04fe6a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1f2ff6d90d489870c60f5ec63a2818d218658c7578a2b9120d143fac0ed8df0fb43945fa89cd589371af034bb33da34d79aff072e69667bd82daf79bebed0731
|
7
|
+
data.tar.gz: 116222f2ab49e7dfa1c2848158bb6e79b9311bde69c7d2ff249d541b5705745b21a9a484712d7f1e272a5d458888d9737353d04fd2385bf332ecb8e045475837
|
data/Gemfile.lock
CHANGED
data/lib/mice/version.rb
CHANGED
@@ -0,0 +1,92 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: alert.js v3.2.0
|
3
|
+
* http://getbootstrap.com/javascript/#alerts
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2014 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// ALERT CLASS DEFINITION
|
14
|
+
// ======================
|
15
|
+
|
16
|
+
var dismiss = '[data-dismiss="alert"]'
|
17
|
+
var Alert = function (el) {
|
18
|
+
$(el).on('click', dismiss, this.close)
|
19
|
+
}
|
20
|
+
|
21
|
+
Alert.VERSION = '3.2.0'
|
22
|
+
|
23
|
+
Alert.prototype.close = function (e) {
|
24
|
+
var $this = $(this)
|
25
|
+
var selector = $this.attr('data-target')
|
26
|
+
|
27
|
+
if (!selector) {
|
28
|
+
selector = $this.attr('href')
|
29
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
30
|
+
}
|
31
|
+
|
32
|
+
var $parent = $(selector)
|
33
|
+
|
34
|
+
if (e) e.preventDefault()
|
35
|
+
|
36
|
+
if (!$parent.length) {
|
37
|
+
$parent = $this.hasClass('alert') ? $this : $this.parent()
|
38
|
+
}
|
39
|
+
|
40
|
+
$parent.trigger(e = $.Event('close.bs.alert'))
|
41
|
+
|
42
|
+
if (e.isDefaultPrevented()) return
|
43
|
+
|
44
|
+
$parent.removeClass('in')
|
45
|
+
|
46
|
+
function removeElement() {
|
47
|
+
// detach from parent, fire event then clean up data
|
48
|
+
$parent.detach().trigger('closed.bs.alert').remove()
|
49
|
+
}
|
50
|
+
|
51
|
+
$.support.transition && $parent.hasClass('fade') ?
|
52
|
+
$parent
|
53
|
+
.one('bsTransitionEnd', removeElement)
|
54
|
+
.emulateTransitionEnd(150) :
|
55
|
+
removeElement()
|
56
|
+
}
|
57
|
+
|
58
|
+
|
59
|
+
// ALERT PLUGIN DEFINITION
|
60
|
+
// =======================
|
61
|
+
|
62
|
+
function Plugin(option) {
|
63
|
+
return this.each(function () {
|
64
|
+
var $this = $(this)
|
65
|
+
var data = $this.data('bs.alert')
|
66
|
+
|
67
|
+
if (!data) $this.data('bs.alert', (data = new Alert(this)))
|
68
|
+
if (typeof option == 'string') data[option].call($this)
|
69
|
+
})
|
70
|
+
}
|
71
|
+
|
72
|
+
var old = $.fn.alert
|
73
|
+
|
74
|
+
$.fn.alert = Plugin
|
75
|
+
$.fn.alert.Constructor = Alert
|
76
|
+
|
77
|
+
|
78
|
+
// ALERT NO CONFLICT
|
79
|
+
// =================
|
80
|
+
|
81
|
+
$.fn.alert.noConflict = function () {
|
82
|
+
$.fn.alert = old
|
83
|
+
return this
|
84
|
+
}
|
85
|
+
|
86
|
+
|
87
|
+
// ALERT DATA-API
|
88
|
+
// ==============
|
89
|
+
|
90
|
+
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
|
91
|
+
|
92
|
+
}(jQuery);
|
@@ -1 +1 @@
|
|
1
|
-
//= require mice/
|
1
|
+
//= require mice/alert
|
@@ -0,0 +1,70 @@
|
|
1
|
+
//
|
2
|
+
// Alerts
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
// Mixin
|
6
|
+
@mixin alert-variant($background, $border, $text-color) {
|
7
|
+
background-color: $background;
|
8
|
+
border-color: $border;
|
9
|
+
color: $text-color;
|
10
|
+
|
11
|
+
hr { border-top-color: darken($border, 5%); }
|
12
|
+
a { color: darken($text-color, 10%); }
|
13
|
+
}
|
14
|
+
|
15
|
+
|
16
|
+
// Base styles
|
17
|
+
// -------------------------
|
18
|
+
|
19
|
+
.alert {
|
20
|
+
padding: $alert-padding;
|
21
|
+
margin-bottom: $line-height-computed;
|
22
|
+
border: 1px solid transparent;
|
23
|
+
border-radius: $alert-border-radius;
|
24
|
+
|
25
|
+
// Headings for larger alerts
|
26
|
+
h4 {
|
27
|
+
margin-top: 0;
|
28
|
+
// Specified for the h4 to prevent conflicts of changing $headings-color
|
29
|
+
color: inherit;
|
30
|
+
}
|
31
|
+
// Provide class for links that match alerts
|
32
|
+
a{
|
33
|
+
font-weight: $alert-link-font-weight;
|
34
|
+
}
|
35
|
+
|
36
|
+
// Improve alignment and spacing of inner content
|
37
|
+
> p,
|
38
|
+
> ul {
|
39
|
+
margin-bottom: 0;
|
40
|
+
}
|
41
|
+
> p + p {
|
42
|
+
margin-top: 5px;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
|
46
|
+
// Dismissible alerts
|
47
|
+
//
|
48
|
+
// Expand the right padding and account for the close button's positioning.
|
49
|
+
.alert.dismissible {
|
50
|
+
padding-right: ($alert-padding + 20);
|
51
|
+
|
52
|
+
// Adjust close link position
|
53
|
+
.close {
|
54
|
+
position: relative;
|
55
|
+
top: -2px;
|
56
|
+
right: -21px;
|
57
|
+
color: inherit;
|
58
|
+
}
|
59
|
+
}
|
60
|
+
|
61
|
+
// Alternate styles
|
62
|
+
//
|
63
|
+
// Generate contextual modifier classes for colorizing the alert.
|
64
|
+
|
65
|
+
.alert{
|
66
|
+
&.success {@include alert-variant($alert-success-background, $alert-success-border, $alert-success-text); }
|
67
|
+
&.info {@include alert-variant($alert-info-background, $alert-info-border, $alert-info-text); }
|
68
|
+
&.warning {@include alert-variant($alert-warning-background, $alert-warning-border, $alert-warning-text); }
|
69
|
+
&.danger {@include alert-variant($alert-danger-background, $alert-danger-border, $alert-danger-text); }
|
70
|
+
}
|
@@ -58,8 +58,12 @@ blockquote, .callout{
|
|
58
58
|
|
59
59
|
.callout{
|
60
60
|
border-width: 3px;
|
61
|
+
padding: ($line-height-computed / 2) $line-height-computed / 2;
|
62
|
+
font-size: $callout-font-size;
|
61
63
|
|
62
|
-
|
64
|
+
h1, h2, h3, h4, h5, h6{
|
65
|
+
&:first-child{ margin-top: 0; }
|
66
|
+
}
|
63
67
|
&.success { h1, h2, h3, h4, h5, h6{color: $border-color-success; }}
|
64
68
|
&.info { h1, h2, h3, h4, h5, h6{color: $border-color-info; }}
|
65
69
|
&.warning { h1, h2, h3, h4, h5, h6{color: $border-color-warning; }}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
//
|
2
|
+
// Close icons
|
3
|
+
// --------------------------------------------------
|
4
|
+
|
5
|
+
|
6
|
+
.close {
|
7
|
+
float: right;
|
8
|
+
font-size: ($font-size-base * 1.5);
|
9
|
+
font-weight: $close-font-weight;
|
10
|
+
line-height: 1;
|
11
|
+
color: $close-color;
|
12
|
+
text-shadow: $close-text-shadow;
|
13
|
+
@include opacity(.2);
|
14
|
+
|
15
|
+
&:hover,
|
16
|
+
&:focus {
|
17
|
+
color: $close-color;
|
18
|
+
text-decoration: none;
|
19
|
+
cursor: pointer;
|
20
|
+
@include opacity(.5);
|
21
|
+
}
|
22
|
+
|
23
|
+
// [converter] extracted button& to button.close
|
24
|
+
}
|
25
|
+
|
26
|
+
// Additional properties for button version
|
27
|
+
// iOS requires the button element instead of an anchor tag.
|
28
|
+
// If you want the anchor version, it requires `href="#"`.
|
29
|
+
button.close {
|
30
|
+
padding: 0;
|
31
|
+
cursor: pointer;
|
32
|
+
background: transparent;
|
33
|
+
border: 0;
|
34
|
+
-webkit-appearance: none;
|
35
|
+
}
|
@@ -118,6 +118,8 @@ $heading-small-color: $gray-light !default;
|
|
118
118
|
$blockquote-small-color: $gray-light !default;
|
119
119
|
$blockquote-font-size: ($font-size-base * 1.25) !default;
|
120
120
|
|
121
|
+
$callout-font-size: $font-size-base !default;
|
122
|
+
|
121
123
|
$page-header-border-color: $gray-lighter !default;
|
122
124
|
|
123
125
|
$blockquote-border-color: $gray-lighter !default;
|
@@ -378,3 +380,34 @@ $progress-bar-danger-background: $brand-danger !default;
|
|
378
380
|
//** Info progress bar color
|
379
381
|
$progress-bar-info-background: $brand-info !default;
|
380
382
|
|
383
|
+
|
384
|
+
//== Alerts
|
385
|
+
// --------------------------------------------------
|
386
|
+
$alert-padding: 15px !default;
|
387
|
+
$alert-border-radius: $border-radius !default;
|
388
|
+
$alert-link-font-weight: bold !default;
|
389
|
+
|
390
|
+
$alert-success-background: $state-success-background !default;
|
391
|
+
$alert-success-text: $state-success-text !default;
|
392
|
+
$alert-success-border: $state-success-border !default;
|
393
|
+
|
394
|
+
$alert-info-background: $state-info-background !default;
|
395
|
+
$alert-info-text: $state-info-text !default;
|
396
|
+
$alert-info-border: $state-info-border !default;
|
397
|
+
|
398
|
+
$alert-warning-background: $state-warning-background !default;
|
399
|
+
$alert-warning-text: $state-warning-text !default;
|
400
|
+
$alert-warning-border: $state-warning-border !default;
|
401
|
+
|
402
|
+
$alert-danger-background: $state-danger-background !default;
|
403
|
+
$alert-danger-text: $state-danger-text !default;
|
404
|
+
$alert-danger-border: $state-danger-border !default;
|
405
|
+
|
406
|
+
|
407
|
+
//== Close
|
408
|
+
// --------------------------------------------------
|
409
|
+
$close-font-weight: bold !default;
|
410
|
+
$close-color: #000 !default;
|
411
|
+
$close-text-shadow: 0 1px 0 #fff !default;
|
412
|
+
|
413
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mice
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- miclle
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-06-
|
11
|
+
date: 2014-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|
@@ -62,6 +62,7 @@ files:
|
|
62
62
|
- vendor/assets/javascripts/mice.js
|
63
63
|
- vendor/assets/javascripts/mice/ZeroClipboard.js
|
64
64
|
- vendor/assets/javascripts/mice/ZeroClipboard.min.js
|
65
|
+
- vendor/assets/javascripts/mice/alert.js
|
65
66
|
- vendor/assets/javascripts/mice/jquery.autocomplete.min.js
|
66
67
|
- vendor/assets/javascripts/mice/jquery.email-autocomplete.js
|
67
68
|
- vendor/assets/javascripts/mice/jquery.js
|
@@ -69,8 +70,10 @@ files:
|
|
69
70
|
- vendor/assets/javascripts/mice/jquery.min.map
|
70
71
|
- vendor/assets/stylesheets/mice-mobile.scss
|
71
72
|
- vendor/assets/stylesheets/mice.scss
|
73
|
+
- vendor/assets/stylesheets/mice/_alerts.scss
|
72
74
|
- vendor/assets/stylesheets/mice/_buttons.scss
|
73
75
|
- vendor/assets/stylesheets/mice/_callouts.scss
|
76
|
+
- vendor/assets/stylesheets/mice/_close.scss
|
74
77
|
- vendor/assets/stylesheets/mice/_code.scss
|
75
78
|
- vendor/assets/stylesheets/mice/_forms.scss
|
76
79
|
- vendor/assets/stylesheets/mice/_grid.scss
|