card-mod-bootstrap 0.13.1 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/assets/script/bootstrap_modal_decko.js +27 -0
  3. data/assets/script/manifest.yml +13 -0
  4. data/assets/script/script_colorpicker.js.coffee +3 -0
  5. data/assets/script/script_load_select2.js.coffee +55 -0
  6. data/assets/style/bootstrap_colorpicker.scss +272 -0
  7. data/{lib/stylesheets → assets/style}/font_awesome.css +0 -0
  8. data/assets/style/manifest.yml +14 -0
  9. data/{lib/stylesheets → assets/style}/material_icons.css +0 -0
  10. data/{lib/stylesheets/style_select2_bootstrap.scss → assets/style/select2_bootstrap.scss} +0 -0
  11. data/{lib/stylesheets → assets/style}/style_bootstrap_cards.scss +5 -3
  12. data/locales/de.yml +3 -0
  13. data/locales/en.yml +3 -0
  14. data/set/abstract/bootswatch_theme.rb +45 -70
  15. data/set/all/bootstrap/helper.rb +1 -1
  16. data/set/all/bootstrap/icon.rb +1 -1
  17. data/set/type/customized_bootswatch_skin.rb +7 -10
  18. metadata +25 -163
  19. data/file/cerulean_skin_image/image-icon.png +0 -0
  20. data/file/cerulean_skin_image/image-large.png +0 -0
  21. data/file/cerulean_skin_image/image-medium.png +0 -0
  22. data/file/cerulean_skin_image/image-original.png +0 -0
  23. data/file/cerulean_skin_image/image-small.png +0 -0
  24. data/file/cosmo_skin_image/image-icon.png +0 -0
  25. data/file/cosmo_skin_image/image-large.png +0 -0
  26. data/file/cosmo_skin_image/image-medium.png +0 -0
  27. data/file/cosmo_skin_image/image-original.png +0 -0
  28. data/file/cosmo_skin_image/image-small.png +0 -0
  29. data/file/cyborg_skin_image/image-icon.png +0 -0
  30. data/file/cyborg_skin_image/image-large.png +0 -0
  31. data/file/cyborg_skin_image/image-medium.png +0 -0
  32. data/file/cyborg_skin_image/image-original.png +0 -0
  33. data/file/cyborg_skin_image/image-small.png +0 -0
  34. data/file/darkly_skin_image/image-icon.png +0 -0
  35. data/file/darkly_skin_image/image-large.png +0 -0
  36. data/file/darkly_skin_image/image-medium.png +0 -0
  37. data/file/darkly_skin_image/image-original.png +0 -0
  38. data/file/darkly_skin_image/image-small.png +0 -0
  39. data/file/flatly_skin_image/image-icon.png +0 -0
  40. data/file/flatly_skin_image/image-large.png +0 -0
  41. data/file/flatly_skin_image/image-medium.png +0 -0
  42. data/file/flatly_skin_image/image-original.png +0 -0
  43. data/file/flatly_skin_image/image-small.png +0 -0
  44. data/file/journal_skin_image/image-icon.png +0 -0
  45. data/file/journal_skin_image/image-large.png +0 -0
  46. data/file/journal_skin_image/image-medium.png +0 -0
  47. data/file/journal_skin_image/image-original.png +0 -0
  48. data/file/journal_skin_image/image-small.png +0 -0
  49. data/file/litera_skin_image/image-icon.png +0 -0
  50. data/file/litera_skin_image/image-large.png +0 -0
  51. data/file/litera_skin_image/image-medium.png +0 -0
  52. data/file/litera_skin_image/image-original.png +0 -0
  53. data/file/litera_skin_image/image-small.png +0 -0
  54. data/file/lumen_skin_image/image-icon.png +0 -0
  55. data/file/lumen_skin_image/image-large.png +0 -0
  56. data/file/lumen_skin_image/image-medium.png +0 -0
  57. data/file/lumen_skin_image/image-original.png +0 -0
  58. data/file/lumen_skin_image/image-small.png +0 -0
  59. data/file/lux_skin_image/image-icon.png +0 -0
  60. data/file/lux_skin_image/image-large.png +0 -0
  61. data/file/lux_skin_image/image-medium.png +0 -0
  62. data/file/lux_skin_image/image-original.png +0 -0
  63. data/file/lux_skin_image/image-small.png +0 -0
  64. data/file/materia_skin_image/image-icon.png +0 -0
  65. data/file/materia_skin_image/image-large.png +0 -0
  66. data/file/materia_skin_image/image-medium.png +0 -0
  67. data/file/materia_skin_image/image-original.png +0 -0
  68. data/file/materia_skin_image/image-small.png +0 -0
  69. data/file/minty_skin_image/image-icon.png +0 -0
  70. data/file/minty_skin_image/image-large.png +0 -0
  71. data/file/minty_skin_image/image-medium.png +0 -0
  72. data/file/minty_skin_image/image-original.png +0 -0
  73. data/file/minty_skin_image/image-small.png +0 -0
  74. data/file/mod_bootstrap_script_bootstrap_machine_output/file.js +0 -25
  75. data/file/mod_bootstrap_script_pointer_machine_output/file.js +0 -223
  76. data/file/paper_skin_image/image-icon.png +0 -0
  77. data/file/paper_skin_image/image-large.png +0 -0
  78. data/file/paper_skin_image/image-medium.png +0 -0
  79. data/file/paper_skin_image/image-original.png +0 -0
  80. data/file/paper_skin_image/image-small.png +0 -0
  81. data/file/pulse_skin_image/image-icon.png +0 -0
  82. data/file/pulse_skin_image/image-large.png +0 -0
  83. data/file/pulse_skin_image/image-medium.png +0 -0
  84. data/file/pulse_skin_image/image-original.png +0 -0
  85. data/file/pulse_skin_image/image-small.png +0 -0
  86. data/file/readable_skin_image/image-icon.png +0 -0
  87. data/file/readable_skin_image/image-large.png +0 -0
  88. data/file/readable_skin_image/image-medium.png +0 -0
  89. data/file/readable_skin_image/image-original.png +0 -0
  90. data/file/readable_skin_image/image-small.png +0 -0
  91. data/file/sandstone_skin_image/image-icon.png +0 -0
  92. data/file/sandstone_skin_image/image-large.png +0 -0
  93. data/file/sandstone_skin_image/image-medium.png +0 -0
  94. data/file/sandstone_skin_image/image-original.png +0 -0
  95. data/file/sandstone_skin_image/image-small.png +0 -0
  96. data/file/simplex_skin_image/image-icon.png +0 -0
  97. data/file/simplex_skin_image/image-large.png +0 -0
  98. data/file/simplex_skin_image/image-medium.png +0 -0
  99. data/file/simplex_skin_image/image-original.png +0 -0
  100. data/file/simplex_skin_image/image-small.png +0 -0
  101. data/file/sketchy_skin_image/image-icon.png +0 -0
  102. data/file/sketchy_skin_image/image-large.png +0 -0
  103. data/file/sketchy_skin_image/image-medium.png +0 -0
  104. data/file/sketchy_skin_image/image-original.png +0 -0
  105. data/file/sketchy_skin_image/image-small.png +0 -0
  106. data/file/slate_skin_image/image-icon.png +0 -0
  107. data/file/slate_skin_image/image-large.png +0 -0
  108. data/file/slate_skin_image/image-medium.png +0 -0
  109. data/file/slate_skin_image/image-original.png +0 -0
  110. data/file/slate_skin_image/image-small.png +0 -0
  111. data/file/solar_skin_image/image-icon.png +0 -0
  112. data/file/solar_skin_image/image-large.png +0 -0
  113. data/file/solar_skin_image/image-medium.png +0 -0
  114. data/file/solar_skin_image/image-original.png +0 -0
  115. data/file/solar_skin_image/image-small.png +0 -0
  116. data/file/spacelab_skin_image/image-icon.png +0 -0
  117. data/file/spacelab_skin_image/image-large.png +0 -0
  118. data/file/spacelab_skin_image/image-medium.png +0 -0
  119. data/file/spacelab_skin_image/image-original.png +0 -0
  120. data/file/spacelab_skin_image/image-small.png +0 -0
  121. data/file/superhero_skin_image/image-icon.png +0 -0
  122. data/file/superhero_skin_image/image-large.png +0 -0
  123. data/file/superhero_skin_image/image-medium.png +0 -0
  124. data/file/superhero_skin_image/image-original.png +0 -0
  125. data/file/superhero_skin_image/image-small.png +0 -0
  126. data/file/united_skin_image/image-icon.png +0 -0
  127. data/file/united_skin_image/image-large.png +0 -0
  128. data/file/united_skin_image/image-medium.png +0 -0
  129. data/file/united_skin_image/image-original.png +0 -0
  130. data/file/united_skin_image/image-small.png +0 -0
  131. data/file/yeti_skin_image/image-icon.png +0 -0
  132. data/file/yeti_skin_image/image-large.png +0 -0
  133. data/file/yeti_skin_image/image-medium.png +0 -0
  134. data/file/yeti_skin_image/image-original.png +0 -0
  135. data/file/yeti_skin_image/image-small.png +0 -0
  136. data/lib/card/lazy_tab.rb +0 -37
  137. data/lib/card/tab.rb +0 -83
  138. data/lib/javascript/smartmenu.js +0 -94
  139. data/lib/stylesheets/smartmenu.css +0 -433
  140. data/set/all/bootstrap/tabs/tab_panel.haml +0 -7
  141. data/set/all/bootstrap/tabs.rb +0 -40
  142. data/set/self/font_awesome.rb +0 -2
  143. data/set/self/material_icons.rb +0 -2
  144. data/set/self/script_load_select2.rb +0 -2
  145. data/set/self/smartmenu_css.rb +0 -5
  146. data/set/self/smartmenu_js.rb +0 -5
  147. data/set/self/style_bootstrap_cards.rb +0 -1
  148. data/set/self/style_bootstrap_colorpicker.rb +0 -6
  149. data/set/self/style_select2.rb +0 -10
  150. data/set/self/style_select2_bootstrap.rb +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7a5be936b33fec952d53bd02083a1aed7204752a67fb5dbeb8a7b2969148b255
