padrino-admin 0.10.7 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (164) hide show
  1. checksums.yaml +7 -0
  2. data/Rakefile +22 -1
  3. data/lib/padrino-admin.rb +8 -1
  4. data/lib/padrino-admin/access_control.rb +6 -4
  5. data/lib/padrino-admin/bootstrap-less/accordion.less +34 -0
  6. data/lib/padrino-admin/bootstrap-less/alerts.less +98 -0
  7. data/lib/padrino-admin/bootstrap-less/badges.less +58 -0
  8. data/lib/padrino-admin/bootstrap-less/bootstrap.less +62 -0
  9. data/lib/padrino-admin/bootstrap-less/breadcrumbs.less +25 -0
  10. data/lib/padrino-admin/bootstrap-less/button-groups.less +166 -0
  11. data/lib/padrino-admin/bootstrap-less/buttons.less +175 -0
  12. data/lib/padrino-admin/bootstrap-less/carousel.less +192 -0
  13. data/lib/padrino-admin/bootstrap-less/close.less +32 -0
  14. data/lib/padrino-admin/bootstrap-less/code.less +61 -0
  15. data/lib/padrino-admin/bootstrap-less/component-animations.less +32 -0
  16. data/lib/padrino-admin/bootstrap-less/dropdowns.less +223 -0
  17. data/lib/padrino-admin/bootstrap-less/font-awesome-ie7.less +350 -0
  18. data/lib/padrino-admin/bootstrap-less/font-awesome.less +537 -0
  19. data/lib/padrino-admin/bootstrap-less/forms.less +543 -0
  20. data/lib/padrino-admin/bootstrap-less/glyphicons.less +200 -0
  21. data/lib/padrino-admin/bootstrap-less/grid.less +49 -0
  22. data/lib/padrino-admin/bootstrap-less/jumbotron.less +32 -0
  23. data/lib/padrino-admin/bootstrap-less/labels.less +46 -0
  24. data/lib/padrino-admin/bootstrap-less/media.less +54 -0
  25. data/lib/padrino-admin/bootstrap-less/mixins.less +530 -0
  26. data/lib/padrino-admin/bootstrap-less/modals.less +136 -0
  27. data/lib/padrino-admin/bootstrap-less/navbar.less +379 -0
  28. data/lib/padrino-admin/bootstrap-less/navs.less +277 -0
  29. data/lib/padrino-admin/bootstrap-less/normalize.less +396 -0
  30. data/lib/padrino-admin/bootstrap-less/padrino-admin.less +16 -0
  31. data/lib/padrino-admin/bootstrap-less/pager.less +43 -0
  32. data/lib/padrino-admin/bootstrap-less/pagination.less +100 -0
  33. data/lib/padrino-admin/bootstrap-less/popovers.less +133 -0
  34. data/lib/padrino-admin/bootstrap-less/print.less +74 -0
  35. data/lib/padrino-admin/bootstrap-less/progress-bars.less +118 -0
  36. data/lib/padrino-admin/bootstrap-less/responsive-utilities.less +59 -0
  37. data/lib/padrino-admin/bootstrap-less/scaffolding.less +90 -0
  38. data/lib/padrino-admin/bootstrap-less/tables.less +231 -0
  39. data/lib/padrino-admin/bootstrap-less/thumbnails.less +42 -0
  40. data/lib/padrino-admin/bootstrap-less/tooltip.less +71 -0
  41. data/lib/padrino-admin/bootstrap-less/type.less +252 -0
  42. data/lib/padrino-admin/bootstrap-less/utilities.less +42 -0
  43. data/lib/padrino-admin/bootstrap-less/variables.less +316 -0
  44. data/lib/padrino-admin/bootstrap-less/wells.less +29 -0
  45. data/lib/padrino-admin/generators/actions.rb +18 -2
  46. data/lib/padrino-admin/generators/admin_app.rb +38 -26
  47. data/lib/padrino-admin/generators/admin_page.rb +8 -1
  48. data/lib/padrino-admin/generators/orm.rb +58 -11
  49. data/lib/padrino-admin/generators/templates/account/couchrest.rb.tt +1 -1
  50. data/lib/padrino-admin/generators/templates/account/{mini_record.rb.tt → minirecord.rb.tt} +0 -0
  51. data/lib/padrino-admin/generators/templates/account/mongoid.rb.tt +1 -1
  52. data/lib/padrino-admin/generators/templates/account/ohm.rb.tt +61 -0
  53. data/lib/padrino-admin/generators/templates/account/sequel.rb.tt +1 -1
  54. data/lib/padrino-admin/generators/templates/app.rb.tt +36 -29
  55. data/lib/padrino-admin/generators/templates/app/controllers/{base.rb → base.rb.tt} +1 -2
  56. data/lib/padrino-admin/generators/templates/app/controllers/sessions.rb.tt +6 -3
  57. data/lib/padrino-admin/generators/templates/assets/images/favicon.ico +0 -0
  58. data/lib/padrino-admin/generators/templates/assets/images/font/FontAwesome.otf +0 -0
  59. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.eot +0 -0
  60. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.svg +284 -0
  61. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.ttf +0 -0
  62. data/lib/padrino-admin/generators/templates/assets/images/font/fontawesome-webfont.woff +0 -0
  63. data/lib/padrino-admin/generators/templates/assets/images/logo.png +0 -0
  64. data/lib/padrino-admin/generators/templates/assets/javascripts/application.js +117 -0
  65. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-affix.js +117 -0
  66. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-alert.js +99 -0
  67. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-button.js +105 -0
  68. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-carousel.js +207 -0
  69. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-collapse.js +167 -0
  70. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-dropdown.js +165 -0
  71. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-modal.js +251 -0
  72. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-popover.js +114 -0
  73. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-scrollspy.js +162 -0
  74. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-tab.js +144 -0
  75. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-tooltip.js +361 -0
  76. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-transition.js +60 -0
  77. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap-typeahead.js +335 -0
  78. data/lib/padrino-admin/generators/templates/assets/javascripts/bootstrap/bootstrap.min.js +6 -0
  79. data/lib/padrino-admin/generators/templates/assets/javascripts/jquery-1.9.0.min.js +4 -0
  80. data/lib/padrino-admin/generators/templates/assets/stylesheets/application.css +346 -0
  81. data/lib/padrino-admin/generators/templates/assets/stylesheets/bootstrap.css +952 -0
  82. data/lib/padrino-admin/generators/templates/erb/app/base/index.erb.tt +13 -15
  83. data/lib/padrino-admin/generators/templates/erb/app/errors/403.erb.tt +3 -0
  84. data/lib/padrino-admin/generators/templates/erb/app/errors/404.erb.tt +3 -0
  85. data/lib/padrino-admin/generators/templates/erb/app/errors/500.erb.tt +3 -0
  86. data/lib/padrino-admin/generators/templates/erb/app/layouts/application.erb.tt +59 -39
  87. data/lib/padrino-admin/generators/templates/erb/app/layouts/error.erb.tt +23 -0
  88. data/lib/padrino-admin/generators/templates/erb/app/sessions/new.erb.tt +41 -53
  89. data/lib/padrino-admin/generators/templates/erb/page/_form.erb.tt +16 -9
  90. data/lib/padrino-admin/generators/templates/erb/page/edit.erb.tt +9 -17
  91. data/lib/padrino-admin/generators/templates/erb/page/index.erb.tt +73 -31
  92. data/lib/padrino-admin/generators/templates/erb/page/new.erb.tt +8 -16
  93. data/lib/padrino-admin/generators/templates/haml/app/base/index.haml.tt +11 -24
  94. data/lib/padrino-admin/generators/templates/haml/app/errors/403.haml.tt +3 -0
  95. data/lib/padrino-admin/generators/templates/haml/app/errors/404.haml.tt +3 -0
  96. data/lib/padrino-admin/generators/templates/haml/app/errors/500.haml.tt +3 -0
  97. data/lib/padrino-admin/generators/templates/haml/app/layouts/application.haml.tt +47 -29
  98. data/lib/padrino-admin/generators/templates/haml/app/layouts/error.haml.tt +18 -0
  99. data/lib/padrino-admin/generators/templates/haml/app/sessions/new.haml.tt +33 -28
  100. data/lib/padrino-admin/generators/templates/haml/page/_form.haml.tt +13 -9
  101. data/lib/padrino-admin/generators/templates/haml/page/edit.haml.tt +7 -14
  102. data/lib/padrino-admin/generators/templates/haml/page/index.haml.tt +56 -27
  103. data/lib/padrino-admin/generators/templates/haml/page/new.haml.tt +6 -13
  104. data/lib/padrino-admin/generators/templates/page/controller.rb.tt +57 -12
  105. data/lib/padrino-admin/generators/templates/slim/app/base/index.slim.tt +11 -24
  106. data/lib/padrino-admin/generators/templates/slim/app/errors/403.slim.tt +3 -0
  107. data/lib/padrino-admin/generators/templates/slim/app/errors/404.slim.tt +3 -0
  108. data/lib/padrino-admin/generators/templates/slim/app/errors/500.slim.tt +3 -0
  109. data/lib/padrino-admin/generators/templates/slim/app/layouts/application.slim.tt +43 -26
  110. data/lib/padrino-admin/generators/templates/slim/app/layouts/error.slim.tt +19 -0
  111. data/lib/padrino-admin/generators/templates/slim/app/sessions/new.slim.tt +31 -27
  112. data/lib/padrino-admin/generators/templates/slim/page/_form.slim.tt +13 -11
  113. data/lib/padrino-admin/generators/templates/slim/page/edit.slim.tt +7 -15
  114. data/lib/padrino-admin/generators/templates/slim/page/index.slim.tt +54 -28
  115. data/lib/padrino-admin/generators/templates/slim/page/new.slim.tt +6 -14
  116. data/lib/padrino-admin/helpers/authentication_helpers.rb +6 -4
  117. data/lib/padrino-admin/helpers/view_helpers.rb +27 -5
  118. data/lib/padrino-admin/locale/admin/cs.yml +53 -13
  119. data/lib/padrino-admin/locale/admin/da.yml +53 -13
  120. data/lib/padrino-admin/locale/admin/de.yml +53 -13
  121. data/lib/padrino-admin/locale/admin/en.yml +53 -13
  122. data/lib/padrino-admin/locale/admin/es.yml +53 -13
  123. data/lib/padrino-admin/locale/admin/fr.yml +53 -13
  124. data/lib/padrino-admin/locale/admin/hu.yml +53 -13
  125. data/lib/padrino-admin/locale/admin/it.yml +53 -13
  126. data/lib/padrino-admin/locale/admin/ja.yml +54 -13
  127. data/lib/padrino-admin/locale/admin/lv.yml +53 -13
  128. data/lib/padrino-admin/locale/admin/nl.yml +53 -13
  129. data/lib/padrino-admin/locale/admin/no.yml +53 -13
  130. data/lib/padrino-admin/locale/admin/pl.yml +53 -13
  131. data/lib/padrino-admin/locale/admin/pt_br.yml +53 -13
  132. data/lib/padrino-admin/locale/admin/ro.yml +53 -13
  133. data/lib/padrino-admin/locale/admin/ru.yml +54 -13
  134. data/lib/padrino-admin/locale/admin/sv.yml +53 -13
  135. data/lib/padrino-admin/locale/admin/tr.yml +53 -13
  136. data/lib/padrino-admin/locale/admin/uk.yml +53 -13
  137. data/lib/padrino-admin/locale/admin/zh_cn.yml +53 -13
  138. data/lib/padrino-admin/locale/admin/zh_tw.yml +53 -13
  139. data/lib/padrino-admin/locale/orm/fr.yml +8 -8
  140. data/padrino-admin.gemspec +2 -0
  141. data/test/fixtures/data_mapper.rb +0 -4
  142. data/test/generators/test_account_model_generator.rb +88 -18
  143. data/test/generators/test_admin_app_generator.rb +120 -165
  144. data/test/generators/test_admin_page_generator.rb +53 -56
  145. data/test/helper.rb +4 -0
  146. data/test/test_admin_application.rb +5 -5
  147. data/test/test_locale.rb +3 -3
  148. metadata +119 -35
  149. data/lib/padrino-admin/generators/templates/assets/stylesheets/base.css +0 -95
  150. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/amro/style.css +0 -364
  151. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec-green/style.css +0 -290
  152. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/bec/style.css +0 -301
  153. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/blue/style.css +0 -287
  154. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/default/style.css +0 -373
  155. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/djime-cerulean/style.css +0 -305
  156. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/kathleene/style.css +0 -279
  157. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/olive/style.css +0 -345
  158. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/orange/style.css +0 -269
  159. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/reidb-greenish/style.css +0 -302
  160. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/ruby/style.css +0 -281
  161. data/lib/padrino-admin/generators/templates/assets/stylesheets/themes/warehouse/style.css +0 -391
  162. data/lib/padrino-admin/generators/templates/erb/app/base/_sidebar.erb.tt +0 -13
  163. data/lib/padrino-admin/generators/templates/haml/app/base/_sidebar.haml.tt +0 -11
  164. data/lib/padrino-admin/generators/templates/slim/app/base/_sidebar.slim.tt +0 -11
