express_admin 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (159) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/javascripts/express_admin.js +2 -0
  3. data/app/assets/javascripts/express_admin/admin.js +2 -0
  4. data/app/assets/stylesheets/express_admin.css +0 -5
  5. data/app/assets/stylesheets/express_admin/components/_definition.sass +8 -0
  6. data/app/assets/stylesheets/express_admin/components/_pane.sass +2 -2
  7. data/app/assets/stylesheets/express_admin/components/_sub_menu.sass +2 -2
  8. data/app/assets/stylesheets/express_admin/components/_widget_box.sass +4 -4
  9. data/app/assets/stylesheets/express_admin/globals/_foundation_overrides.sass +2 -1
  10. data/app/assets/stylesheets/express_admin/globals/_mixins.sass +0 -2
  11. data/app/assets/stylesheets/express_admin/plugins/_select2.sass +475 -68
  12. data/app/assets/stylesheets/express_admin/plugins/_tinymce.sass +2 -0
  13. data/app/assets/stylesheets/express_admin/screen.sass +6 -1
  14. data/app/assets/stylesheets/express_admin/sections/_header.sass +1 -0
  15. data/app/assets/stylesheets/express_admin/sections/_main_content.sass +6 -2
  16. data/app/assets/stylesheets/express_admin/sections/_main_region.sass +10 -7
  17. data/app/assets/stylesheets/express_admin/sections/_page_body.sass +6 -3
  18. data/app/assets/stylesheets/express_admin/sections/_page_sidebar.sass +6 -2
  19. data/app/assets/stylesheets/express_admin/sections/_sidebar_region.sass +4 -3
  20. data/app/assets/stylesheets/express_admin/shared/_buttons.sass +0 -1
  21. data/app/assets/stylesheets/express_admin/shared/_forms.sass +14 -2
  22. data/app/assets/stylesheets/express_admin/shared/_trees.sass +7 -3
  23. data/app/assets/stylesheets/ionicons/{ionicons.css.sass → ionicons.sass} +0 -0
  24. data/app/components/express_admin/addon_sidebar_component.rb +23 -34
  25. data/app/components/express_admin/definition_list.rb +38 -0
  26. data/app/components/express_admin/definition_table.rb +51 -0
  27. data/app/components/express_admin/flash_message_component.rb +5 -11
  28. data/app/components/express_admin/layout_component.rb +2 -9
  29. data/app/components/express_admin/main_region.rb +4 -4
  30. data/app/components/express_admin/mega_menu_component.rb +40 -34
  31. data/app/components/express_admin/page_header_component.rb +8 -18
  32. data/app/components/express_admin/pane.rb +13 -10
  33. data/app/components/express_admin/setting_form.rb +23 -20
  34. data/app/components/express_admin/sidebar_region.rb +6 -4
  35. data/app/components/express_admin/smart_form.rb +21 -18
  36. data/app/components/express_admin/smart_table.rb +44 -40
  37. data/app/components/express_admin/widget_box.rb +8 -8
  38. data/app/helpers/express_admin/admin_helper.rb +1 -1
  39. data/app/views/devise/sessions/new.html.et +63 -0
  40. data/app/views/layouts/express_admin/admin.html.et +8 -9
  41. data/app/views/shared/express_admin/_navigation_bar.html.et +6 -5
  42. data/config/tinymce.yml +29 -0
  43. data/lib/core_extensions/string_promptify.rb +9 -0
  44. data/lib/express_admin.rb +1 -0
  45. data/lib/express_admin/engine.rb +11 -9
  46. data/lib/express_admin/version.rb +1 -1
  47. data/lib/generators/express_admin/install/install_generator.rb +7 -0
  48. data/lib/generators/express_admin/install/templates/views/devise/sessions/new.html.et +1 -0
  49. data/test/dummy/app/views/demo/sign_in.html.et +6 -6
  50. data/test/dummy/db/test.sqlite3 +0 -0
  51. data/test/dummy/log/test.log +11361 -0
  52. data/test/dummy/test/components/smart_form_test.rb +57 -34
  53. data/test/dummy/test/components/smart_table_test.rb +35 -35
  54. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/1EoyfDwFVtgMAOjo7HPkor8TQbVaioOFx9hildx_DTQ.cache +0 -0
  55. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/4OPIkynisipUm8vKo57HUhBMWFSHBno_IH6OdpK29IA.cache +1 -0
  56. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/4hK1AdPGHbXGkebvk-nSvhxtCdOSlMYNWvA43CvQKhI.cache +0 -0
  57. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/6c0H20s6oHf45XogeDELaojxa0PX1NmirTTWV1ClcRw.cache +0 -0
  58. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/9QvwPXfTSVmgQX6tdK9GuCn0--MZ8Z8eJJbHpUEq1p8.cache +1 -0
  59. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/BoKdGhgi5NHfGTc42p9nltpEIYj_BBUxVdv7YhpBmmA.cache +0 -0
  60. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/GJGMlSyTg1AvPCV_6PaLOTVEKbHeVKY1jhCoaKuRlxM.cache +1 -0
  61. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/H0aD5KRj-4fhORkqWcWZfKPOQfu_ggvt4OmYOl4S5mw.cache +0 -0
  62. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/IBLgVNsKBbJxN8NQnh6zTc3bC_OG-8BhtA3xCNDV6ks.cache +1 -0
  63. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/Po8q4NrWy9Kymnz_HbOk-WbdGY_KuuXc6urGogTHe7U.cache +0 -0
  64. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/V1aP9G-CVtOLR5PTnHleid8WC9TSfFAT1DzAygp_5CQ.cache +1 -0
  65. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/WhePtBvZPmF1Jhdcc4glsjhxBJQo9Qw0CDgy_F8lClY.cache +0 -0
  66. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/dVokuKbK8HbOtvPIksKGBAYE8x44l372dQ0gEISqbdo.cache +0 -0
  67. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/oN1zSGeSEz4KhkAuUF_yFDsCVPkulfFjomEAjFzGdPc.cache +0 -0
  68. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/qIeSoker4TjM7JYRQTOjgRd4nN0WeHnNY1GMK7Zpe8M.cache +0 -0
  69. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/tTFLM1bjKSeg4nyH7GWbTY6JVvuYhNKFFvsOMS9h8O0.cache +0 -0
  70. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/tzX-HHF4F70o-aSB9Z_duoPxFGDv3auYnrpko9SYafU.cache +1 -0
  71. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/vMbWbI1SO5bEaiu2pRvV8NDmms_j5flYoRvCSJavhdU.cache +0 -0
  72. data/test/dummy/tmp/cache/assets/test/sprockets/v3.0/ypZCDLo54Pz2ZoUxrxSEUjT5FYMAq8Ozp8OTOYDRdAE.cache +0 -0
  73. data/test/fixtures/categories.yml +8 -0
  74. data/test/test_helper.rb +34 -0
  75. data/vendor/gems/express_templates/CHANGELOG.md +12 -0
  76. data/vendor/gems/express_templates/Gemfile.lock +4 -1
  77. data/vendor/gems/express_templates/README.md +22 -41
  78. data/vendor/gems/express_templates/express_templates.gemspec +1 -0
  79. data/vendor/gems/express_templates/lib/arbre/patches.rb +50 -0
  80. data/vendor/gems/express_templates/lib/core_extensions/proc.rb +1 -0
  81. data/vendor/gems/express_templates/lib/express_templates.rb +2 -3
  82. data/vendor/gems/express_templates/lib/express_templates/compiler.rb +2 -7
  83. data/vendor/gems/express_templates/lib/express_templates/components.rb +1 -9
  84. data/vendor/gems/express_templates/lib/express_templates/components/base.rb +33 -37
  85. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/resourceful.rb +30 -18
  86. data/vendor/gems/express_templates/lib/express_templates/components/configurable.rb +41 -0
  87. data/vendor/gems/express_templates/lib/express_templates/components/form_rails_support.rb +5 -6
  88. data/vendor/gems/express_templates/lib/express_templates/components/forms.rb +0 -1
  89. data/vendor/gems/express_templates/lib/express_templates/components/forms/basic_fields.rb +3 -6
  90. data/vendor/gems/express_templates/lib/express_templates/components/forms/checkbox.rb +1 -1
  91. data/vendor/gems/express_templates/lib/express_templates/components/forms/express_form.rb +15 -25
  92. data/vendor/gems/express_templates/lib/express_templates/components/forms/form_component.rb +20 -11
  93. data/vendor/gems/express_templates/lib/express_templates/components/forms/option_support.rb +2 -2
  94. data/vendor/gems/express_templates/lib/express_templates/components/forms/radio.rb +7 -8
  95. data/vendor/gems/express_templates/lib/express_templates/components/forms/select.rb +61 -37
  96. data/vendor/gems/express_templates/lib/express_templates/components/forms/select_collection.rb +2 -8
  97. data/vendor/gems/express_templates/lib/express_templates/components/forms/submit.rb +7 -6
  98. data/vendor/gems/express_templates/lib/express_templates/components/tree_for.rb +26 -42
  99. data/vendor/gems/express_templates/lib/express_templates/version.rb +1 -1
  100. data/vendor/gems/express_templates/test/components/base_test.rb +17 -15
  101. data/vendor/gems/express_templates/test/components/capabilities/resourceful_test.rb +3 -3
  102. data/vendor/gems/express_templates/test/components/configurable_test.rb +27 -21
  103. data/vendor/gems/express_templates/test/components/forms/basic_fields_test.rb +57 -17
  104. data/vendor/gems/express_templates/test/components/forms/checkbox_test.rb +16 -22
  105. data/vendor/gems/express_templates/test/components/forms/express_form_test.rb +23 -76
  106. data/vendor/gems/express_templates/test/components/forms/radio_test.rb +31 -27
  107. data/vendor/gems/express_templates/test/components/forms/select_test.rb +46 -71
  108. data/vendor/gems/express_templates/test/components/forms/submit_test.rb +10 -5
  109. data/vendor/gems/express_templates/test/components/tree_for_test.rb +24 -52
  110. data/vendor/gems/express_templates/test/dummy/app/views/hello/show.html.et +4 -3
  111. data/vendor/gems/express_templates/test/dummy/app/views/layouts/application.html.et +1 -1
  112. data/vendor/gems/express_templates/test/dummy/log/test.log +4296 -0
  113. data/vendor/gems/express_templates/test/express_templates_test.rb +5 -1
  114. data/vendor/gems/express_templates/test/handler_test.rb +19 -17
  115. data/vendor/gems/express_templates/test/performance_test.rb +11 -7
  116. data/vendor/gems/express_templates/test/test_helper.rb +162 -1
  117. metadata +58 -47
  118. data/app/assets/stylesheets/express_admin/components/_megadropdown.sass +0 -66
  119. data/vendor/gems/express_templates/diagrams/diagram.graffle +0 -2404
  120. data/vendor/gems/express_templates/diagrams/diagram_express_templates.png +0 -0
  121. data/vendor/gems/express_templates/diagrams/diagram_haml_erb.png +0 -0
  122. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/adoptable.rb +0 -20
  123. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/building.rb +0 -14
  124. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/conditionality.rb +0 -54
  125. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/configurable.rb +0 -90
  126. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/iterating.rb +0 -75
  127. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/parenting.rb +0 -72
  128. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/rendering.rb +0 -30
  129. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/templating.rb +0 -198
  130. data/vendor/gems/express_templates/lib/express_templates/components/capabilities/wrapping.rb +0 -84
  131. data/vendor/gems/express_templates/lib/express_templates/components/column.rb +0 -13
  132. data/vendor/gems/express_templates/lib/express_templates/components/container.rb +0 -7
  133. data/vendor/gems/express_templates/lib/express_templates/components/content_for.rb +0 -42
  134. data/vendor/gems/express_templates/lib/express_templates/components/for_each.rb +0 -30
  135. data/vendor/gems/express_templates/lib/express_templates/components/forms/form_support.rb +0 -13
  136. data/vendor/gems/express_templates/lib/express_templates/components/null_wrap.rb +0 -41
  137. data/vendor/gems/express_templates/lib/express_templates/components/row.rb +0 -28
  138. data/vendor/gems/express_templates/lib/express_templates/components/table_for.rb +0 -163
  139. data/vendor/gems/express_templates/lib/express_templates/components/unless_block.rb +0 -40
  140. data/vendor/gems/express_templates/lib/express_templates/expander.rb +0 -140
  141. data/vendor/gems/express_templates/lib/express_templates/macro.rb +0 -45
  142. data/vendor/gems/express_templates/lib/express_templates/markup.rb +0 -9
  143. data/vendor/gems/express_templates/lib/express_templates/markup/html_tag.rb +0 -62
  144. data/vendor/gems/express_templates/lib/express_templates/markup/tag.rb +0 -150
  145. data/vendor/gems/express_templates/lib/express_templates/markup/wrapper.rb +0 -94
  146. data/vendor/gems/express_templates/lib/express_templates/markup/yielder.rb +0 -21
  147. data/vendor/gems/express_templates/test/components/column_test.rb +0 -11
  148. data/vendor/gems/express_templates/test/components/conditionality_test.rb +0 -37
  149. data/vendor/gems/express_templates/test/components/container_test.rb +0 -66
  150. data/vendor/gems/express_templates/test/components/content_for_test.rb +0 -60
  151. data/vendor/gems/express_templates/test/components/iterating_test.rb +0 -127
  152. data/vendor/gems/express_templates/test/components/null_wrap_test.rb +0 -28
  153. data/vendor/gems/express_templates/test/components/row_test.rb +0 -16
  154. data/vendor/gems/express_templates/test/components/table_for_test.rb +0 -211
  155. data/vendor/gems/express_templates/test/expander_stack_test.rb +0 -41
  156. data/vendor/gems/express_templates/test/expander_test.rb +0 -99
  157. data/vendor/gems/express_templates/test/markup/tag_test.rb +0 -149
  158. data/vendor/gems/express_templates/test/markup/wrapper_test.rb +0 -42
  159. data/vendor/gems/express_templates/test/markup/yielder_test.rb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6caf18ad0e0a5bcaff019d04c1d779b092296ede