4
- data.tar.gz: b83639c48d7acfd49b569e65ddd25054c46270a77a62ccde85116eda18d676d2
3
+ metadata.gz: 7766786b03d19d0bbc8c2087cc9065511739854086ddfebb1d6f1d228ae3c477
4
+ data.tar.gz: 4882c3e1e49810a8f4fb79eedb3b4118b30932b9c3ba5bea8ec5844005db86ea
5
5
  SHA512:
6
- metadata.gz: 861b1ccf0545f53988c44858add9efd2620d29b05be4f800083701ba4a42fa0d013b89a28b0983c8f3ff30b298d5de31062c74d42014a2f4232852d4faba2050
7
- data.tar.gz: eb8013594b8b4b4711207970bf04df99a105f99478f15634f2b8aabc07dc903010fa3cdf3a3a4c6fe363d20b9f3241c2bc0e3c14d942b0f7e0eb4aa8ced3bf09
6
+ metadata.gz: af51fdcb6d707332a192bd6b3f864e4cb0ebc6d6890e468f99768ad980772fbc2bc05a291bf52921cd42b1a70713e7b5fc62c7a9ac6869aa000d836cb34e67b2
7
+ data.tar.gz: 5f89aa1af22b61ab603a3a70ded0a5afea9fba05d57ac130578d17590a0e188c76bc48f0deb915f6c25a040e7fd8b9640b7ffb982e677bd63ed7c5133860c6dc
@@ -0,0 +1,27 @@
1
+ decko.slotReady(function(slot) {
2
+ slot.find('.modal.fade').on('loaded.bs.modal', function(e) {
3
+ $(this).trigger('slotReady');
4
+ });
5
+ slot.find('[data-toggle=\'modal\']').off("click").on('click', function(e) {
6
+ var $_this, href, modal_selector;
7
+ e.preventDefault();
8
+ e.stopPropagation();
9
+ $_this = $(this);
10
+ href = $_this.attr('href');
11
+ modal_selector = $_this.data('target');
12
+ $(modal_selector).modal('show');
13
+ $.ajax({
14
+ url: href,
15
+ type: 'GET',
16
+ success: function(html) {
17
+ $(modal_selector + ' .modal-content').html(html);
18
+ return $(modal_selector).trigger('loaded.bs.modal');
19
+ },
20
+ error: function(jqXHR, textStatus) {
21
+ $(modal_selector + ' .modal-content').html(jqXHR.responseText);
22
+ return $(modal_selector).trigger('loaded.bs.modal');
23
+ }
24
+ });
25
+ return false;
26
+ });
27
+ });
@@ -0,0 +1,13 @@
1
+ bootstrap:
2
+ items:
3
+ # full version of select2 is needed to support containerCssClass config option
4
+ # which we need for select2_bootstrap to work properly
5
+ - ../../vendor/select2/dist/js/select2.full.min.js
6
+ - ../../vendor/bootstrap/dist/js/bootstrap.bundle.js
7
+ - bootstrap_modal_decko.js
8
+ - script_load_select2.js.coffee
9
+ - ../../vendor/bootstrap-colorpicker/dist/js/bootstrap-colorpicker.min.js
10
+ - script_colorpicker.js.coffee
11
+
12
+
13
+
@@ -0,0 +1,3 @@
1
+ decko.slotReady (slot) ->
2
+ $('[data-toggle="popover"]').popover(html: true)
3
+ $('.colorpicker-component').colorpicker()
@@ -0,0 +1,55 @@
1
+ $.fn.select2.defaults.set("theme", "bootstrap")
2
+
3
+ decko.slotReady (slot) ->
4
+ slot.find('select:not(._no-select2)').each (_i) ->
5
+ decko.initSelect2($(this))
6
+
7
+ decko.slotDestroy (slot) ->
8
+ slot.find('select:not(._no-select2)').each (_i) ->
9
+ $(this).deInitSelect2()
10
+
11
+ $.extend decko,
12
+ initSelect2: (elem) ->
13
+ if elem.length > 1
14
+ decko.initSelect2($(single_el)) for single_el in elem
15
+ else
16
+ opts = { dropdownAutoWidth: "true", containerCssClass: ":all:", width: "auto" }
17
+
18
+ elem.attr "id", decko.uniqSelect2Id(elem.attr("id"))
19
+ if elem.hasClass("tags")
20
+ opts.tags = "true"
21
+ if elem.data("minimum-results-for-search")?
22
+ opts.minimumResultsForSearch = elem.data("minimum-results-for-search")
23
+ elem.select2(opts)
24
+
25
+ uniqSelect2Id: (id) ->
26
+ return id unless $("[data-select2-id=" + id + "]").length > 0
27
+ decko.uniqSelect2Id id + "1"
28
+
29
+
30
+ $(window).ready ->
31
+ $('body').on 'select2:select', '._go-to-selected', ->
32
+ val = $(this).val()
33
+ if val != ''
34
+ window.location = decko.path(escape(val))
35
+
36
+ $('body').on "select2:select", "._submit-on-select", (event) ->
37
+ $(event.target).closest('form').submit()
38
+
39
+ $.fn.extend
40
+ cloneSelect2: (withDataAndEvents, deepWithDataAndEvents) ->
41
+ $old = if this.is('select') then this else this.find('select')
42
+ $old.deInitSelect2()
43
+ $cloned = this.clone(withDataAndEvents, deepWithDataAndEvents)
44
+ decko.initSelect2 $old
45
+ if $cloned.is('select')
46
+ decko.initSelect2 $cloned
47
+ else
48
+ decko.initSelect2 $cloned.find('select')
49
+ $cloned
50
+
51
+ deInitSelect2: ->
52
+ return unless @attr "data-select2-id"
53
+ @select2 "destroy"
54
+ @removeAttr "data-select2-id"
55
+ @find("option").removeAttr "data-select2-id"
@@ -0,0 +1,272 @@
1
+ /*!
2
+ * Bootstrap Colorpicker v2.5.2
3
+ * https://itsjavi.com/bootstrap-colorpicker/
4
+ *
5
+ * Originally written by (c) 2012 Stefan Petre
6
+ * Licensed under the Apache License v2.0
7
+ * http://www.apache.org/licenses/LICENSE-2.0.txt
8
+ *
9
+ */
10
+
11
+ @mixin bgImg($imgBase64) {
12
+ background-image: url("#{$imgBase64}");
13
+ }
14
+
15
+ @mixin borderRadius($size) {
16
+ -webkit-border-radius: $size;
17
+ -moz-border-radius: $size;
18
+ border-radius: $size;
19
+ }
20
+
21
+ .colorpicker-saturation {
22
+ width: 100px;
23
+ height: 100px;
24
+ @include bgImg('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAQAAADa613fAAAP9klEQVR4XnRWC47rNgwcKjlA0bv2VL1Qi/YELRav7203iS1ppqZoiXCAhuBHVLI74xFtG3/Hz2joIOjRGuR5eMYuRn9YA1fds859KX8ZvczLr9/pImiR3Rqky9/wlajRIdVE/1Rufeu/0No3/ASgBZAJUkwgi0iCaEatekJJoEqiTQncd67/gyOfRCZshTed0Nl8LbLj8D6qxt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w2kPczSIqQSPUDYKYBMamsBCpKphW0iA5H8AbMDPJOQYjLZg1Vk4G49GlCYNYAkdOd0kwRQ8FCyAHydgLZ6Z2AqrVtjDUQ7hCEmrkEooDAsB2YnBCvkBpZ6yBvJpCd7Mn5zJ6C4QF2BUQPgHEIGUrGnHzQ8rlMekBeTyAzwDJksxwM4+w3BY02B8mIl0CmFRm+ZscxAuSnvwqQsECTIGSV6FEoJFTygVuzB5xAsKqBvAQE3+nkVoJDI1BJIaPBWik7ZSu5NIp5A3mRQaTFvLgkO9fVgEgMqqeVfb+p55tijWH+Kea71ubq4v8Sl8089sZKbKEZNq+VUfISJJF7j79WrbYgS994ZEf+nIz0pNFRWqapSmK6P45i3OQuItIiPDyg6RnxZ4D0g+CFPxAzluoRsWsaA6I6JOqVWCisDvJ0BgHTzMSRgMi0vmi8R+sR6tg/XUh7kCc7kMRqSNkTBDx0OkAUegFcMazciBXNpm798R6klXap/WZz49TQwBHqEcj4oCToUPjUuP9lfxcbyKMAwT6bTf1qqIIQDl3i5oCERNmVm0wgW4A8BGRxMX3hWh8bEV5Rvfp4DS5F3djWH2ztDNWKW7OBjgjIwsDWaKRknJjqMsh9QCa1p608lLovFkBE969DYtYelSzwSRcg535vAsFeNU9SzRCYZb4LDmxmFQKkwYGM+5y/G7b1uxMIylLdyE5yxIyYsoXWhQIpzQhYPi3JkJoKkB9+BxD0OMuyOEBe36DgyPSrxscmATldgKj8PxrkA/kA5PYMgkrocwIQ6GSRGmF0VaNqBKQZ5FYDEZSDzFTzq9mBQjAayE1A+ryDTzcQZe0Ibbxj7EwpAmTrJwEimZR9CCPtODhzxuNtY19Zd2Lf/fjCTnEiDAOg62j1utb/dv9mZ/aHCj4AyOHbsW3/As0BTzIgeJU7AAAAAElFTkSuQmCC');
25
+ cursor: crosshair;
26
+ float: left;
27
+ i {
28
+ display: block;
29
+ height: 5px;
30
+ width: 5px;
31
+ border: 1px solid #000;
32
+ @include borderRadius(5px);
33
+ position: absolute;
34
+ top: 0;
35
+ left: 0;
36
+ margin: -4px 0 0 -4px;
37
+ b {
38
+ display: block;
39
+ height: 5px;
40
+ width: 5px;
41
+ border: 1px solid #fff;
42
+ @include borderRadius(5px);
43
+ }
44
+ }
45
+ }
46
+
47
+ .colorpicker-hue,
48
+ .colorpicker-alpha {
49
+ width: 15px;
50
+ height: 100px;
51
+ float: left;
52
+ cursor: row-resize;
53
+ margin-left: 4px;
54
+ margin-bottom: 4px;
55
+ }
56
+
57
+ .colorpicker-hue i,
58
+ .colorpicker-alpha i {
59
+ display: block;
60
+ height: 1px;
61
+ background: #000;
62
+ border-top: 1px solid #fff;
63
+ position: absolute;
64
+ top: 0;
65
+ left: 0;
66
+ width: 100%;
67
+ margin-top: -1px;
68
+ }
69
+
70
+ .colorpicker-hue {
71
+ @include bgImg('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAABkCAMAAABw8qpSAAABLFBMVEXqFBb/ABH/ACL/ADH/AEH/AFD/AGD/AG7/AH7/AI3/AJ3/AKz/ALz/AMr/ANv/AOr/APr2AP/mAP/XAP/HAP+4AP+oAP+aAP+JAP97AP9rAP9cAP9MAP8+AP8tAP8fAP8PAP8BAv8AEP8AH/8AL/8APv8ATv8AXP8Abf8Ae/8Ai/8Amv8Aqv8AuP8Ayf8A1/8A5/8A9/8A//gA/+kA/9kA/8oA/7oA/6wA/5sA/40A/30A/24A/14A/1AA/z8A/zEA/yEA/xEB/wMN/wAd/wAs/wA8/wBK/wBb/wBp/wB5/wCI/wCY/wCm/wC3/wDF/wDV/wDk/wD1/wD/+gD/7AD/3AD/zAD/vgD/rQD/nwD/jgD/gAD/cAD/YgD/UQD/QwD/MgD/JAD/FAD4Eg42qAedAAAAh0lEQVR4XgXAg3EDAAAAwI9to7Zt27a1/w49BASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTS1tHXo1KVbj159+g0YNGTYiFFjxk2YNGXajFlz5i1YtGTZilVr1m3YtGXbjl179h04dOTYiVNnzl24dOXajVt37j149OTZi1dv3n349OXbj19//wOxE1dQ8reGAAAAAElFTkSuQmCC');
72
+ }
73
+
74
+ .colorpicker-alpha {
75
+ @include bgImg('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAABkCAQAAAAVxWkcAAABr0lEQVR4Xo2VwU0DQQxF7dmRuNIFlzlSAR3QAaXQQdIBJVABFXDcOVAAd67cjJLR07dkhcSrkZKfb/t7bG88rFo3B5gZPMNycItu2xloGV7MWHzM9zuzFWCkmA0nK6AszCUJDW6+mG6R03ncw5v8EMTEvZ2O3AliYjpslblc0RF9LmZYWxURU6aKytWZYsoWCAe+xwOZp1GsEukGiIkYxcQCHck99+gRgB7JncyIB5SGEhP3Yh5P6JwX+u6AnYot104d8DJT7uH7M9JH6OZbimj0vfMVaYnJIZFJDBW9kHlerL2C6JV4mSt7uuo2N57RxnZ+usQjn0R1jwBJBrNO3evJpVYUWsJ/E3UiXRlv24/7YZ04xmEdWlzcKS+B/eapeyMvFd2k0+hRk/T0AmTW8h69s2sjYMsdPntECiILhAeIMZAeH4QvUwfn6ijC0tTV+fT9ky8jM9nK2g7Ly1VjSpKYq6IvsAm7MtNu1orEqa/K3KNvgMFdhfquPfJmp2dbh0/8Gzb6Y22ViaNr6n5410zXdngVhbu6XqdOtWOuin5hjABGp4a2uotZ71MVCfwDBt2/v37yo6AAAAAASUVORK5CYII=');
76
+ display: none;
77
+ }
78
+
79
+ .colorpicker-saturation,
80
+ .colorpicker-hue,
81
+ .colorpicker-alpha {
82
+ background-size: contain;
83
+ }
84
+
85
+ .colorpicker {
86
+ padding: 4px;
87
+ min-width: 130px;
88
+ margin-top: 1px;
89
+ @include borderRadius(4px);
90
+ z-index: 2500;
91
+ }
92
+
93
+ .colorpicker:before,
94
+ .colorpicker:after {
95
+ display: table;
96
+ content: "";
97
+ line-height: 0;
98
+ }
99
+
100
+ .colorpicker:after {
101
+ clear: both;
102
+ }
103
+
104
+ .colorpicker:before {
105
+ content: '';
106
+ display: inline-block;
107
+ border-left: 7px solid transparent;
108
+ border-right: 7px solid transparent;
109
+ border-bottom: 7px solid #ccc;
110
+ border-bottom-color: rgba(0, 0, 0, 0.2);
111
+ position: absolute;
112
+ top: -7px;
113
+ left: 6px;
114
+ }
115
+
116
+ .colorpicker:after {
117
+ content: '';
118
+ display: inline-block;
119
+ border-left: 6px solid transparent;
120
+ border-right: 6px solid transparent;
121
+ border-bottom: 6px solid #ffffff;
122
+ position: absolute;
123
+ top: -6px;
124
+ left: 7px;
125
+ }
126
+
127
+ .colorpicker div {
128
+ position: relative;
129
+ }
130
+
131
+ .colorpicker.colorpicker-with-alpha {
132
+ min-width: 140px;
133
+ }
134
+
135
+ .colorpicker.colorpicker-with-alpha .colorpicker-alpha {
136
+ display: block;
137
+ }
138
+
139
+ .colorpicker-color {
140
+ height: 10px;
141
+ margin-top: 5px;
142
+ clear: both;
143
+ @include bgImg('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAABkCAQAAAAVxWkcAAABr0lEQVR4Xo2VwU0DQQxF7dmRuNIFlzlSAR3QAaXQQdIBJVABFXDcOVAAd67cjJLR07dkhcSrkZKfb/t7bG88rFo3B5gZPMNycItu2xloGV7MWHzM9zuzFWCkmA0nK6AszCUJDW6+mG6R03ncw5v8EMTEvZ2O3AliYjpslblc0RF9LmZYWxURU6aKytWZYsoWCAe+xwOZp1GsEukGiIkYxcQCHck99+gRgB7JncyIB5SGEhP3Yh5P6JwX+u6AnYot104d8DJT7uH7M9JH6OZbimj0vfMVaYnJIZFJDBW9kHlerL2C6JV4mSt7uuo2N57RxnZ+usQjn0R1jwBJBrNO3evJpVYUWsJ/E3UiXRlv24/7YZ04xmEdWlzcKS+B/eapeyMvFd2k0+hRk/T0AmTW8h69s2sjYMsdPntECiILhAeIMZAeH4QvUwfn6ijC0tTV+fT9ky8jM9nK2g7Ly1VjSpKYq6IvsAm7MtNu1orEqa/K3KNvgMFdhfquPfJmp2dbh0/8Gzb6Y22ViaNr6n5410zXdngVhbu6XqdOtWOuin5hjABGp4a2uotZ71MVCfwDBt2/v37yo6AAAAAASUVORK5CYII=');
144
+ background-position: 0 100%;
145
+ }
146
+
147
+ .colorpicker-color div {
148
+ height: 10px;
149
+ }
150
+
151
+ .colorpicker-selectors {
152
+ display: none;
153
+ height: 10px;
154
+ margin-top: 5px;
155
+ clear: both;
156
+ }
157
+
158
+ .colorpicker-selectors i {
159
+ cursor: pointer;
160
+ float: left;
161
+ height: 10px;
162
+ width: 10px;
163
+ }
164
+
165
+ .colorpicker-selectors i + i {
166
+ margin-left: 3px;
167
+ }
168
+
169
+ .colorpicker-element .input-group-addon i,
170
+ .colorpicker-element .add-on i {
171
+ display: inline-block;
172
+ cursor: pointer;
173
+ height: 16px;
174
+ vertical-align: text-top;
175
+ width: 16px;
176
+ }
177
+
178
+ .colorpicker.colorpicker-inline {
179
+ position: relative;
180
+ display: inline-block;
181
+ float: none;
182
+ z-index: auto;
183
+ }
184
+
185
+ .colorpicker.colorpicker-horizontal {
186
+ width: 110px;
187
+ min-width: 110px;
188
+ height: auto;
189
+ }
190
+
191
+ .colorpicker.colorpicker-horizontal .colorpicker-saturation {
192
+ margin-bottom: 4px;
193
+ }
194
+
195
+ .colorpicker.colorpicker-horizontal .colorpicker-color {
196
+ width: 100px;
197
+ }
198
+
199
+ .colorpicker.colorpicker-horizontal .colorpicker-hue,
200
+ .colorpicker.colorpicker-horizontal .colorpicker-alpha {
201
+ width: 100px;
202
+ height: 15px;
203
+ float: left;
204
+ cursor: col-resize;
205
+ margin-left: 0px;
206
+ margin-bottom: 4px;
207
+ }
208
+
209
+ .colorpicker.colorpicker-horizontal .colorpicker-hue i,
210
+ .colorpicker.colorpicker-horizontal .colorpicker-alpha i {
211
+ display: block;
212
+ height: 15px;
213
+ background: #ffffff;
214
+ position: absolute;
215
+ top: 0;
216
+ left: 0;
217
+ width: 1px;
218
+ border: none;
219
+ margin-top: 0px;
220
+ }
221
+
222
+ .colorpicker.colorpicker-horizontal .colorpicker-hue {
223
+ @include bgImg('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAABCAMAAAAfBfuPAAABLFBMVEXqFBb/ABH/ACL/ADH/AEH/AFD/AGD/AG7/AH7/AI3/AJ3/AKz/ALz/AMr/ANv/AOr/APr2AP/mAP/XAP/HAP+4AP+oAP+aAP+JAP97AP9rAP9cAP9MAP8+AP8tAP8fAP8PAP8BAv8AEP8AH/8AL/8APv8ATv8AXP8Abf8Ae/8Ai/8Amv8Aqv8AuP8Ayf8A1/8A5/8A9/8A//gA/+kA/9kA/8oA/7oA/6wA/5sA/40A/30A/24A/14A/1AA/z8A/zEA/yEA/xEB/wMN/wAd/wAs/wA8/wBK/wBb/wBp/wB5/wCI/wCY/wCm/wC3/wDF/wDV/wDk/wD1/wD/+gD/7AD/3AD/zAD/vgD/rQD/nwD/jgD/gAD/cAD/YgD/UQD/QwD/MgD/JAD/FAD4Eg42qAedAAAAbUlEQVR4XgXAghEDsbxtlrZt27ax/w49ACAYQTGcICmaYTleECVZUTXdMC1Wm93hdLk9Xp8/EAyFI9FYPJFMpTPZXL5QLJUr1Vq90Wy1O91efzAcjSfT2XyxXK03293+cDydL9fb/fF8vT/f3x+LfRNXARMbCAAAAABJRU5ErkJggg==');
224
+ }
225
+
226
+ .colorpicker.colorpicker-horizontal .colorpicker-alpha {
227
+ @include bgImg('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAAAKCAQAAADoFTP1AAAB9ElEQVR4XoWTQW4VMRBEu9qWEimL7DhEMp8NF+ASnJJLcAQgE1bcgBUSkYKUuHCrZ9pjeqSU5Yn9LPu7umJQBIIv+k7vIOrtK66L4lmr3pVOrOv3otp619KZ0/KjdNI79L52Uo09FBQWrU0vfe5trezU+hLsoUKd3Repovte+0vbq/7Lj5XbaHECKasR9G4MPlbp+gzZxd6koPEJCkAYC5SjcOTAIIOK90Dja1IfIZ8Z+zAY9jm3b5Ia+MT5sFcqRJrR2AYYA8Kua5BzYRrFPNmD4PQMegGJMOffJJUsWiI3nCHZZjInNdffLWOufzbc3JaboCAVxwmnRHbhLSPwRJ4wU0BRSc6HkECYYVw95nMKgJOcylxrJttE5Ibzf9Xq9GPvP+WX3MiV/MGHfRu/SentRQrfG1GzsIrytdNXucSRKxQNIGHM9YhGFQJcdjNcBZvfJayuYe4Sia1CzwW+19mWOhe37HsxJWKwbu/jluEU15QzAQjAqCEbhMJc78GYV2E0kooHDubUImWkTOhGpgv8PoT8DJG/bzxna4BZ0eOFSOaLADGeSpFsg5AzeaDZIDQQXjZ4y/8ryfzUXBwdELRjTjCNvOeT0rNlrJz90vwy6N9pXXQEluX0inElpPWokSdiLCfiNJJjMKQ8Qsh8GEKQKMo/eiHrNbI9UksAAAAASUVORK5CYII=');
228
+ }
229
+
230
+ .colorpicker-right:before {
231
+ left: auto;
232
+ right: 6px;
233
+ }
234
+
235
+ .colorpicker-right:after {
236
+ left: auto;
237
+ right: 7px;
238
+ }
239
+
240
+ .colorpicker-no-arrow:before {
241
+ border-right: 0;
242
+ border-left: 0;
243
+ }
244
+
245
+ .colorpicker-no-arrow:after {
246
+ border-right: 0;
247
+ border-left: 0;
248
+ }
249
+
250
+ .colorpicker,
251
+ .colorpicker-alpha,
252
+ .colorpicker-saturation,
253
+ .colorpicker-hue,
254
+ .colorpicker-selectors {
255
+ &.colorpicker-visible {
256
+ display: block;
257
+ }
258
+ }
259
+
260
+ .colorpicker,
261
+ .colorpicker-alpha,
262
+ .colorpicker-saturation,
263
+ .colorpicker-hue,
264
+ .colorpicker-selectors {
265
+ &.colorpicker-hidden {
266
+ display: none;
267
+ }
268
+ }
269
+
270
+ .colorpicker-inline.colorpicker-visible {
271
+ display: inline-block;
272
+ }
File without changes
@@ -0,0 +1,14 @@
1
+ bootstrap_decko:
2
+ items:
3
+ - style_bootstrap_cards.scss
4
+
5
+ libraries:
6
+ items:
7
+ - font_awesome.css
8
+ - material_icons.css
9
+ - bootstrap_colorpicker.scss
10
+ - ../../vendor/select2/dist/css/select2.css
11
+ - select2_bootstrap.scss
12
+ - ../../vendor/bootstrap-colorpicker/src/sass/_colorpicker.scss
13
+
14
+
@@ -275,7 +275,7 @@ body.mceContentBody {
275
275
  /*---------- comments -------------------------------------- */
276
276
 
277
277
  .comment-box {
278
- padding-top: 8px;
278
+ padding: 0.5em 0;
279
279
  input {
280
280
  padding: 0px;
281
281
  }
@@ -481,12 +481,14 @@ body.mceContentBody {
481
481
 
482
482
  .item-box {
483
483
  display: inline-block;
484
- min-width: 260px;
485
- width: 15%;
486
484
  padding: 10px 1%;
487
485
  vertical-align: top;
488
486
  }
489
487
 
488
+ .box {
489
+ width: 320px;
490
+ }
491
+
490
492
  .box-top {
491
493
  display: flex;
492
494
  min-height: 60px;
data/locales/de.yml ADDED
@@ -0,0 +1,3 @@
1
+ de:
2
+ bootstrap_cannot_source_theme: kann die Quelle für das Theme %{theme_name} nicht finden
3
+ bootstrap_not_valid_theme: kein gültiges Theme %{theme_name}
data/locales/en.yml ADDED
@@ -0,0 +1,3 @@
1
+ en:
2
+ bootstrap_cannot_source_theme: can't find source for theme %{theme_name}
3
+ bootstrap_not_valid_theme: not a valid theme %{theme_name}
@@ -20,8 +20,8 @@
20
20
  # is taken from files.
21
21
  # The bootswatch theme content is taken directly from the files in the bootswatch
22
22
  # submodule. For the rest we use code file cards.
23
- # Cards of type "customized bootswatch skin" have the same structure but make the variables
24
- # and stylesheets part editable.
23
+ # Cards of type "customized bootswatch skin" have the same structure but make the
24
+ # variables and stylesheets part editable.
25
25
  #
26
26
  # Bootswatch theme cards are machine cards for the following reason.
27
27
  # Machine cards usually store all involved input cards of all nested levels in
@@ -36,25 +36,48 @@
36
36
  # To do that it is a machine itself and stores the generated machine output as its
37
37
  # content which will trigger the updates of other machines that use this card.
38
38
 
39
- include_set Abstract::Machine
40
- include_set Type::Scss
41
- include_set Abstract::CodeFile
39
+ include_set Abstract::AssetInputter, input_format: :css, input_view: :compressed
40
+ include_set Abstract::Scss
42
41
  include_set Abstract::SkinBox
43
42
 
44
43
  CONTENT_PARTS = %i[pre_variables variables post_variables stylesheets].freeze
45
44
 
46
- PRE_VARIABLES_CARD_NAMES = %i[
47
- style_jquery_ui_smoothness
48
- bootstrap_functions
49
- ].freeze
45
+ PRE_VARIABLES_CARD_NAMES = %i[bootstrap_functions].freeze
46
+ POST_VARIABLES_CARD_NAMES = %i[bootstrap_core style_mods].freeze
50
47
 
51
- POST_VARIABLES_CARD_NAMES = %i[
52
- bootstrap_core
53
- style_cards
54
- style_bootstrap_cards
55
- style_libraries
56
- style_mods
57
- ].freeze
48
+ def content
49
+ CONTENT_PARTS.map do |n|
50
+ send "#{n}_content"
51
+ end.join "\n"
52
+ end
53
+
54
+ def item_names _args={}
55
+ (PRE_VARIABLES_CARD_NAMES + variables_card_names +
56
+ POST_VARIABLES_CARD_NAMES + stylesheets_card_names).compact.map do |n|
57
+ Card.fetch_name(n)
58
+ end.compact
59
+ end
60
+
61
+ format :html do
62
+ view :input do
63
+ # Localize
64
+ "Content is stored in file and can't be edited."
65
+ end
66
+ end
67
+
68
+ def theme_name
69
+ /^(.+)_skin$/.match(codename)&.capture(0) ||
70
+ /^(.+)[ _][sS]kin/.match(name)&.capture(0)&.downcase
71
+ end
72
+
73
+ def scss_from_theme_file file
74
+ return "" unless (path = ::File.join(source_dir, "_#{file}.scss")) &&
75
+ ::File.exist?(path)
76
+
77
+ ::File.read path
78
+ end
79
+
80
+ private
58
81
 
59
82
  # @return [Array<Card::Name,String>]
60
83
  def variables_card_names
@@ -66,43 +89,20 @@ def stylesheets_card_names
66
89
  []
67
90
  end
68
91
 
69
- # reject cards that don't contribute directly to the content like skin or pointer cards
70
- def engine_input
71
- extended_input_cards.select { |ca| ca.type_id.in? [Card::ScssID, Card::CssID] }
72
- end
73
-
74
- # Don't create "+*machine output" file card
75
- # instead save the the output as the card's content is
76
- def after_engine output
77
- Card::Auth.as_bot { update! db_content: output }
78
- end
79
-
80
- # needed to make the refresh_assets method work with these cards
92
+ # needed to make the refresh_script_and_style method work with these cards
81
93
  def source_files
82
- extended_input_cards.map do |i_card|
94
+ item_cards.map do |i_card|
83
95
  i_card.try(:source_files)
84
96
  end.flatten.compact
85
97
  end
86
98
 
87
99
  # needed to make the refresh_assets method work with these cards
88
100
  def existing_source_paths
89
- extended_input_cards.map do |i_card|
101
+ item_cards.map do |i_card|
90
102
  i_card.try(:existing_source_paths)
91
103
  end.flatten.compact
92
104
  end
93
105
 
94
- def extended_input_cards
95
- input_names.map do |n|
96
- Card.fetch(n).extended_item_cards
97
- end.flatten.compact
98
- end
99
-
100
- def content
101
- CONTENT_PARTS.map do |n|
102
- send "#{n}_content"
103
- end.join "\n"
104
- end
105
-
106
106
  def pre_variables_content
107
107
  load_content(*PRE_VARIABLES_CARD_NAMES)
108
108
  end
@@ -119,38 +119,13 @@ def stylesheets_content
119
119
  load_content stylesheets_card_names
120
120
  end
121
121
 
122
- def input_names _args={}
123
- (PRE_VARIABLES_CARD_NAMES + variables_card_names +
124
- POST_VARIABLES_CARD_NAMES + stylesheets_card_names).compact.map do |n|
125
- Card.fetch_name(n)
126
- end.compact
127
- end
128
-
129
- def item_names _args={}
130
- []
131
- end
132
-
133
- def item_cards _args={}
134
- [self]
135
- end
136
-
137
122
  def load_content *names
138
- cards = names.flatten.map { |n| Card.fetch(n)&.extended_item_cards }
123
+ cards = names.flatten.map do |n|
124
+ Card.fetch(n)&.extended_item_cards
125
+ end
139
126
  cards.flatten.compact.map(&:content).join "\n"
140
127
  end
141
128
 
142
- def scss_from_theme_file file
143
- return "" unless (path = ::File.join(source_dir, "_#{file}.scss")) &&
144
- ::File.exist?(path)
145
-
146
- ::File.read path
147
- end
148
-
149
- def theme_name
150
- /^(.+)_skin$/.match(codename)&.capture(0) ||
151
- /^(.+)[ _][sS]kin/.match(name)&.capture(0)&.downcase
152
- end
153
-
154
129
  def source_dir
155
130
  @source_dir ||= File.expand_path(
156
131
  "#{mod_root :bootstrap}/vendor/bootswatch/dist/#{theme_name}", __FILE__
@@ -55,7 +55,7 @@ format :html do
55
55
  end
56
56
 
57
57
  def popover_opts text, title, opts
58
- add_class opts, "pl-1 text-muted-link"
58
+ add_class opts, "pl-1 text-muted-link _popover_link"
59
59
  opts.merge! path: "#", "data-toggle": "popover",
60
60
  "data-trigger": :focus, "data-content": text
61
61
  opts["data-title"] = title if title
@@ -30,7 +30,7 @@ format :html do
30
30
  pushpin: "thumb-tack",
31
31
  globe: :globe,
32
32
  zoom_out: "search-minus",
33
- close: :remove,
33
+ close: :times,
34
34
  check_circle: "check-circle",
35
35
  reorder: "align-justify",
36
36
  commenting: :comments
@@ -1,8 +1,8 @@
1
1
  include_set Abstract::BootswatchTheme
2
2
 
3
- card_accessor :colors
4
- card_accessor :variables
5
- card_accessor :stylesheets
3
+ card_accessor :colors, type: :scss
4
+ card_accessor :variables, type: :scss
5
+ card_accessor :stylesheets, type: :skin
6
6
 
7
7
  def top_level_item_cards
8
8
  cards = PRE_VARIABLES_CARD_NAMES.map { |n| Card[n] }
@@ -68,7 +68,7 @@ event :copy_theme, :prepare_to_store, on: :create do
68
68
  end
69
69
 
70
70
  def initialize_theme style_item_names=nil
71
- add_subfield :colors, type_id: Card::ScssID
71
+ subfield :colors, type_id: Card::ScssID
72
72
  add_variables_subfield
73
73
  add_stylesheets_subfield style_item_names
74
74
  end
@@ -83,20 +83,17 @@ def add_stylesheets_subfield style_items=nil
83
83
  opts[:content] = [opts[:content], style_items].flatten.compact.to_pointer_content
84
84
  end
85
85
 
86
- add_subfield :stylesheets, opts
86
+ subfield :stylesheets, opts
87
87
  end
88
88
 
89
89
  def add_variables_subfield
90
90
  theme_content = content_from_theme(:variables)
91
91
  default_content = read_bootstrap_variables
92
- add_subfield :variables,
93
- type_id: Card::ScssID,
94
- content: "#{theme_content}\n\n\n#{default_content}"
92
+ subfield :variables, type: :scss, content: "#{theme_content}\n\n\n#{default_content}"
95
93
  end
96
94
 
97
95
  def add_bootswatch_subfield
98
- add_subfield :bootswatch, type_id: Card::ScssID,
99
- content: content_from_theme(:bootswatch)
96
+ subfield :bootswatch, type: :scss, content: content_from_theme(:bootswatch)
100
97
  end
101
98
 
102
99
  def theme_card