@@ -0,0 +1,59 @@
1
+ //
2
+ // Responsive: Utility classes
3
+ // --------------------------------------------------
4
+
5
+
6
+ // IE10 Metro responsive
7
+ // Required for Windows 8 Metro split-screen snapping with IE10
8
+ // Source: http://timkadlec.com/2012/10/ie10-snap-mode-and-responsive-design/
9
+ @-ms-viewport{
10
+ width: device-width;
11
+ }
12
+
13
+ // Hide from screenreaders and browsers
14
+ // Credit: HTML5 Boilerplate
15
+ .hidden {
16
+ display: none;
17
+ visibility: hidden;
18
+ }
19
+
20
+ // Visibility utilities
21
+
22
+ // For desktops
23
+ .visible-phone { display: none !important; }
24
+ .visible-tablet { display: none !important; }
25
+ .hidden-phone { }
26
+ .hidden-tablet { }
27
+ .hidden-desktop { display: none !important; }
28
+ .visible-desktop { display: inherit !important; }
29
+
30
+ // Tablets & small desktops only
31
+ @media (min-width: 768px) and (max-width: 979px) {
32
+ // Hide everything else
33
+ .hidden-desktop { display: inherit !important; }
34
+ .visible-desktop { display: none !important ; }
35
+ // Show
36
+ .visible-tablet { display: inherit !important; }
37
+ // Hide
38
+ .hidden-tablet { display: none !important; }
39
+ }
40
+
41
+ // Phones only
42
+ @media (max-width: 767px) {
43
+ // Hide everything else
44
+ .hidden-desktop { display: inherit !important; }
45
+ .visible-desktop { display: none !important; }
46
+ // Show
47
+ .visible-phone { display: inherit !important; } // Use inherit to restore previous behavior
48
+ // Hide
49
+ .hidden-phone { display: none !important; }
50
+ }
51
+
52
+ // Print utilities
53
+ .visible-print { display: none !important; }
54
+ .hidden-print { }
55
+
56
+ @media print {
57
+ .visible-print { display: inherit !important; }
58
+ .hidden-print { display: none !important; }
59
+ }
@@ -0,0 +1,90 @@
1
+ //
2
+ // Scaffolding
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Reset the box-sizing
7
+ // -------------------------
8
+
9
+ * {
10
+ .box-sizing(border-box);
11
+ }
12
+
13
+
14
+ // Body reset
15
+ // -------------------------
16
+
17
+ html {
18
+ font-size: 62.5%;
19
+ // Touch the Mobile Magic™
20
+ -webkit-overflow-scrolling: touch;
21
+ -webkit-tap-highlight-color: rgba(0,0,0,0);
22
+ }
23
+
24
+ // Disable iOS/WinMobile font size changes
25
+ @media screen and (max-device-width: 480px) {
26
+ html {
27
+ -webkit-text-size-adjust: 100%;
28
+ -ms-text-size-adjust: 100%;
29
+ }
30
+ }
31
+
32
+ body {
33
+ color: @text-color;
34
+ background-color: @body-background;
35
+ }
36
+
37
+ // Reset fonts for revelant elements
38
+ body,
39
+ input,
40
+ button,
41
+ select,
42
+ textarea {
43
+ font-family: @font-family-base;
44
+ .font-size();
45
+ line-height: @line-height-base;
46
+ }
47
+
48
+
49
+ // Links
50
+ // -------------------------
51
+
52
+ a {
53
+ color: @link-color;
54
+ text-decoration: none;
55
+ }
56
+ a:hover,
57
+ a:focus {
58
+ color: @link-color-hover;
59
+ text-decoration: underline;
60
+ }
61
+ a:focus {
62
+ .tab-focus();
63
+ }
64
+
65
+
66
+ // Images
67
+ // -------------------------
68
+
69
+ img {
70
+ // Responsive images (ensure images don't scale beyond their parents)
71
+ max-width: 100%; // Part 1: Set a maxium relative to the parent
72
+ width: auto\9; // IE8 need help adjusting responsive images
73
+ height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching
74
+
75
+ // Match vertical alignment with other comment elements
76
+ vertical-align: middle;
77
+ }
78
+
79
+ // Rounded corners
80
+ .img-rounded {
81
+ border-radius: 6px;
82
+ }
83
+
84
+ // Image thumbnails
85
+ // See thumbnails.less for `.img-thumbnail`
86
+
87
+ // Perfect circle
88
+ .img-circle {
89
+ border-radius: 500px; // crank the border-radius so it works with most reasonably sized images
90
+ }
@@ -0,0 +1,231 @@
1
+ //
2
+ // Tables
3
+ // --------------------------------------------------
4
+
5
+
6
+ table {
7
+ max-width: 100%;
8
+ background-color: @table-background;
9
+ border-collapse: collapse;
10
+ border-spacing: 0;
11
+ }
12
+ th {
13
+ text-align: left;
14
+ }
15
+
16
+
17
+ // BASELINE STYLES
18
+ // ---------------
19
+
20
+ .table {
21
+ width: 100%;
22
+ margin-bottom: @line-height-base;
23
+ // Cells
24
+ th,
25
+ td {
26
+ padding: 8px;
27
+ line-height: @line-height-base;
28
+ vertical-align: top;
29
+ border-top: 1px solid @table-border;
30
+ }
31
+ // Bottom align for column headings
32
+ thead th {
33
+ vertical-align: bottom;
34
+ }
35
+ // Remove top border from thead by default
36
+ caption + thead tr:first-child th,
37
+ caption + thead tr:first-child td,
38
+ colgroup + thead tr:first-child th,
39
+ colgroup + thead tr:first-child td,
40
+ thead:first-child tr:first-child th,
41
+ thead:first-child tr:first-child td {
42
+ border-top: 0;
43
+ }
44
+ // Account for multiple tbody instances
45
+ tbody + tbody {
46
+ border-top: 2px solid @table-border;
47
+ }
48
+
49
+ // Nesting
50
+ .table {
51
+ background-color: @body-background;
52
+ }
53
+ }
54
+
55
+
56
+
57
+ // CONDENSED TABLE W/ HALF PADDING
58
+ // -------------------------------
59
+
60
+ .table-condensed {
61
+ th,
62
+ td {
63
+ padding: 4px 5px;
64
+ }
65
+ }
66
+
67
+
68
+
69
+ // BORDERED VERSION
70
+ // ----------------
71
+
72
+ .table-bordered {
73
+ border: 1px solid @table-border;
74
+ border-collapse: separate; // Done so we can round those corners!
75
+ border-left: 0;
76
+ border-radius: @border-radius-base;
77
+ th,
78
+ td {
79
+ border-left: 1px solid @table-border;
80
+ }
81
+ // Prevent a double border
82
+ caption + thead tr:first-child th,
83
+ caption + tbody tr:first-child th,
84
+ caption + tbody tr:first-child td,
85
+ colgroup + thead tr:first-child th,
86
+ colgroup + tbody tr:first-child th,
87
+ colgroup + tbody tr:first-child td,
88
+ thead:first-child tr:first-child th,
89
+ tbody:first-child tr:first-child th,
90
+ tbody:first-child tr:first-child td {
91
+ border-top: 0;
92
+ }
93
+ // For first th/td in the first row in the first thead or tbody
94
+ thead:first-child tr:first-child > th:first-child,
95
+ tbody:first-child tr:first-child > td:first-child,
96
+ tbody:first-child tr:first-child > th:first-child {
97
+ border-top-left-radius: @border-radius-base;
98
+ }
99
+ // For last th/td in the first row in the first thead or tbody
100
+ thead:first-child tr:first-child > th:last-child,
101
+ tbody:first-child tr:first-child > td:last-child,
102
+ tbody:first-child tr:first-child > th:last-child {
103
+ border-top-right-radius: @border-radius-base;
104
+ }
105
+ // For first th/td (can be either) in the last row in the last thead, tbody, and tfoot
106
+ thead:last-child tr:last-child > th:first-child,
107
+ tbody:last-child tr:last-child > td:first-child,
108
+ tbody:last-child tr:last-child > th:first-child,
109
+ tfoot:last-child tr:last-child > td:first-child,
110
+ tfoot:last-child tr:last-child > th:first-child {
111
+ border-bottom-left-radius: @border-radius-base;
112
+ }
113
+ // For last th/td (can be either) in the last row in the last thead, tbody, and tfoot
114
+ thead:last-child tr:last-child > th:last-child,
115
+ tbody:last-child tr:last-child > td:last-child,
116
+ tbody:last-child tr:last-child > th:last-child,
117
+ tfoot:last-child tr:last-child > td:last-child,
118
+ tfoot:last-child tr:last-child > th:last-child {
119
+ border-bottom-right-radius: @border-radius-base;
120
+ }
121
+
122
+ // Clear border-radius for first and last td in the last row in the last tbody for table with tfoot
123
+ tfoot + tbody:last-child tr:last-child > td:first-child {
124
+ border-bottom-left-radius: 0;
125
+ }
126
+ tfoot + tbody:last-child tr:last-child > td:last-child {
127
+ border-bottom-right-radius: 0;
128
+ }
129
+
130
+ // Special fixes to round the left border on the first td/th
131
+ caption + thead tr:first-child th:first-child,
132
+ caption + tbody tr:first-child td:first-child,
133
+ colgroup + thead tr:first-child th:first-child,
134
+ colgroup + tbody tr:first-child td:first-child {
135
+ border-top-left-radius: @border-radius-base;
136
+ }
137
+ caption + thead tr:first-child th:last-child,
138
+ caption + tbody tr:first-child td:last-child,
139
+ colgroup + thead tr:first-child th:last-child,
140
+ colgroup + tbody tr:first-child td:last-child {
141
+ border-top-right-radius: @border-radius-base;
142
+ }
143
+
144
+ }
145
+
146
+
147
+
148
+ // ZEBRA-STRIPING
149
+ // --------------
150
+
151
+ // Default zebra-stripe styles (alternating gray and transparent backgrounds)
152
+ .table-striped {
153
+ > tbody {
154
+ > tr:nth-child(odd) > td,
155
+ > tr:nth-child(odd) > th {
156
+ background-color: @table-background-accent;
157
+ }
158
+ }
159
+ }
160
+
161
+
162
+
163
+ // HOVER EFFECT
164
+ // ------------
165
+
166
+ // Placed here since it has to come after the potential zebra striping
167
+ .table-hover {
168
+ > tbody {
169
+ > tr:hover > td,
170
+ > tr:hover > th {
171
+ background-color: @table-background-hover;
172
+ }
173
+ }
174
+ }
175
+
176
+
177
+
178
+ // TABLE CELL SIZING
179
+ // -----------------
180
+
181
+ // Reset default table behavior
182
+ table col[class^="span"] {
183
+ float: none;
184
+ display: table-column;
185
+ }
186
+ table td[class^="span"],
187
+ table th[class^="span"] {
188
+ float: none;
189
+ display: table-cell;
190
+ }
191
+
192
+ // TABLE BACKGROUNDS
193
+ // -----------------
194
+ // Exact selectors below required to override .table-striped
195
+
196
+ .table > tbody > tr {
197
+ > td.success,
198
+ > th.success,
199
+ &.success > td {
200
+ background-color: @state-success-background;
201
+ }
202
+ > td.error,
203
+ > th.error,
204
+ &.error > td {
205
+ background-color: @state-error-background;
206
+ }
207
+ > td.warning,
208
+ > th.warning,
209
+ &.warning > td {
210
+ background-color: @state-warning-background;
211
+ }
212
+ }
213
+
214
+ // Hover states for .table-hover
215
+ .table-hover > tbody > tr {
216
+ > td.success:hover,
217
+ > th.success:hover,
218
+ &.success:hover > td {
219
+ background-color: darken(@state-success-background, 5%);
220
+ }
221
+ > td.error:hover,
222
+ > th.error:hover,
223
+ &.error:hover > td {
224
+ background-color: darken(@state-error-background, 5%);
225
+ }
226
+ > td.warning:hover,
227
+ > th.warning:hover,
228
+ &.warning:hover > td {
229
+ background-color: darken(@state-warning-background, 5%);
230
+ }
231
+ }
@@ -0,0 +1,42 @@
1
+ //
2
+ // Thumbnails
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base classes
7
+ // For thumbnail block-level composite components and simple image styles
8
+
9
+ // The actual thumbnailed element
10
+ // Can be `a`, `div`, or `img`
11
+ .thumbnail,
12
+ .img-thumbnail {
13
+ padding: 4px;
14
+ line-height: @line-height-base;
15
+ border: 1px solid #ddd;
16
+ border-radius: @border-radius-base;
17
+ .transition(all .2s ease-in-out);
18
+ }
19
+ .thumbnail {
20
+ display: block;
21
+ }
22
+ .img-thumbnail {
23
+ display: inline-block;
24
+ }
25
+
26
+ // Add a hover state for linked versions only
27
+ a.thumbnail:hover,
28
+ a.thumbnail:focus {
29
+ border-color: @link-color;
30
+ }
31
+
32
+ // Images and captions
33
+ .thumbnail > img {
34
+ display: block;
35
+ max-width: 100%;
36
+ margin-left: auto;
37
+ margin-right: auto;
38
+ }
39
+ .thumbnail .caption {
40
+ padding: 9px;
41
+ color: @gray;
42
+ }
@@ -0,0 +1,71 @@
1
+ //
2
+ // Tooltips
3
+ // --------------------------------------------------
4
+
5
+
6
+ // Base class
7
+ .tooltip {
8
+ position: absolute;
9
+ z-index: @zindex-tooltip;
10
+ display: block;
11
+ visibility: visible;
12
+ font-size: 11px;
13
+ line-height: 1.4;
14
+ .opacity(0);
15
+
16
+ &.in { .opacity(1); }
17
+ &.top { margin-top: -3px; padding: 5px 0; }
18
+ &.right { margin-left: 3px; padding: 0 5px; }
19
+ &.bottom { margin-top: 3px; padding: 5px 0; }
20
+ &.left { margin-left: -3px; padding: 0 5px; }
21
+ }
22
+
23
+ // Wrapper for the tooltip content
24
+ .tooltip-inner {
25
+ max-width: 200px;
26
+ padding: 3px 8px;
27
+ color: @tooltip-color;
28
+ text-align: center;
29
+ text-decoration: none;
30
+ background-color: @tooltip-background;
31
+ border-radius: @border-radius-base;
32
+ }
33
+
34
+ // Arrows
35
+ .tooltip-arrow {
36
+ position: absolute;
37
+ width: 0;
38
+ height: 0;
39
+ border-color: transparent;
40
+ border-style: solid;
41
+ }
42
+ .tooltip {
43
+ &.top .tooltip-arrow {
44
+ bottom: 0;
45
+ left: 50%;
46
+ margin-left: -@tooltip-arrow-width;
47
+ border-width: @tooltip-arrow-width @tooltip-arrow-width 0;
48
+ border-top-color: @tooltip-arrow-color;
49
+ }
50
+ &.right .tooltip-arrow {
51
+ top: 50%;
52
+ left: 0;
53
+ margin-top: -@tooltip-arrow-width;
54
+ border-width: @tooltip-arrow-width @tooltip-arrow-width @tooltip-arrow-width 0;
55
+ border-right-color: @tooltip-arrow-color;
56
+ }
57
+ &.left .tooltip-arrow {
58
+ top: 50%;
59
+ right: 0;
60
+ margin-top: -@tooltip-arrow-width;
61
+ border-width: @tooltip-arrow-width 0 @tooltip-arrow-width @tooltip-arrow-width;
62
+ border-left-color: @tooltip-arrow-color;
63
+ }
64
+ &.bottom .tooltip-arrow {
65
+ top: 0;
66
+ left: 50%;
67
+ margin-left: -@tooltip-arrow-width;
68
+ border-width: 0 @tooltip-arrow-width @tooltip-arrow-width;
69
+ border-bottom-color: @tooltip-arrow-color;
70
+ }
71
+ }