4
- data.tar.gz: e3403d4ca031945262d85b1c47bfdc0a91b4b084
3
+ metadata.gz: 8923d44752224ad05bcc847c07e46670a5c7abba
4
+ data.tar.gz: 682c6810570260d123999fcea907389d1b7bf9f7
5
5
  SHA512:
6
- metadata.gz: f194a499ee9bf6dc47b1d002332dd2e57446d385c50ebc1f4b6d8a59f764dcd116dd26564af5aa23cc60e2868ec8973f38850512ca9d9ea173bfcceaeaab4f56
7
- data.tar.gz: 55bb88dfc1fbe9db21648f144cc2aedb7897ca6c2ebe1b59aa9b3fe0d3f4d230d69378cf0e61df1dc7d6f80f7463e7ddfff2d35359d31a6b467808bffd0c874e
6
+ metadata.gz: 964e2e6c6d05f88bc4710637501b8f8118532ac559b60ee21e9b61def0c6189a3e164996f537507c768ea3264c6248b7e8eff7a0920e2f283e74ebd6a279c56f
7
+ data.tar.gz: d36d4cc0e3ce53b46eeda176fdcf6541c27835ba7d92e28deaf7a2cb7a494f30b365424e2e83e4f49ce406993db572ca750f5d566e9eb317eddda92f4b5b5d94
@@ -1,4 +1,6 @@
1
1
  //= require jquery
