padrino-admin 0.11.3 → 0.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.rdoc +3 -3
- data/lib/padrino-admin/access_control.rb +46 -47
- data/lib/padrino-admin/bootstrap-less/alerts.less +29 -55
- data/lib/padrino-admin/bootstrap-less/badges.less +13 -15
- data/lib/padrino-admin/bootstrap-less/bootstrap.less +17 -21
- data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +6 -11
- data/lib/padrino-admin/bootstrap-less/button-groups.less +114 -32
- data/lib/padrino-admin/bootstrap-less/buttons.less +41 -41
- data/lib/padrino-admin/bootstrap-less/carousel.less +43 -18
- data/lib/padrino-admin/bootstrap-less/close.less +4 -4
- data/lib/padrino-admin/bootstrap-less/code.less +8 -10
- data/lib/padrino-admin/bootstrap-less/component-animations.less +10 -4
- data/lib/padrino-admin/bootstrap-less/dropdowns.less +78 -51
- data/lib/padrino-admin/bootstrap-less/forms.less +183 -274
- data/lib/padrino-admin/bootstrap-less/glyphicons.less +232 -0
- data/lib/padrino-admin/bootstrap-less/grid.less +230 -88
- data/lib/padrino-admin/bootstrap-less/input-groups.less +127 -0
- data/lib/padrino-admin/bootstrap-less/jumbotron.less +16 -8
- data/lib/padrino-admin/bootstrap-less/labels.less +25 -37
- data/lib/padrino-admin/bootstrap-less/list-group.less +34 -35
- data/lib/padrino-admin/bootstrap-less/media.less +7 -5
- data/lib/padrino-admin/bootstrap-less/mixins.less +321 -108
- data/lib/padrino-admin/bootstrap-less/modals.less +24 -20
- data/lib/padrino-admin/bootstrap-less/navbar.less +474 -216
- data/lib/padrino-admin/bootstrap-less/navs.less +67 -85
- data/lib/padrino-admin/bootstrap-less/pager.less +4 -4
- data/lib/padrino-admin/bootstrap-less/pagination.less +64 -69
- data/lib/padrino-admin/bootstrap-less/panels.less +114 -62
- data/lib/padrino-admin/bootstrap-less/popovers.less +18 -18
- data/lib/padrino-admin/bootstrap-less/print.less +22 -7
- data/lib/padrino-admin/bootstrap-less/progress-bars.less +10 -33
- data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +141 -40
- data/lib/padrino-admin/bootstrap-less/scaffolding.less +66 -19
- data/lib/padrino-admin/bootstrap-less/tables.less +154 -158
- data/lib/padrino-admin/bootstrap-less/theme.less +232 -0
- data/lib/padrino-admin/bootstrap-less/thumbnails.less +9 -20
- data/lib/padrino-admin/bootstrap-less/tooltip.less +3 -3
- data/lib/padrino-admin/bootstrap-less/type.less +47 -55
- data/lib/padrino-admin/bootstrap-less/utilities.less +2 -2
- data/lib/padrino-admin/bootstrap-less/variables.less +289 -93
- data/lib/padrino-admin/bootstrap-less/wells.less +2 -2
- data/lib/padrino-admin/generators/actions.rb +11 -10
- data/lib/padrino-admin/generators/admin_app.rb +11 -11
- data/lib/padrino-admin/generators/admin_page.rb +9 -9
- data/lib/padrino-admin/generators/orm.rb +6 -7
- data/lib/padrino-admin/generators/templates/account/activerecord.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/couchrest.rb.tt +16 -16
- data/lib/padrino-admin/generators/templates/account/datamapper.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/minirecord.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/mongoid.rb.tt +8 -8
- data/lib/padrino-admin/generators/templates/account/mongomapper.rb.tt +7 -7
- data/lib/padrino-admin/generators/templates/account/ohm.rb.tt +9 -9
- data/lib/padrino-admin/generators/templates/account/sequel.rb.tt +8 -8
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/affix.js +9 -3
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/alert.js +4 -2
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +4 -4
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/button.js +9 -5
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/carousel.js +19 -12
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/collapse.js +68 -45
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/dropdown.js +6 -7
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/modal.js +43 -40
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/popover.js +16 -10
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/scrollspy.js +6 -4
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tab.js +4 -2
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/tooltip.js +78 -48
- data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/transition.js +10 -1
- data/lib/padrino-admin/generators/templates/assets/stylesheets/application.css +1 -0
- data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +622 -334
- data/lib/padrino-admin/generators/templates/erb/app/layouts/error.erb.tt +2 -2
- data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +9 -9
- data/lib/padrino-admin/generators/templates/erb/page/_form.erb.tt +3 -3
- data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +3 -3
- data/lib/padrino-admin/generators/templates/haml/app/layouts/error.haml.tt +1 -1
- data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +9 -7
- data/lib/padrino-admin/generators/templates/haml/page/_form.haml.tt +2 -2
- data/lib/padrino-admin/generators/templates/haml/page/index.haml.tt +2 -2
- data/lib/padrino-admin/generators/templates/page/controller.rb.tt +3 -3
- data/lib/padrino-admin/generators/templates/slim/app/layouts/error.slim.tt +1 -1
- data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +9 -7
- data/lib/padrino-admin/generators/templates/slim/page/_form.slim.tt +2 -2
- data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +2 -2
- data/lib/padrino-admin/helpers/authentication_helpers.rb +35 -35
- data/lib/padrino-admin/helpers/view_helpers.rb +12 -19
- data/lib/padrino-admin/utils/crypt.rb +10 -9
- data/lib/padrino-admin.rb +4 -5
- data/test/fixtures/data_mapper.rb +10 -9
- data/test/generators/test_account_model_generator.rb +2 -2
- metadata +14 -21
@@ -4,21 +4,32 @@
|
|
4
4
|
|
5
5
|
|
6
6
|
// Dropdown arrow/caret
|
7
|
-
// --------------------
|
8
7
|
.caret {
|
9
8
|
display: inline-block;
|
10
9
|
width: 0;
|
11
10
|
height: 0;
|
12
11
|
margin-left: 2px;
|
13
12
|
vertical-align: middle;
|
14
|
-
border-top:
|
15
|
-
border-right:
|
16
|
-
border-left:
|
13
|
+
border-top: @caret-width-base solid @dropdown-caret-color;
|
14
|
+
border-right: @caret-width-base solid transparent;
|
15
|
+
border-left: @caret-width-base solid transparent;
|
16
|
+
// Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once fixed,
|
17
|
+
// we can just straight up remove this.
|
18
|
+
border-bottom: 0 dotted;
|
17
19
|
content: "";
|
18
20
|
}
|
19
21
|
|
22
|
+
// The dropdown wrapper (div)
|
23
|
+
.dropdown {
|
24
|
+
position: relative;
|
25
|
+
}
|
26
|
+
|
27
|
+
// Prevent the focus on the dropdown toggle when closing dropdowns
|
28
|
+
.dropdown-toggle:focus {
|
29
|
+
outline: 0;
|
30
|
+
}
|
31
|
+
|
20
32
|
// The dropdown menu (ul)
|
21
|
-
// ----------------------
|
22
33
|
.dropdown-menu {
|
23
34
|
position: absolute;
|
24
35
|
top: 100%;
|
@@ -30,12 +41,13 @@
|
|
30
41
|
padding: 5px 0;
|
31
42
|
margin: 2px 0 0; // override default ul
|
32
43
|
list-style: none;
|
44
|
+
font-size: @font-size-base;
|
33
45
|
background-color: @dropdown-bg;
|
34
|
-
border: 1px solid
|
46
|
+
border: 1px solid @dropdown-fallback-border; // IE8 fallback
|
35
47
|
border: 1px solid @dropdown-border;
|
36
48
|
border-radius: @border-radius-base;
|
37
49
|
.box-shadow(0 6px 12px rgba(0,0,0,.175));
|
38
|
-
|
50
|
+
background-clip: padding-box;
|
39
51
|
|
40
52
|
// Aligns the dropdown menu to right
|
41
53
|
&.pull-right {
|
@@ -45,7 +57,7 @@
|
|
45
57
|
|
46
58
|
// Dividers (basically an hr) within the dropdown
|
47
59
|
.divider {
|
48
|
-
.nav-divider(@dropdown-divider-
|
60
|
+
.nav-divider(@dropdown-divider-bg);
|
49
61
|
}
|
50
62
|
|
51
63
|
// Links within the dropdown menu
|
@@ -61,45 +73,51 @@
|
|
61
73
|
}
|
62
74
|
|
63
75
|
// Hover/Focus state
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
76
|
+
.dropdown-menu > li > a {
|
77
|
+
&:hover,
|
78
|
+
&:focus {
|
79
|
+
text-decoration: none;
|
80
|
+
color: @dropdown-link-hover-color;
|
81
|
+
background-color: @dropdown-link-hover-bg;
|
82
|
+
}
|
70
83
|
}
|
71
84
|
|
72
85
|
// Active state
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
86
|
+
.dropdown-menu > .active > a {
|
87
|
+
&,
|
88
|
+
&:hover,
|
89
|
+
&:focus {
|
90
|
+
color: @dropdown-link-active-color;
|
91
|
+
text-decoration: none;
|
92
|
+
outline: 0;
|
93
|
+
background-color: @dropdown-link-active-bg;
|
94
|
+
}
|
81
95
|
}
|
82
96
|
|
83
97
|
// Disabled state
|
84
|
-
//
|
98
|
+
//
|
85
99
|
// Gray out text and ensure the hover/focus state remains gray
|
86
|
-
|
87
|
-
.dropdown-menu > .disabled > a
|
88
|
-
|
89
|
-
|
100
|
+
|
101
|
+
.dropdown-menu > .disabled > a {
|
102
|
+
&,
|
103
|
+
&:hover,
|
104
|
+
&:focus {
|
105
|
+
color: @dropdown-link-disabled-color;
|
106
|
+
}
|
90
107
|
}
|
91
108
|
// Nuke hover/focus effects
|
92
|
-
.dropdown-menu > .disabled > a
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
109
|
+
.dropdown-menu > .disabled > a {
|
110
|
+
&:hover,
|
111
|
+
&:focus {
|
112
|
+
text-decoration: none;
|
113
|
+
background-color: transparent;
|
114
|
+
background-image: none; // Remove CSS gradient
|
115
|
+
.reset-filter();
|
116
|
+
cursor: not-allowed;
|
117
|
+
}
|
99
118
|
}
|
100
119
|
|
101
120
|
// Open state for the dropdown
|
102
|
-
// ---------------------------
|
103
121
|
.open {
|
104
122
|
// Show the menu
|
105
123
|
> .dropdown-menu {
|
@@ -112,9 +130,16 @@
|
|
112
130
|
}
|
113
131
|
}
|
114
132
|
|
133
|
+
// Dropdown section headers
|
134
|
+
.dropdown-header {
|
135
|
+
display: block;
|
136
|
+
padding: 3px 20px;
|
137
|
+
font-size: @font-size-small;
|
138
|
+
line-height: @line-height-base;
|
139
|
+
color: @dropdown-header-color;
|
140
|
+
}
|
115
141
|
|
116
142
|
// Backdrop to catch body clicks on mobile, etc.
|
117
|
-
// ---------------------------
|
118
143
|
.dropdown-backdrop {
|
119
144
|
position: fixed;
|
120
145
|
left: 0;
|
@@ -125,22 +150,24 @@
|
|
125
150
|
}
|
126
151
|
|
127
152
|
// Right aligned dropdowns
|
128
|
-
// ---------------------------
|
129
153
|
.pull-right > .dropdown-menu {
|
130
154
|
right: 0;
|
131
155
|
left: auto;
|
132
156
|
}
|
133
157
|
|
134
158
|
// Allow for dropdowns to go bottom up (aka, dropup-menu)
|
135
|
-
//
|
159
|
+
//
|
136
160
|
// Just add .dropup after the standard .dropdown class and you're set, bro.
|
137
161
|
// TODO: abstract this so that the navbar fixed styles are not placed here?
|
162
|
+
|
138
163
|
.dropup,
|
139
164
|
.navbar-fixed-bottom .dropdown {
|
140
165
|
// Reverse the caret
|
141
166
|
.caret {
|
142
|
-
|
143
|
-
border-
|
167
|
+
// Firefox fix for https://github.com/twbs/bootstrap/issues/9538. Once this
|
168
|
+
// gets fixed, restore `border-top: 0;`.
|
169
|
+
border-top: 0 dotted;
|
170
|
+
border-bottom: 4px solid @dropdown-caret-color;
|
144
171
|
content: "";
|
145
172
|
}
|
146
173
|
// Different positioning for bottom up menu
|
@@ -151,16 +178,16 @@
|
|
151
178
|
}
|
152
179
|
}
|
153
180
|
|
154
|
-
// Tweak nav headers
|
155
|
-
// ---------------------------
|
156
|
-
// Increase padding from 15px to 20px on sides
|
157
|
-
.dropdown .dropdown-menu .nav-header {
|
158
|
-
padding-left: 20px;
|
159
|
-
padding-right: 20px;
|
160
|
-
}
|
161
181
|
|
162
|
-
//
|
163
|
-
//
|
164
|
-
.
|
165
|
-
|
182
|
+
// Component alignment
|
183
|
+
//
|
184
|
+
// Reiterate per navbar.less and the modified component alignment there.
|
185
|
+
|
186
|
+
@media (min-width: @grid-float-breakpoint) {
|
187
|
+
.navbar-right {
|
188
|
+
.dropdown-menu {
|
189
|
+
.pull-right > .dropdown-menu();
|
190
|
+
}
|
191
|
+
}
|
166
192
|
}
|
193
|
+
|