2
2
  //= require jquery_ujs
3
3
  //= require jquery.loadingdotdotdot
4
+ //= require tinymce-jquery
5
+ //= require select2
4
6
  //= require_tree .
@@ -1,4 +1,6 @@
1
1
  $(function() {
2
+ $('.select2').select2();
3
+
2
4
  // Table Row as links
3
5
  $('.table-hover tr[data-url]').on('click', function() {
4
6
  window.location.href = $(this).attr('data-url');
@@ -1,9 +1,4 @@
1
1
  /*
2
2
  *= require dataTables/dataTables.foundation
3
3
  *= require express_admin/screen
4
- *= require ionicons/ionicons
5
4
  */
6
-
7
- .hidden {
8
- display: none;
9
- }
@@ -0,0 +1,8 @@
1
+ table.definitions
2
+ margin: 1em
3
+
4
+ th
5
+ padding-right: 1em
6
+
7
+ th, td
8
+ padding-bottom: 1em
@@ -1,5 +1,5 @@
1
1
  .pane
2
- @include grid_content
2
+ @include grid-content
3
3
  @include clearfix
4
4
  border:
5
5
  right: 1px solid $border-color
@@ -10,4 +10,4 @@
10
10
  font:
11
11
  size: 1rem
12
12
  weight: normal
13
- padding: 1rem 0
13
+ padding: 0.5rem 0
@@ -2,7 +2,7 @@
2
2
  position: relative
3
3
 
4
4
  .sub-menu
5
- @include grid_block
5
+ @include grid-block
6
6
  position: absolute
7
7
  top: 3.5rem
8
8
  left: 0
@@ -14,7 +14,7 @@
14
14
  padding: 1rem
15
15
 
16
16
  > .sub-menu-items
17
- @include grid_content
17
+ @include grid-content
18
18
  list-style:
19
19
  type: none
20
20
  margin-left: 0
@@ -1,10 +1,10 @@
1
1
  .widget-box
2
- @include grid_block($orientation: vertical)
3
- border: 1px $border-color solid
2
+ @include grid-content
3
+ padding: 0
4
4
 
5
5
  > .title
6
- @include grid_block($size: shrink)
7
6
  @include title
8
7
 
9
8
  > .widget-body
10
- @include grid_content
9
+ @include grid-content
10
+ padding: 1rem
@@ -128,7 +128,7 @@ $dark-color: #444
128
128
  // );
129
129
 
130
130
  // All of the names in this list will be output as classes in your CSS, like small-12, medium-6, and so on.
131
- // $breakpoint-classes: (small medium large);
131
+ $breakpoint-classes: (small medium large xlarge xxlarge)
132
132
 
133
133
  // 4. Typography
134
134
  // - - - - - - - - - - - - - - -
@@ -610,3 +610,4 @@ $dark-color: #444
610
610
  // right: 'right',
611
611
  // title: 'title',
612
612
  // );
613
+
@@ -6,8 +6,6 @@
6
6
  padding: 1.42857rem
7
7
  background: #f2fafd
8
8
 
9
- =clearfix()
10
-
11
9
  =title
12
10
  background-color: $title-background
13
11
  line-height: 1.6
@@ -1,91 +1,498 @@
1
- =select2-background-active()
2
- background-color: #fafafa
3
- background-image: none
4
- background: #fafafa
5
-
6
- =select2-background-white()
7
- background-color: #fff
8
- background-image: none
9
- background: #fff
1
+ /* taken from: https://github.com/select2/select2/issues/1951
10
2
 
11
3
  .select2-container
12
- width: 100%
13
- margin-bottom: rem-calc(20)
4
+ margin: 0 0 1rem 0
5
+ position: relative
6
+ vertical-align: middle
7
+ font-family: inherit
8
+ -webkit-appearance: none !important
9
+ background: #fafafa url("data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZlcnNpb249IjEuMSIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iM3B4IiB2aWV3Qm94PSIwIDAgNiAzIiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCA2IDMiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwb2x5Z29uIHBvaW50cz0iNS45OTIsMCAyLjk5MiwzIC0wLjAwOCwwICIvPjwvc3ZnPg==") no-repeat
10
+ background-position-x: 98%
11
+ background-position-y: center
12
+ font-size: 0.875rem
13
+ &:hover
14
+ background-color: #f2f2f2
15
+ border-color: #999
16
+ /*
17
+ * Force border-box so that % widths fit the parent
18
+ * container without overlap because of margin/padding.
19
+ *
20
+ * More Info : http://www.quirksmode.org/css/box.html
21
+ -webkit-box-sizing: border-box
22
+ /* webkit
23
+ -moz-box-sizing: border-box
24
+ /* firefox
25
+ box-sizing: border-box
26
+ /* css3
27
+
28
+ .select2-drop
29
+ /*
30
+ * Force border-box so that % widths fit the parent
31
+ * container without overlap because of margin/padding.
32
+ *
33
+ * More Info : http://www.quirksmode.org/css/box.html
34
+ -webkit-box-sizing: border-box
35
+ /* webkit
36
+ -moz-box-sizing: border-box
37
+ /* firefox
38
+ box-sizing: border-box
39
+ /* css3
14
40
 
41
+ .select2-search
42
+ /*
43
+ * Force border-box so that % widths fit the parent
44
+ * container without overlap because of margin/padding.
45
+ *
46
+ * More Info : http://www.quirksmode.org/css/box.html
47
+ -webkit-box-sizing: border-box
48
+ /* webkit
49
+ -moz-box-sizing: border-box
50
+ /* firefox
51
+ box-sizing: border-box
52
+ /* css3
53
+ input
54
+ /*
55
+ * Force border-box so that % widths fit the parent
56
+ * container without overlap because of margin/padding.
57
+ *
58
+ * More Info : http://www.quirksmode.org/css/box.html
59
+ -webkit-box-sizing: border-box
60
+ /* webkit
61
+ -moz-box-sizing: border-box
62
+ /* firefox
63
+ box-sizing: border-box
64
+ /* css3
65
+
66
+ .select2-container
15
67
  .select2-choice
16
- height: rem-calc(40)
17
- padding: rem-calc(12)
18
- @include select2-background-white()
19
- box-shadow: none
20
- .select2-chosen
21
- margin-top: 4px
68
+ display: block
69
+ overflow: hidden
70
+ position: relative
71
+ height: 2.315rem
72
+ border: 1px solid #ccc
73
+ padding: 0.5rem 1rem 0.5rem 0.5rem
74
+ white-space: nowrap
75
+ line-height: 1.3125rem
76
+ color: inherit
77
+ text-decoration: none
78
+ -webkit-touch-callout: none
79
+ -webkit-user-select: none
80
+ -moz-user-select: none
81
+ -ms-user-select: none
82
+ user-select: none
83
+ &.select2-allowclear .select2-choice .select2-chosen
84
+ margin-right: 42px
85
+ .select2-choice
86
+ > .select2-chosen
87
+ margin-right: 1rem
88
+ display: block
89
+ overflow: hidden
90
+ white-space: nowrap
91
+ text-overflow: ellipsis
22
92
  abbr
23
- top: 13px
24
- border-color: $gray
93
+ display: none
94
+ width: 12px
95
+ height: 12px
96
+ position: absolute
97
+ right: 24px
98
+ top: 8px
99
+ font-size: 1px
100
+ text-decoration: none
101
+ border: 0
102
+ background: asset-url("select2.png") right top no-repeat
103
+ cursor: pointer
104
+ outline: 0
105
+ &.select2-allowclear .select2-choice abbr
106
+ display: inline-block
107
+ .select2-choice abbr:hover
108
+ background-position: right -11px
109
+ cursor: pointer
25
110
 
26
- .select2-chosen
27
- line-height: 1
28
- margin-top: 0
111
+ .select2-drop-mask
112
+ border: 0
113
+ margin: 0
114
+ padding: 0
115
+ position: fixed
116
+ left: 0
117
+ top: 0
118
+ min-height: 100%
119
+ min-width: 100%
120
+ height: auto
121
+ width: auto
122
+ opacity: 0
123
+ z-index: 9998
124
+ /* styles required for IE to work
125
+ background-color: #fff
126
+ filter: alpha(opacity = 0)
29
127
 
30
- .select2-arrow
31
- border-radius: 0
32
- @include select2-background-active()
33
- border-color: $gray
34
- width: 22px
35
- b
36
- background-position: -3px
128
+ .select2-drop
129
+ width: 100%
130
+ margin-top: -1px
131
+ position: absolute
132
+ z-index: 9999
133
+ top: 100%
134
+ background: #fafafa
135
+ color: #000
136
+ border: 1px solid #999
137
+ border-top: 0
138
+ outline: none
139
+ -webkit-box-shadow: 0 0 5px #999999
140
+ -moz-box-shadow: 0 0 5px #999999
141
+ box-shadow: 0 0 5px #999999
142
+ padding-top: 2.315rem
143
+ margin-top: -2.315rem
37
144
 
38
- & > span
39
- margin: 8px 0 0 6px
145
+ .select2-drop-auto-width
146
+ border-top: 1px solid #aaa
147
+ width: auto
148
+ .select2-search
149
+ padding-top: 4px
40
150
 
41
- &.select2-container-active .select2-choice
42
- border-color: darken($gray, 30%)
43
- &.select2-dropdown-open .select2-choice
44
- border-bottom-color: #ccc
151
+ .select2-drop.select2-drop-above
152
+ padding-top: 0
153
+ margin-top: 0
154
+ margin-bottom: -4.630rem
155
+ padding-bottom: 2.315rem
45
156
 
46
- &.select2-drop-above
47
- @include select2-background-active()
157
+ .select2-drop-active
158
+ border: 1px solid #999
159
+ border-top: none
48
160
 
49
- .select2-drop
50
- -webkit-border-radius: 0 !important
51
- border-radius: 0 !important
52
- &:not(.select2-drop-above)
53
- margin-top: -3px
54
- .select2-results
55
- max-height: 300px
56
- li
57
- line-height: inherit
58
- margin: 0
59
- padding: 0
161
+ .select2-drop.select2-drop-above.select2-drop-active
162
+ border-top: 1px solid #999
60
163
 
61
- .select2-drop-active
62
- box-shadow: none
63
- border-color: #aaa !important
64
- border-radius: 0 0 3px 3px !important
164
+ .select2-container .select2-choice .select2-arrow
165
+ display: none
166
+ b
167
+ display: block
168
+ width: 100%
169
+ height: 100%
170
+ background: asset-url("select2.png") no-repeat 0 1px
65
171
 
66
172
  .select2-search
67
- margin: 4px 0
173
+ display: inline-block
174
+ width: 100%
175
+ min-height: 26px
176
+ margin: 0
177
+ padding-left: 4px
178
+ padding-right: 4px
179
+ position: relative
180
+ z-index: 10000
181
+ white-space: nowrap
68
182
  input
69
- @include select2-background-white()
183
+ width: 100%
184
+ height: auto !important
185
+ min-height: 26px
186
+ padding: 4px 20px 4px 5px
187
+ margin: 0
188
+ outline: 0
189
+ font-family: sans-serif
190
+ border: 1px solid #aaa
191
+ -webkit-box-shadow: none !important
192
+ box-shadow: none !important
193
+ background: #fff asset-url("select2.png") no-repeat 100% -22px
194
+
195
+ .select2-drop.select2-drop-above .select2-search input
196
+ margin-top: 4px
197
+
198
+ .select2-search input.select2-active
199
+ background: #fff asset-url("select2-spinner.gif") no-repeat 100%
200
+
201
+ .select2-container-active
202
+ .select2-choice, .select2-choices
203
+ border: 1px solid #999
204
+ outline: none
205
+ -webkit-box-shadow: 0 0 5px #999
206
+ box-shadow: 0 0 5px #999
207
+
208
+ .select2-dropdown-open
209
+ .select2-choice
210
+ border-bottom-width: 0
211
+ background: #fafafa
212
+ z-index: 10000
70
213
  box-shadow: none
214
+ &.select2-drop-above
215
+ .select2-choice, .select2-choices
216
+ border-top-color: #ccc
217
+ border-bottom-width: 1px
218
+ .select2-choice .select2-arrow
219
+ background: transparent
220
+ border-left: none
221
+ filter: none
222
+ b
223
+ background-position: -18px 1px
224
+
225
+ /* results
226
+
227
+ .select2-results
228
+ max-height: 200px
229
+ padding: 0 0.25rem
230
+ margin: 0.25rem 0
231
+ position: relative
232
+ overflow-x: hidden
233
+ overflow-y: auto
234
+ font-size: 0.875rem
235
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0)
236
+ ul.select2-result-sub
71
237
  margin: 0
72
- border: none
238
+ padding-left: 0
239
+ > li .select2-result-label
240
+ padding-left: 20px
241
+ ul.select2-result-sub
242
+ > li .select2-result-label
243
+ padding-left: 40px
244
+ ul.select2-result-sub
245
+ > li .select2-result-label
246
+ padding-left: 60px
247
+ ul.select2-result-sub
248
+ > li .select2-result-label
249
+ padding-left: 80px
250
+ ul.select2-result-sub
251
+ > li .select2-result-label
252
+ padding-left: 100px
253
+ ul.select2-result-sub
254
+ > li .select2-result-label
255
+ padding-left: 110px
256
+ ul.select2-result-sub > li .select2-result-label
257
+ padding-left: 120px
258
+ li
259
+ list-style: none
260
+ display: list-item
261
+ background-image: none
262
+ &.select2-result-with-children > .select2-result-label
263
+ font-weight: bold
264
+ .select2-result-label
265
+ padding: 0.25rem
266
+ margin: 0
267
+ cursor: pointer
268
+ min-height: 1em
269
+ -webkit-touch-callout: none
270
+ -webkit-user-select: none
271
+ -moz-user-select: none
272
+ -ms-user-select: none
273
+ user-select: none
274
+ .select2-highlighted
275
+ background: #3875d7
276
+ color: #fff
277
+ li em
278
+ background: #feffde
279
+ font-style: normal
280
+ .select2-highlighted
281
+ em
282
+ background: transparent
283
+ ul
284
+ background: #fff
285
+ color: #000
286
+ .select2-no-results, .select2-searching, .select2-selection-limit
287
+ background: transparent
288
+ display: list-item
289
+ padding: 0.25rem
290
+ color: #999
291
+ font-style: italic
292
+ .select2-disabled
293
+ &.select2-highlighted
294
+ color: #666
295
+ background: #f4f4f4
296
+ display: list-item
297
+ cursor: default
298
+ background: #f4f4f4
299
+ display: list-item
300
+ cursor: default
301
+ .select2-selected
302
+ display: none
303
+
304
+ /*
305
+ *disabled look for disabled choices in the results dropdown
73
306
 
74
- &:focus
75
- @include select2-background-white()
76
- box-shadow: none
77
- border: none
307
+ .select2-more-results
308
+ &.select2-active
309
+ background: #f4f4f4 asset-url("select2-spinner.gif") no-repeat 100%
310
+ background: #f4f4f4
311
+ display: list-item
78
312
 
79
- .select2-container.form-control
80
- border: none
81
- box-shadow: none
313
+ /* disabled styles
314
+
315
+ .select2-container.select2-container-disabled .select2-choice
316
+ background-color: #f4f4f4
317
+ background-image: none
318
+ border: 1px solid #ddd
319
+ cursor: default
320
+ .select2-arrow
321
+ background-color: #f4f4f4
322
+ background-image: none
323
+ border-left: 0
324
+ abbr
325
+ display: none
326
+
327
+ /* multiselect
328
+
329
+ .select2-container-multi .select2-choices
330
+ height: auto !important
331
+ height: 1%
332
+ margin: 0
82
333
  padding: 0
334
+ position: relative
335
+ border: 1px solid #aaa
336
+ cursor: text
337
+ overflow: hidden
338
+ background-color: #fff
339
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eee), color-stop(15%, #fff))
340
+ background-image: -webkit-linear-gradient(top, #eee 1%, #fff 15%)
341
+ background-image: -moz-linear-gradient(top, #eee 1%, #fff 15%)
342
+ background-image: linear-gradient(top, #eee 1%, #fff 15%)
83
343
 
84
- .select2-choices
85
- background-image: none !important
86
- border-radius: 3px
87
- padding: 4px 8px !important
344
+ .select2-locked
345
+ padding: 3px 5px 3px 5px !important
346
+
347
+ .select2-container-multi
348
+ .select2-choices
349
+ min-height: 26px
350
+ &.select2-container-active .select2-choices
351
+ border: 1px solid #999
352
+ outline: none
353
+ -webkit-box-shadow: 0 0 5px #999
354
+ -moz-box-shadow: 0 0 5px #999
355
+ box-shadow: 0 0 5px #999
356
+ .select2-choices
357
+ li
358
+ float: left
359
+ list-style: none
360
+ .select2-search-field
361
+ margin: 0
362
+ padding: 0
363
+ white-space: nowrap
364
+ input
365
+ padding: 5px
366
+ margin: 1px 0
367
+ font-family: sans-serif
368
+ font-size: 100%
369
+ color: #666
370
+ outline: 0
371
+ border: 0
372
+ -webkit-box-shadow: none
373
+ box-shadow: none
374
+ background: transparent !important
375
+ &.select2-active
376
+ background: #fff asset-url("select2-spinner.gif") no-repeat 100% !important
377
+
378
+ .select2-default
379
+ color: #999 !important
380
+
381
+ .select2-container-multi .select2-choices
382
+ .select2-search-choice
383
+ /* padding: 3px 5px 3px 18px;
384
+ padding: 0.5rem 0.5rem 0.5rem 1rem
385
+ margin: 3px 0 3px 5px
386
+ position: relative
387
+ line-height: 13px
388
+ color: #333
389
+ cursor: default
390
+ border: 1px solid #aaaaaa
391
+ -webkit-box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05)
392
+ box-shadow: 0 0 2px #fff inset, 0 1px 0 rgba(0, 0, 0, 0.05)
393
+ background-clip: padding-box
394
+ -webkit-touch-callout: none
395
+ -webkit-user-select: none
396
+ -moz-user-select: none
397
+ -ms-user-select: none
398
+ user-select: none
399
+ background-color: #e4e4e4
400
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0)
401
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eee))
402
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%)
403
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%)
404
+ background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eee 100%)
405
+ .select2-chosen
406
+ cursor: default
407
+ .select2-search-choice-focus
408
+ background: #d4d4d4
409
+
410
+ .select2-search-choice-close
411
+ display: block
412
+ width: 12px
413
+ height: 13px
414
+ position: absolute
415
+ right: 3px
416
+ top: 4px
417
+ font-size: 1px
418
+ outline: none
419
+ background: asset-url("select2.png") right top no-repeat
420
+
421
+ .select2-container-multi
422
+ .select2-search-choice-close
423
+ left: 3px
424
+ top: 8px
425
+ .select2-choices
426
+ .select2-search-choice .select2-search-choice-close:hover, .select2-search-choice-focus .select2-search-choice-close
427
+ background-position: right -11px
428
+ &.select2-container-disabled .select2-choices
429
+ background-color: #f4f4f4
430
+ background-image: none
431
+ border: 1px solid #ddd
432
+ cursor: default
433
+ .select2-search-choice
434
+ padding: 3px 5px 3px 5px
435
+ border: 1px solid #ddd
436
+ background-image: none
437
+ background-color: #f4f4f4
438
+ .select2-search-choice-close
439
+ display: none
440
+ background: none
441
+
442
+ /* disabled styles
443
+
444
+ /* end multiselect
445
+
446
+ .select2-result-selectable .select2-match, .select2-result-unselectable .select2-match
447
+ text-decoration: underline
88
448
 
89
449
  .select2-offscreen
90
- & + .help
91
- margin-top: -18px
450
+ clip: rect(0 0 0 0) !important
451
+ width: 1px !important
452
+ height: 1px !important
453
+ border: 0 !important
454
+ margin: 0 !important
455
+ padding: 0 !important
456
+ overflow: hidden !important
457
+ position: absolute !important
458
+ outline: 0 !important
459
+ left: 0px !important
460
+ top: 0px !important
461
+ &:focus
462
+ clip: rect(0 0 0 0) !important
463
+ width: 1px !important
464
+ height: 1px !important
465
+ border: 0 !important
466
+ margin: 0 !important
467
+ padding: 0 !important
468
+ overflow: hidden !important
469
+ position: absolute !important
470
+ outline: 0 !important
471
+ left: 0px !important
472
+ top: 0px !important
473
+
474
+ .select2-display-none
475
+ display: none
476
+
477
+ .select2-measure-scrollbar
478
+ position: absolute
479
+ top: -10000px
480
+ left: -10000px
481
+ width: 100px
482
+ height: 100px
483
+ overflow: scroll
484
+
485
+ /* Retina-ize icons
486
+
487
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi)
488
+ .select2-search input, .select2-search-choice-close
489
+ background-image: asset-url("select2x2.png") !important
490
+ background-repeat: no-repeat !important
491
+ background-size: 60px 40px !important
492
+ .select2-container .select2-choice
493
+ abbr, .select2-arrow b
494
+ background-image: asset-url("select2x2.png") !important
495
+ background-repeat: no-repeat !important
496
+ background-size: 60px 40px !important
497
+ .select2-search input
498
+ background-position: 100% -21px !important