spina 0.10.0 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of spina might be problematic. Click here for more details.

Files changed (183) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +16 -4
  3. data/app/assets/fonts/spina/ics_spina.eot +0 -0
  4. data/app/assets/fonts/spina/ics_spina.svg +356 -0
  5. data/app/assets/fonts/spina/ics_spina.ttf +0 -0
  6. data/app/assets/fonts/spina/ics_spina.woff +0 -0
  7. data/app/assets/icons/spina/barchart.svg +10 -0
  8. data/app/assets/icons/spina/bars.svg +1 -0
  9. data/app/assets/icons/spina/bold.svg +1 -0
  10. data/app/assets/icons/spina/brush.svg +10 -0
  11. data/app/assets/icons/spina/camera.svg +10 -0
  12. data/app/assets/icons/spina/caret-down.svg +1 -0
  13. data/app/assets/icons/spina/caret-left.svg +1 -0
  14. data/app/assets/icons/spina/caret-right.svg +1 -0
  15. data/app/assets/icons/spina/caret-up.svg +1 -0
  16. data/app/assets/icons/spina/cart.svg +10 -0
  17. data/app/assets/icons/spina/chart-outline.svg +10 -0
  18. data/app/assets/icons/spina/check.svg +10 -0
  19. data/app/assets/icons/spina/chevron-down.svg +1 -0
  20. data/app/assets/icons/spina/chevron-left.svg +1 -0
  21. data/app/assets/icons/spina/chevron-right.svg +1 -0
  22. data/app/assets/icons/spina/chevron-up.svg +1 -0
  23. data/app/assets/icons/spina/code.svg +1 -0
  24. data/app/assets/icons/spina/cog-outline.svg +10 -0
  25. data/app/assets/icons/spina/cog.svg +10 -0
  26. data/app/assets/icons/spina/comment.svg +1 -0
  27. data/app/assets/icons/spina/cross.svg +10 -0
  28. data/app/assets/icons/spina/customer-outline.svg +10 -0
  29. data/app/assets/icons/spina/document.svg +10 -0
  30. data/app/assets/icons/spina/dots.svg +10 -0
  31. data/app/assets/icons/spina/exclamation.svg +13 -0
  32. data/app/assets/icons/spina/eye.svg +1 -0
  33. data/app/assets/icons/spina/filter.svg +10 -0
  34. data/app/assets/icons/spina/home.svg +1 -0
  35. data/app/assets/icons/spina/image.svg +10 -0
  36. data/app/assets/icons/spina/inbox-outline.svg +10 -0
  37. data/app/assets/icons/spina/info.svg +13 -0
  38. data/app/assets/icons/spina/italic.svg +1 -0
  39. data/app/assets/icons/spina/large-check.svg +10 -0
  40. data/app/assets/icons/spina/link.svg +1 -0
  41. data/app/assets/icons/spina/list-ul.svg +1 -0
  42. data/app/assets/icons/spina/mail-outline.svg +10 -0
  43. data/app/assets/icons/spina/mail.svg +10 -0
  44. data/app/assets/icons/spina/media-library.svg +10 -0
  45. data/app/assets/icons/spina/megaphone.svg +10 -0
  46. data/app/assets/icons/spina/min.svg +14 -0
  47. data/app/assets/icons/spina/pages.svg +10 -0
  48. data/app/assets/icons/spina/pencil-outline.svg +10 -0
  49. data/app/assets/icons/spina/pencil.svg +16 -0
  50. data/app/assets/icons/spina/picture-o.svg +1 -0
  51. data/app/assets/icons/spina/plus.svg +10 -0
  52. data/app/assets/icons/spina/power-off.svg +10 -0
  53. data/app/assets/icons/spina/preview/icons_spina-preview.html +1043 -0
  54. data/app/assets/icons/spina/preview/ics_spina-preview.html +1043 -0
  55. data/app/assets/icons/spina/preview.svg +10 -0
  56. data/app/assets/icons/spina/product-outline.svg +10 -0
  57. data/app/assets/icons/spina/random.svg +10 -0
  58. data/app/assets/icons/spina/refresh.svg +13 -0
  59. data/app/assets/icons/spina/search.svg +10 -0
  60. data/app/assets/icons/spina/shop.svg +12 -0
  61. data/app/assets/icons/spina/social-outline.svg +10 -0
  62. data/app/assets/icons/spina/trash.svg +10 -0
  63. data/app/assets/icons/spina/upload-outline.svg +14 -0
  64. data/app/assets/icons/spina/users-outline.svg +10 -0
  65. data/app/assets/images/spina/arrow-left.png +0 -0
  66. data/app/assets/images/spina/arrow-right.png +0 -0
  67. data/app/assets/images/spina/danger-zone-ribbon.png +0 -0
  68. data/app/assets/images/spina/datepicker.png +0 -0
  69. data/app/assets/images/spina/divider.png +0 -0
  70. data/app/assets/images/spina/marker.png +0 -0
  71. data/app/assets/images/spina/mask.png +0 -0
  72. data/app/assets/images/spina/spina.png +0 -0
  73. data/app/assets/images/spina/spina_small.png +0 -0
  74. data/app/assets/images/spina/wheel.png +0 -0
  75. data/app/assets/javascripts/spina/admin/{account.js.coffee → account.coffee} +0 -0
  76. data/app/assets/javascripts/spina/admin/application.coffee.erb +152 -0
  77. data/app/assets/javascripts/spina/admin/{confirm_delete.js.coffee.erb → confirm_delete.coffee.erb} +0 -0
  78. data/app/assets/javascripts/spina/admin/dropdown.coffee +75 -0
  79. data/app/assets/javascripts/spina/admin/forms.coffee +7 -0
  80. data/app/assets/javascripts/spina/admin/galleryselect.coffee +20 -0
  81. data/app/assets/javascripts/spina/admin/{spina.infinite_scroll.coffee → infinite_scroll.coffee} +1 -0
  82. data/app/assets/javascripts/spina/admin/modal.coffee +54 -0
  83. data/app/assets/javascripts/spina/admin/navigation.coffee +38 -0
  84. data/app/assets/javascripts/spina/admin/notifications.coffee +7 -0
  85. data/app/assets/javascripts/spina/admin/{pages.js.coffee.erb → pages.coffee.erb} +11 -2
  86. data/app/assets/javascripts/spina/admin/switch.coffee +43 -0
  87. data/app/assets/javascripts/spina/admin/tabs.coffee +13 -0
  88. data/app/assets/javascripts/spina/admin/{spina.trix.js.coffee.erb → trix.coffee.erb} +26 -25
  89. data/app/assets/javascripts/spina/admin/uploads.coffee +35 -0
  90. data/app/assets/stylesheets/spina/_admin_editing.sass +25 -0
  91. data/app/assets/stylesheets/spina/_buttons.sass +367 -0
  92. data/app/assets/stylesheets/spina/_cards.sass +54 -0
  93. data/app/assets/stylesheets/spina/_configuration.sass +15 -0
  94. data/app/assets/stylesheets/spina/_custom_animations.sass +61 -0
  95. data/app/assets/stylesheets/spina/_farbtastic.sass +37 -0
  96. data/app/assets/stylesheets/spina/_fonts.sass +18 -0
  97. data/app/assets/stylesheets/spina/_forms.sass +806 -0
  98. data/app/assets/stylesheets/spina/_gallery.sass +249 -0
  99. data/app/assets/stylesheets/spina/_ics_spina.scss +60 -0
  100. data/app/assets/stylesheets/spina/_labels.sass +30 -0
  101. data/app/assets/stylesheets/spina/_login.sass +46 -0
  102. data/app/assets/stylesheets/spina/_modal.sass +162 -0
  103. data/app/assets/stylesheets/spina/_notifications.sass +62 -0
  104. data/app/assets/stylesheets/spina/_sortable_lists.sass +177 -0
  105. data/app/assets/stylesheets/spina/_tables.sass +301 -0
  106. data/app/assets/stylesheets/spina/_trix.sass +99 -0
  107. data/app/assets/stylesheets/spina/_wizard.sass +122 -0
  108. data/app/assets/stylesheets/spina/_wysihtml5.sass +79 -0
  109. data/app/assets/stylesheets/spina/application.sass +0 -1
  110. data/app/assets/stylesheets/spina/wysihtml5_textarea.sass +14 -0
  111. data/app/assets/stylesheets/spina.sass +564 -0
  112. data/app/controllers/concerns/spina/frontend.rb +59 -0
  113. data/app/controllers/spina/admin/navigations_controller.rb +60 -0
  114. data/app/controllers/spina/admin/pages_controller.rb +7 -6
  115. data/app/controllers/spina/admin/photos_controller.rb +18 -7
  116. data/app/controllers/spina/application_controller.rb +2 -2
  117. data/app/controllers/spina/pages_controller.rb +4 -49
  118. data/app/helpers/spina/admin/pages_helper.rb +12 -7
  119. data/app/helpers/spina/application_helper.rb +0 -29
  120. data/app/models/concerns/spina/part.rb +1 -1
  121. data/app/models/spina/navigation.rb +11 -0
  122. data/app/models/spina/navigation_item.rb +17 -0
  123. data/app/models/spina/page.rb +11 -0
  124. data/app/models/spina/page_part.rb +1 -1
  125. data/app/models/spina/photo_collection.rb +6 -1
  126. data/app/models/spina/structure.rb +4 -0
  127. data/app/models/spina/structure_item.rb +5 -1
  128. data/app/models/spina/structure_part.rb +16 -3
  129. data/app/views/layouts/spina/admin/admin.html.haml +8 -1
  130. data/app/views/layouts/spina/admin/pages.html.haml +30 -0
  131. data/app/views/spina/admin/accounts/_form.html.haml +1 -1
  132. data/app/views/spina/admin/accounts/analytics.html.haml +1 -1
  133. data/app/views/spina/admin/accounts/social.html.haml +1 -1
  134. data/app/views/spina/admin/accounts/style.html.haml +1 -1
  135. data/app/views/spina/admin/navigations/_navigation_item_nested_list.html.haml +7 -0
  136. data/app/views/spina/admin/navigations/_page.html.haml +8 -0
  137. data/app/views/spina/admin/navigations/edit.html.haml +22 -0
  138. data/app/views/spina/admin/navigations/show.html.haml +7 -0
  139. data/app/views/spina/admin/page_partables/attachment_collections/_form.html.haml +1 -1
  140. data/app/views/spina/admin/page_partables/attachments/_form.html.haml +1 -1
  141. data/app/views/spina/admin/page_partables/photo_collections/_form.html.haml +1 -1
  142. data/app/views/spina/admin/page_partables/photos/_form.html.haml +1 -1
  143. data/app/views/spina/admin/page_partables/structures/_form.html.haml +1 -1
  144. data/app/views/spina/admin/pages/_form.html.haml +12 -5
  145. data/app/views/spina/admin/pages/_page.html.haml +12 -18
  146. data/app/views/spina/admin/pages/_page_nested_list.html.haml +7 -0
  147. data/app/views/spina/admin/pages/create.js.coffee +0 -0
  148. data/app/views/spina/admin/pages/index.html.haml +24 -42
  149. data/app/views/spina/admin/pages/update.js.coffee +1 -3
  150. data/app/views/spina/admin/photos/_photo.html.haml +2 -0
  151. data/app/views/spina/admin/photos/_photo_collection_select.html.haml +1 -1
  152. data/app/views/spina/admin/photos/_photo_select.html.haml +2 -2
  153. data/app/views/spina/admin/photos/_wysihtml5_select.html.haml +1 -1
  154. data/app/views/spina/admin/photos/create_multiple.js.erb +4 -0
  155. data/app/views/spina/admin/photos/index.html.haml +1 -1
  156. data/app/views/spina/admin/photos/single_picker_infinite_scroll.js.erb +1 -1
  157. data/app/views/spina/admin/sessions/new.html.haml +8 -5
  158. data/app/views/spina/admin/shared/_notifications.html.haml +3 -1
  159. data/app/views/spina/admin/shared/_primary_navigation.html.haml +4 -3
  160. data/app/views/spina/admin/shared/_rich_text_field.html.haml +16 -16
  161. data/app/views/spina/admin/structure_items/_fields.html.haml +7 -8
  162. data/app/views/spina/admin/structure_partables/photo_collections/_form.html.haml +14 -0
  163. data/app/views/spina/admin/structure_partables/photos/_form.html.haml +1 -1
  164. data/app/views/spina/shared/_google_site_verification.html.haml +1 -0
  165. data/config/fontcustom.yml +95 -0
  166. data/config/locales/en.yml +11 -0
  167. data/config/locales/nl.yml +13 -3
  168. data/config/locales/pt-BR.yml +11 -1
  169. data/config/routes.rb +14 -8
  170. data/db/migrate/1_create_spina_tables.rb +0 -7
  171. data/db/migrate/2_create_spina_translation_tables.rb +26 -7
  172. data/db/migrate/3_create_spina_navigations.rb +21 -0
  173. data/lib/generators/spina/templates/config/initializers/carrierwave.rb +1 -1
  174. data/lib/spina/engine.rb +1 -2
  175. data/lib/spina/fontcustom/_ics_spina.scss +5 -0
  176. data/lib/spina/version.rb +1 -1
  177. data/lib/spina.rb +3 -1
  178. metadata +146 -45
  179. data/app/assets/images/spina/admin/logo@2x.png +0 -0
  180. data/app/assets/javascripts/spina/admin/application.js +0 -10
  181. data/app/assets/javascripts/spina/admin/spina.scaffold.coffee +0 -15
  182. data/app/assets/javascripts/spina/application.js +0 -15
  183. data/app/assets/stylesheets/spina/_mixins.scss +0 -34
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="257px" height="145px" viewBox="0 0 257 145" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <!-- Generator: Sketch 3.3.1 (12002) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Slice 1</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <path d="M128.00088,100 C108.14988,100 92.0008804,83.851 92.0008804,64 C92.0008804,44.149 108.14988,28 128.00088,28 C130.20988,28 132.00088,29.791 132.00088,32 C132.00088,34.209 130.20988,36 128.00088,36 C112.56088,36 100.00088,48.561 100.00088,64 C100.00088,79.439 112.56088,92 128.00088,92 C143.43988,92 156.00088,79.439 156.00088,64 C156.00088,61.791 157.79188,60 160.00088,60 C162.20988,60 164.00088,61.791 164.00088,64 C164.00088,83.851 147.85088,100 128.00088,100 L128.00088,100 L128.00088,100 Z M254.41888,67.226 C222.17288,23.875 177.27688,0 128.00088,0 C78.7248804,0 33.8278804,23.875 1.58188042,67.226 C-1.05511958,70.771 -0.32011958,75.782 3.22688042,78.419 C6.76988042,81.055 11.7838804,80.319 14.4188804,76.774 C25.3618804,62.063 37.8808804,49.834 51.5828804,40.295 C49.2218804,47.912 48.0008804,55.886 48.0008804,64 C48.0008804,108.112 83.8878804,144 128.00088,144 C172.11288,144 208.00088,108.112 208.00088,64 C208.00088,59.582 204.41888,56 200.00088,56 C195.58288,56 192.00088,59.582 192.00088,64 C192.00088,99.29 163.29088,128 128.00088,128 C92.7108804,128 64.0008804,99.29 64.0008804,64 C64.0008804,51.277 67.7288804,38.985 74.7808804,28.451 C75.0898804,27.989 75.5308804,27.37 75.9608804,26.711 C92.3258804,19.669 109.84388,16 128.00088,16 C172.09388,16 212.43088,37.583 241.58188,76.774 C243.15088,78.885 245.56388,80 248.00688,80 C249.66688,80 251.34088,79.485 252.77488,78.418 C256.32088,75.782 257.05588,70.771 254.41888,67.226 L254.41888,67.226 Z" id="Shape" fill="#000000" sketch:type="MSShapeGroup"></path>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 3.7.2 (28276) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Shape</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
8
+ <path d="M253.719,119.768 L205.719,39.768 C202.827,34.95 197.619,32 192,32 L64,32 C58.379,32 53.17,34.949 50.279,39.768 L2.279,119.768 C0.787,122.255 0,125.1 0,128 L0,208 C0,216.836 7.162,224 16,224 L240,224 C248.836,224 256,216.836 256,208 L256,128 C256,125.1 255.211,122.255 253.719,119.768 L253.719,119.768 Z M192,48 L237.6,124 L167.098,124 L159.588,101.471 C158.5,98.203 155.442,96 152,96 L132,96 L132,64 L144,64 C148.418,64 152,60.418 152,56 L152,48 L192,48 L192,48 Z M152,104 L160,128 L160,152 L96,152 L96,128 L104,104 L152,104 L152,104 Z M112,48 L144,48 L144,56 L112,56 L112,48 L112,48 Z M64,48 L104,48 L104,56 C104,60.418 107.58,64 112,64 L124,64 L124,96 L104,96 C100.556,96 97.498,98.203 96.41,101.471 L88.9,124 L18.398,124 L64,48 L64,48 Z M16,208 L16,132 L16,132 L88,132 L88,152 C88,156.418 91.58,160 96,160 L160,160 C164.418,160 168,156.418 168,152 L168,132 L240,132 L240,208 L16,208 L16,208 Z" id="Shape" fill="#000000"></path>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="256px" height="224px" viewBox="0 0 256 224" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <!-- Generator: Sketch 3.3.1 (12002) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Slice 1</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <path d="M256,48.0019439 C256,52.2439439 254.314,56.3139439 251.313,59.3139439 L219.313,91.3129439 C216.251,94.3739439 212.16,95.9999439 207.996,95.9999439 C205.934,95.9999439 203.855,95.6019439 201.877,94.7809439 C195.898,92.3039439 192,86.4699439 192,79.9999439 L192,63.9999439 C171.377,63.9999439 159.469,84.8379439 142.311,119.154944 C134.036,135.703944 125.481,152.815944 114.293,166.242944 C100.049,183.333944 83.128,191.999944 64,191.999944 L16,191.999944 C7.163,191.999944 0,184.835944 0,175.999944 C0,167.163944 7.163,159.999944 16,159.999944 L64,159.999944 C84.623,159.999944 96.53,139.161944 113.689,104.844944 C121.963,88.2959439 130.517,71.1839439 141.709,57.7569439 C155.951,40.6659439 172.872,31.9999439 192,31.9999439 L192,15.9999439 C192,9.52894394 195.898,3.69494394 201.877,1.21894394 C207.858,-1.25905606 214.739,0.11194394 219.314,4.68694394 L251.314,36.6879439 C254.314,39.6879439 256,43.7569439 256,48.0019439 L256,48.0019439 Z M64,31.9999439 L16,31.9999439 C7.163,31.9999439 0,39.1639439 0,47.9999439 C0,56.8359439 7.163,63.9999439 16,63.9999439 L64,63.9999439 C79.133,63.9999439 89.574,75.2309439 100.841,94.7659439 C106.237,83.9909439 111.819,73.0739439 118.31,62.8789439 C117.006,61.1209439 115.668,59.4099439 114.293,57.7569439 C100.049,40.6659439 83.128,31.9999439 64,31.9999439 L64,31.9999439 Z M251.313,164.686944 L219.313,132.686944 C214.739,128.111944 207.858,126.742944 201.876,129.218944 C195.897,131.695944 191.999,137.529944 191.999,143.999944 L191.999,159.999944 C176.865,159.999944 166.425,148.768944 155.158,129.233944 C149.761,140.008944 144.18,150.925944 137.689,161.120944 C138.992,162.878944 140.329,164.589944 141.708,166.242944 C155.95,183.333944 172.871,191.999944 191.999,191.999944 L191.999,207.999944 C191.999,214.470944 195.897,220.304944 201.876,222.780944 C203.855,223.600944 205.933,223.999944 207.995,223.999944 C212.159,223.999944 216.251,222.373944 219.312,219.312944 L251.312,187.312944 C257.562,181.064944 257.562,170.934944 251.313,164.686944 L251.313,164.686944 Z" id="Shape" fill="#000000" sketch:type="MSShapeGroup"></path>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,13 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="257px" height="257px" viewBox="0 0 257 257" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <!-- Generator: Sketch 3.3.1 (12002) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Untitled 2</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <g id="Group" sketch:type="MSLayerGroup" transform="translate(0.000000, 33.000000)" fill="#000000">
9
+ <path d="M255.781,89.878 C253.305,83.899 247.47,80 241,80 L223.659,80 C216.017,34.655 176.482,0 129,0 C112.15,0 95.549,4.453 80.99,12.877 C73.342,17.302 70.728,27.089 75.152,34.738 C79.579,42.386 89.363,44.998 97.015,40.575 C106.71,34.965 117.769,32 128.999,32 C158.765,32 183.851,52.428 190.975,80 L177.001,80 C170.528,80 164.694,83.898 162.218,89.878 C159.741,95.856 161.111,102.738 165.685,107.314 L197.685,139.314 C200.81,142.438 204.905,144.001 208.999,144.001 C213.093,144.001 217.188,142.439 220.312,139.314 L252.312,107.314 C256.889,102.738 258.258,95.855 255.781,89.878 L255.781,89.878 Z" id="Shape" sketch:type="MSShapeGroup"></path>
10
+ <path d="M160.982,151.425 C151.287,157.035 140.229,160 129.002,160 C99.234,160 74.147,139.572 67.023,112 L81,112 C87.469,112 93.305,108.102 95.781,102.123 C98.257,96.144 96.888,89.262 92.312,84.686 L60.312,52.686 C54.064,46.437 43.933,46.437 37.685,52.686 L5.685,84.686 C1.11,89.261 -0.26,96.144 2.216,102.123 C4.694,108.102 10.527,112 16.999,112 L34.34,112 C41.981,157.345 81.517,192 129.001,192 C145.848,192 162.448,187.547 177.009,179.124 C184.657,174.698 187.269,164.911 182.845,157.262 C178.42,149.612 168.633,147.002 160.982,151.425 L160.982,151.425 Z" id="Shape" sketch:type="MSShapeGroup"></path>
11
+ </g>
12
+ </g>
13
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <!-- Generator: Sketch 3.3.1 (12002) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Slice 1</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <path d="M248.97,215.03 L178.703,144.762 C187.148,130.47 192,113.803 192,96 C192,42.98 149.019,0 96,0 C42.98,0 0,42.98 0,96 C0,149.02 42.98,192 96,192 C113.802,192 130.47,187.148 144.762,178.703 L215.03,248.971 C219.717,253.657 225.858,256 232.001,256 C238.144,256 244.285,253.656 248.971,248.971 C258.342,239.599 258.342,224.403 248.97,215.03 L248.97,215.03 Z M32,96.001 C32,60.712 60.71,32.001 96,32.001 C131.29,32.001 160,60.712 160,96.001 C160,131.29 131.29,160.001 96,160.001 C60.71,160.001 32,131.29 32,96.001 L32,96.001 Z" id="Shape" fill="#000000" sketch:type="MSShapeGroup"></path>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 18.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4
+ <svg version="1.1" id="Shop" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5
+ viewBox="0 0 20 20" enable-background="new 0 0 20 20" xml:space="preserve">
6
+ <path d="M6.123,7.25L6.914,2H2.8L1.081,6.5C1.028,6.66,1,6.826,1,7c0,1.104,1.15,2,2.571,2C4.881,9,5.964,8.236,6.123,7.25z M10,9
7
+ c1.42,0,2.571-0.896,2.571-2c0-0.041-0.003-0.082-0.005-0.121L12.057,2H7.943l-0.51,4.875C7.431,6.916,7.429,6.957,7.429,7
8
+ C7.429,8.104,8.58,9,10,9z M15,10.046V14H5v-3.948C4.562,10.21,4.08,10.3,3.571,10.3c-0.195,0-0.384-0.023-0.571-0.049V16.6
9
+ c0,0.77,0.629,1.4,1.398,1.4H15.6c0.77,0,1.4-0.631,1.4-1.4v-6.348c-0.188,0.025-0.376,0.049-0.571,0.049
10
+ C15.923,10.3,15.439,10.208,15,10.046z M18.92,6.5L17.199,2h-4.113l0.79,5.242C14.03,8.232,15.113,9,16.429,9
11
+ C17.849,9,19,8.104,19,7C19,6.826,18.972,6.66,18.92,6.5z"/>
12
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="256px" height="240px" viewBox="0 0 256 240" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <!-- Generator: Sketch 3.3.1 (12002) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Untitled 2</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <path d="M159.999832,67.998 C159.999832,74.624 154.626832,79.997 147.999832,79.997 C141.372832,79.997 135.999832,74.624 135.999832,67.998 C135.999832,61.371 141.372832,55.998 147.999832,55.998 C154.626832,55.998 159.999832,61.371 159.999832,67.998 L159.999832,67.998 Z M249.994832,100.492 L218.746832,125.49 C214.189832,141.449 206.821832,156.268 196.801832,169.605 C189.066832,179.906 179.916832,189.055 169.609832,196.799 C161.298832,203.042 152.421832,208.228 143.126832,212.361 L151.155832,228.419 C153.131832,232.372 151.529832,237.177 147.578832,239.152 C146.430832,239.727 145.208832,239.999 144.006832,239.999 C141.071832,239.999 138.246832,238.378 136.845832,235.575 L128.059832,218.003 C115.225832,221.948 101.777832,223.997 88.0008321,223.997 C83.4338321,223.997 78.9068321,223.747 74.4198321,223.306 L71.7628321,233.938 C70.8538321,237.573 67.5908321,240 64.0068321,240 C63.3638321,240 62.7118321,239.922 62.0608321,239.759 C57.7748321,238.688 55.1688321,234.344 56.2398321,230.058 L58.5558321,220.796 C39.7748321,216.665 22.0868321,208.583 6.39083212,196.792 C2.68483212,194.007 0.368832121,189.751 0.0408321211,185.127 C-0.287167879,180.503 1.40883212,175.964 4.68683212,172.685 C6.31983212,171.052 7.89083212,169.375 9.40683212,167.643 C7.78483212,166.281 6.21083212,164.838 4.68683212,163.314 C1.36083212,159.988 -0.334167879,155.367 0.0548321211,150.679 C0.442832121,145.993 2.87283212,141.713 6.70083212,138.98 C30.4318321,122.029 40.4718321,97.115 50.1818321,73.023 C57.4758321,54.919 64.3668321,37.822 76.5928321,24.187 C91.1898321,7.912 110.620832,0 135.999832,0 C155.222832,0 173.487832,6.09 188.818832,17.613 C201.910832,27.453 212.126832,40.978 218.047832,56.169 L248.231832,74.279 C252.722832,76.974 255.611832,81.697 255.962832,86.924 C256.314832,92.151 254.085832,97.218 249.994832,100.492 L249.994832,100.492 Z M188.234832,153.978 C181.503832,148.155 171.375832,148.296 163.895832,149.509 C138.174832,153.683 101.196832,177.37 81.3398321,207.792 C83.5458321,207.913 85.7628321,207.997 87.9988321,207.997 C115.014832,207.997 139.943832,199.07 159.998832,184.005 C169.088832,177.177 177.179832,169.088 184.006832,159.997 C185.478832,158.038 186.883832,156.028 188.234832,153.978 L188.234832,153.978 Z M203.650832,120.032 C196.160832,102.918 196.200832,80.739 203.773832,63.683 C193.799832,35.886 167.228832,15.998 135.999832,15.998 C55.9998321,15.998 79.9998321,106.284 15.9998321,151.997 C20.7168321,156.714 25.7828321,160.195 31.0418321,162.682 C60.0398321,173.149 94.1428321,156.197 105.171832,145.169 C106.733832,143.606 109.265832,143.606 110.827832,145.169 C112.389832,146.73 112.389832,149.264 110.827832,150.825 C103.366832,158.287 87.3488321,168.421 66.7638321,172.423 C61.9838321,173.351 56.5528321,174.013 50.7778321,174.013 C43.5068321,174.013 35.6858321,172.955 27.9198321,170.082 C24.3948321,174.881 20.4588321,179.539 16.0008321,183.996 C32.1358321,196.117 51.4338321,204.259 72.4278321,206.982 C81.1888321,192.49 94.2808321,178.318 110.013832,166.445 C127.496832,153.251 146.668832,144.199 162.616832,141.611 C175.055832,139.595 185.285832,141.496 192.456832,147.09 C197.232832,138.655 201.013832,129.581 203.650832,120.032 L203.650832,120.032 Z M239.999832,87.997 L209.860832,69.914 C204.924832,83.117 204.732832,99.142 209.301832,112.555 L239.999832,87.997 L239.999832,87.997 Z" id="Shape" fill="#000000" sketch:type="MSShapeGroup"></path>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <!-- Generator: Sketch 3.3.1 (12002) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Untitled 2</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <path d="M88,104 L88,216 L72,216 L72,104 L88,104 L88,104 Z M88,96 L72,96 C67.582,96 64,99.582 64,104 L64,216 C64,220.418 67.582,224 72,224 L88,224 C92.418,224 96,220.418 96,216 L96,104 C96,99.582 92.418,96 88,96 L88,96 L88,96 Z M184,104 L184,216 L168,216 L168,104 L184,104 L184,104 Z M184,96 L168,96 C163.582,96 160,99.582 160,104 L160,216 C160,220.418 163.582,224 168,224 L184,224 C188.418,224 192,220.418 192,216 L192,104 C192,99.582 188.418,96 184,96 L184,96 L184,96 Z M136,104 L136,216 L120,216 L120,104 L136,104 L136,104 Z M136,96 L120,96 C115.582,96 112,99.582 112,104 L112,216 C112,220.418 115.582,224 120,224 L136,224 C140.418,224 144,220.418 144,216 L144,104 C144,99.582 140.418,96 136,96 L136,96 L136,96 Z M224,32 L184,32 L184,24 C184,10.767 173.233,0 160,0 L96,0 C82.767,0 72,10.767 72,24 L72,32 L32,32 C23.164,32 16,39.164 16,48 L16,64 C16,72.836 23.164,80 32,80 L32,224 C32,241.645 46.355,256 64,256 L192,256 C209.645,256 224,241.645 224,224 L224,80 C232.836,80 240,72.836 240,64 L240,48 C240,39.164 232.836,32 224,32 L224,32 Z M88,24 C88,19.589 91.589,16 96,16 L160,16 C164.411,16 168,19.589 168,24 L168,32 L88,32 L88,24 L88,24 Z M208,224 C208,232.8 200.8,240 192,240 L64,240 C55.2,240 48,232.8 48,224 L48,72 L208,72 L208,224 L208,224 Z M224,64 L32,64 L32,48 L224,48 L224,64 L224,64 Z" id="Shape" fill="#000000" sketch:type="MSShapeGroup"></path>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,14 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <!-- Generator: Sketch 3.3.1 (12002) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Untitled 2</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <g id="upload-outline" sketch:type="MSLayerGroup" transform="translate(0.000000, 32.000000)" fill="#000000">
9
+ <g id="Page-1" sketch:type="MSShapeGroup">
10
+ <path d="M172,16 C200.717,16 224,39.279 224,68 C224,79.42 220.308,89.973 214.066,98.551 C229.216,104.244 240,118.86 240,136 C240,158.092 222.091,176 200,176 L48,176 C30.324,176 16,161.674 16,144 C16,126.324 30.324,112 48,112 C51.131,112 54.156,112.457 57.018,113.297 C51.383,106.404 48,97.598 48,88 C48,65.908 65.907,48 88,48 C101.177,48 112.864,54.375 120.15,64.207 C122.096,37.26 144.557,16 172,16 L172,16 L172,16 Z M172,0 C154.699,0 138.217,6.502 125.587,18.311 C119.728,23.788 114.948,30.167 111.391,37.154 C104.13,33.808 96.154,32.001 88,32.001 C57.12,32.001 32,57.122 32,88.001 C32,91.507 32.332,94.991 32.98,98.407 C13.846,104.725 0,122.776 0,144.001 C0,170.468 21.532,192.001 48,192.001 L200,192.001 C230.878,192.001 256,166.879 256,136.001 C256,124.382 252.469,113.234 245.791,103.763 C242.82,99.552 239.329,95.81 235.411,92.609 C238.436,84.833 240,76.529 240,68.002 C240,30.504 209.494,0 172,0 L172,0 L172,0 Z M165.655,114.343 L133.655,82.343 C130.532,79.219 125.466,79.219 122.342,82.343 L90.342,114.343 C87.217,117.467 87.217,122.532 90.342,125.656 C93.466,128.78 98.531,128.78 101.654,125.656 L119.998,107.312 L119.998,152 C119.998,156.418 123.58,160 127.998,160 C132.414,160 135.998,156.418 135.998,152 L135.998,107.312 L154.341,125.656 C155.903,127.218 157.951,128 160,128 C162.045,128 164.094,127.219 165.655,125.656 C168.78,122.532 168.78,117.467 165.655,114.343 L165.655,114.343 L165.655,114.343 Z" id="Shape"></path>
11
+ </g>
12
+ </g>
13
+ </g>
14
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
3
+ <!-- Generator: Sketch 3.3.2 (12043) - http://www.bohemiancoding.com/sketch -->
4
+ <title>Untitled 2</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs></defs>
7
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" sketch:type="MSPage">
8
+ <path d="M153.973,70.398 C162.553,63.056 168,52.152 168,40 C168,17.944 150.056,0 128,0 C105.944,0 88,17.944 88,40 C88,52.151 93.447,63.054 102.027,70.396 C84.191,79.773 72,98.489 72,120 L72,176 C72,184.837 79.163,192 88,192 L88,240 C88,248.837 95.163,256 104,256 L152,256 C160.837,256 168,248.837 168,240 L168,192 C176.837,192 184,184.837 184,176 L184,120 C184,98.49 171.808,79.775 153.973,70.398 L153.973,70.398 Z M128,16 C141.255,16 152,26.746 152,40 C152,53.255 141.255,64 128,64 C114.745,64 104,53.255 104,40 C104,26.746 114.745,16 128,16 L128,16 Z M168,176 L160,176 L160,124 C160,121.791 158.209,120 156,120 C153.791,120 152,121.791 152,124 L152,240 L132,240 L132,176 C132,173.791 130.209,172 128,172 C125.791,172 124,173.791 124,176 L124,240 L104,240 L104,124 C104,121.791 102.209,120 100,120 C97.791,120 96,121.791 96,124 L96,176 L88,176 L88,120 C88,97.91 105.908,80 128,80 C150.092,80 168,97.91 168,120 L168,176 L168,176 Z" id="Shape" fill="#000000" sketch:type="MSShapeGroup"></path>
9
+ </g>
10
+ </svg>
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1,152 @@
1
+ # jQuery
2
+
3
+ #= require jquery
4
+ #= require jquery_ujs
5
+
6
+ # Turbolinks
7
+
8
+ #= require turbolinks
9
+
10
+ # jQuery plugins
11
+
12
+ #= require spina/jquery.ui
13
+ #= require spina/jquery.nestable
14
+ #= require spina/jquery.customfileinput
15
+ #= require spina/jquery.farbtastic
16
+ #= require jquery-fileupload/basic
17
+
18
+ # Misc plugins
19
+
20
+ #= require spina/sortable
21
+ #= require spina/raphael
22
+ #= require spina/morris
23
+ #= require spina/wysihtml5_parser_rules
24
+ #= require spina/wysihtml5
25
+ #= require spina/trix
26
+
27
+ # Own code
28
+
29
+ #= require ./switch
30
+ #= require ./modal
31
+ #= require ./tabs
32
+ #= require ./forms
33
+ #= require ./dropdown
34
+ #= require ./galleryselect
35
+ #= require ./uploads
36
+ #= require ./navigation
37
+ #= require ./notifications
38
+
39
+ #= require ./account
40
+ #= require ./confirm_delete
41
+ #= require ./pages
42
+
43
+ #= require ./trix
44
+ #= require ./infinite_scroll
45
+
46
+ # Scaffold
47
+ $(document).on 'click', '.table-clickable tbody tr', (e) ->
48
+ $row = $(this).closest('tr')
49
+ link = $row.find('a.table-link:first')[0]
50
+ if link
51
+ link.click()
52
+ else
53
+ checkbox = $(this).find('input[type="checkbox"]:first, input[type="radio"]:first')
54
+
55
+ if checkbox.length > 0
56
+ checkbox.prop("checked", !checkbox.prop("checked"))
57
+ e.stopPropagation()
58
+
59
+ $(document).on 'click', '.table-clickable tbody tr td', (e) ->
60
+ checkbox = $(this).find('input[type="checkbox"]:first, input[type="radio"]:first')
61
+
62
+ if checkbox.length > 0
63
+ checkbox.prop("checked", !checkbox.prop("checked"))
64
+ e.stopPropagation()
65
+
66
+ $(document).on 'click', '.table-clickable tbody .table-link', (e) ->
67
+ e.stopPropagation()
68
+
69
+ $(document).on 'click', '.table-clickable tbody tr input', (e) ->
70
+ e.stopPropagation()
71
+
72
+ # Search inputs
73
+ $(document).on 'keyup', '.search-input input', (e) ->
74
+ $(this).parent().removeClass('animated small-shake')
75
+ if $(this).val() == ""
76
+ $(this).parent().find('.clear-input').fadeOut(200)
77
+ if e.keyCode == 13
78
+ $(this).parent().addClass('animated small-shake')
79
+ else
80
+ $(this).parent().find('.clear-input').fadeIn(200)
81
+
82
+ $(document).on 'click', '.clear-input', ->
83
+ link = $(this)
84
+ input = link.siblings('input')
85
+ input.val("")
86
+ input.focus()
87
+ input.trigger("keyup")
88
+ link.fadeOut(200)
89
+ return false
90
+
91
+ $(document).on 'keyup + change', '.table-container .search-input input', ->
92
+ datatable = $(this).parent().parent().find('table.datatable').dataTable()
93
+ datatable.fnFilter($(this).val())
94
+
95
+ $(document).on 'change', '.dd', ->
96
+ serialized = $(this).nestable('serialize')
97
+ sort_url = $(this).data('sort-url')
98
+ $.post sort_url, { list: serialized }
99
+
100
+ # Datatables
101
+
102
+ ready = ->
103
+
104
+ # Set paddingTop for section#main
105
+ if header = document.getElementById('header')
106
+ headerHeight = header.getBoundingClientRect().height
107
+ $('section#main').css({paddingTop: headerHeight})
108
+
109
+ # Custom file
110
+ $('input[type="file"][data-customfileinput]:visible').each ->
111
+ $(this).customFileInput()
112
+
113
+ # Image upload
114
+ $('.new_photo').uploadPhoto()
115
+
116
+ # Colorpicker
117
+ $('.colorpicker').each ->
118
+ colorpicker = $(this).find('.colorpicker-container')
119
+ field = $(this).find('input')
120
+
121
+ $.farbtastic colorpicker, (color) ->
122
+ field.val(color)
123
+ field.css('color', color)
124
+
125
+ $('.colorpicker input').focus ->
126
+ container = $(this).parent()
127
+ colorpicker = container.find('.colorpicker-container')
128
+ $.farbtastic(colorpicker).setColor($(this).val())
129
+ container.find('.farbtastic').show()
130
+
131
+ $('.colorpicker input').blur ->
132
+ container = $(this).parent()
133
+ container.find('.farbtastic').hide()
134
+
135
+ # Document upload
136
+ $('.new_document').uploadDocument()
137
+
138
+ # Login wrapper
139
+ $('#login_wrapper').css('margin-top', $(document).innerHeight() / 8)
140
+
141
+ $(".structure-form-menu ul").sortable
142
+ handle: '.sortable-handle'
143
+
144
+ # Switch
145
+ if $('input[data-switch]').length > 0
146
+ $('input[data-switch]').spinaSwitch()
147
+
148
+ # Datepicker
149
+ if $('.datepicker').length > 0
150
+ $('.datepicker').datepicker()
151
+
152
+ $(document).on 'turbolinks:load', ready
@@ -0,0 +1,75 @@
1
+ $(document).on 'click', 'body.dropdown', ->
2
+ closeDropdown()
3
+
4
+ $(document).on 'click', '[data-trigger="dropdown"]', ->
5
+ trigger = $(this)
6
+ dropdown = $(trigger.attr('data-target'))
7
+ body = $('body')
8
+
9
+ if body.hasClass('dropdown')
10
+ trigger.removeClass('button-active')
11
+ body.removeClass('dropdown')
12
+ dropdown.removeClass('animated fadeInDown')
13
+ else
14
+ dropdown.removeClass('no-animation')
15
+ trigger.addClass('button-active')
16
+ body.addClass('dropdown')
17
+ dropdown.addClass('animated fadeInDown')
18
+
19
+ return false
20
+
21
+ $(document).on 'click', '[data-dropdown] ul, [data-dropdown] .sliding-dropdown', (e) ->
22
+ e.stopPropagation()
23
+
24
+ $(document).on 'click', '.slide-controls .previous, .slide-controls .next', (e) ->
25
+ e.preventDefault()
26
+
27
+ # Get sliding dropdown
28
+ sliding_dropdown = $(this).parents('.sliding-dropdown')
29
+
30
+ # Get active title
31
+ active_title = sliding_dropdown.find('.slide-title.active')
32
+
33
+ # Get previous and next titles
34
+ previous = active_title.prev('.slide-title')
35
+ next = active_title.next('.slide-title')
36
+
37
+ if $(this).hasClass('previous') and previous.length > 0
38
+ sliding_dropdown.find('.slide-title').removeClass('active')
39
+ previous.addClass('active')
40
+ target = previous.data('target')
41
+ sliding_dropdown.find('.slide').removeClass('active')
42
+ $(target).addClass('active')
43
+
44
+ else if $(this).hasClass('next') and next.length > 0
45
+ sliding_dropdown.find('.slide-title').removeClass('active')
46
+ next.addClass('active')
47
+ target = next.data('target')
48
+ sliding_dropdown.find('.slide').removeClass('active')
49
+ $(target).addClass('active')
50
+
51
+ if sliding_dropdown.find('.slide-title.active').next('.slide-title').length > 0
52
+ sliding_dropdown.find('.next').removeClass('muted')
53
+ else
54
+ sliding_dropdown.find('.next').addClass('muted')
55
+
56
+ if sliding_dropdown.find('.slide-title.active').prev('.slide-title').length > 0
57
+ sliding_dropdown.find('.previous').removeClass('muted')
58
+ else
59
+ sliding_dropdown.find('.previous').addClass('muted')
60
+
61
+ # Force redraw dropdown
62
+ sliding_dropdown.addClass('no-animation')
63
+ forceRedraw(sliding_dropdown[0])
64
+
65
+ closeDropdown = ->
66
+ $('body').removeClass('dropdown')
67
+ $('[data-dropdown] ul, [data-dropdown] .sliding-dropdown').removeClass('animated fadeInDown')
68
+ $('[data-trigger="dropdown"]').removeClass('button-active')
69
+ return false
70
+
71
+ forceRedraw = (element) ->
72
+ disp = element.style.display
73
+ element.style.display = 'none'
74
+ trick = element.offsetHeight
75
+ element.style.display = disp
@@ -0,0 +1,7 @@
1
+ $(document).on 'click', '.structure-form-menu ul li a', (e) ->
2
+ $structureForm = $(this).parents('.structure-form')
3
+ $(this).parent('li').siblings().removeClass('active')
4
+ $(this).parent('li').addClass('active')
5
+ $structureForm.find('.structure-form-pane').removeClass('active')
6
+ $($(this).attr('href')).addClass('active')
7
+ e.preventDefault()
@@ -0,0 +1,20 @@
1
+ $(document).on 'click', '.gallery .item:not(.item-uploader)', ->
2
+ gallery = $(this).parents('.gallery')
3
+
4
+ if gallery.data('multiselect') != undefined
5
+ $(this).toggleClass('selected')
6
+ checkbox = $(this).find('input:checkbox')
7
+ checkbox.prop("checked", !checkbox.prop("checked"))
8
+ $form = $(this).closest('form')
9
+ count = $form.find('.item.selected').size()
10
+ if count > 0
11
+ $form.find('.gallery-select-counter').text("(#{count})")
12
+ else
13
+ $form.find('.gallery-select-counter').text("")
14
+ else
15
+ checked = $(this).find('input').prop('checked')
16
+ gallery.find('.item').removeClass('selected')
17
+ gallery.find('.item input').prop('checked', false)
18
+ $(this).addClass('selected') unless checked
19
+ $(this).find('input').prop('checked', !checked)
20
+ $(this).closest('form').submit()
@@ -22,3 +22,4 @@ $.fn.infiniteScroll = () ->
22
22
  $(document).on 'turbolinks:load', ->
23
23
  $(window).off('scroll.infiniteScroll')
24
24
  $('#main, #overlay section').off('scroll.infiniteScroll')
25
+ $(document).find('.infinite-pagination').infiniteScroll()
@@ -0,0 +1,54 @@
1
+ # jQuery plugin
2
+ $.hideModal = ->
3
+ hideModal()
4
+
5
+ $.fn.modal = ->
6
+ showModal($(this))
7
+
8
+ $(document).on 'click', 'a[data-toggle="modal"]', ->
9
+ link = $(this)
10
+ modal = $(link.attr('href'))
11
+ showModal(modal)
12
+
13
+ $(document).on 'click', 'body.overlay', ->
14
+ hideModal()
15
+
16
+ $(document).on 'click', '[data-dismiss="modal"]', ->
17
+ hideModal()
18
+
19
+ $(document).on 'keyup', 'body.overlay', (e) ->
20
+ hideModal() if e.keyCode == 27
21
+
22
+ $(document).on 'click', '.modal', (e) ->
23
+ e.stopPropagation()
24
+
25
+ hideModal = ->
26
+ $('body').removeClass('overlay')
27
+ $('#overlay .modal').addClass('flyOut')
28
+ $('#overlay').fadeOut 300, ->
29
+ $(this).remove()
30
+ return false
31
+
32
+ showModal = (element) ->
33
+ modal = element.clone()
34
+ modal.addClass('animated flyIn')
35
+
36
+ if $('#overlay').length < 1
37
+ $('body').append('<div id="overlay"></div>')
38
+ else
39
+ $('#overlay').html('')
40
+
41
+ maxheight = window.innerHeight - (window.innerHeight / 8) - 150
42
+
43
+ modal.css({"margin-top": window.innerHeight / 8})
44
+ modal.find('section').css({"max-height": maxheight})
45
+
46
+ modal.appendTo('#overlay')
47
+ $('#overlay').fadeIn(400)
48
+ modal.show()
49
+
50
+ modal.find('input[type="file"][data-customfileinput]').customFileInput()
51
+ modal.find('.new_photo').uploadPhoto()
52
+
53
+ $('body').addClass('overlay')
54
+ return false
@@ -0,0 +1,38 @@
1
+ $(document).on 'click', 'nav#primary a.back-to-main-menu', (e) ->
2
+ $('nav#primary').addClass('animated')
3
+ $('nav#primary').removeClass('transformed')
4
+ e.preventDefault()
5
+
6
+ $(document).on 'click', 'nav#primary a:not(.back-to-main-menu)', (e) ->
7
+ $('nav#primary ul li ul li').removeClass('active')
8
+ $(this).parent().addClass('active')
9
+ clearTimeout(navigationTimer)
10
+
11
+ $(document).on 'click', 'nav#primary > ul > li > a', (e) ->
12
+ if $(this).parent().find('ul').length > 0
13
+ e.preventDefault()
14
+
15
+ $(this).parent().siblings().removeClass('active')
16
+ $(this).parent().addClass('active')
17
+
18
+ # Clicking something from the primary menu adds the animation
19
+ $(document).on 'click', 'nav#primary:not(.transformed) > ul > li > a', (e) ->
20
+ $('nav#primary').addClass('animated').addClass('transformed')
21
+
22
+ # Clicking directly on the primary menu when it's transformed removes the animation
23
+ $(document).on 'click', 'nav#primary.transformed > ul > li > a', (e) ->
24
+ $('nav#primary').removeClass('animated')
25
+ $('nav#primary ul li ul li').removeClass('active')
26
+ $(this).parent().find('ul li:first-child').addClass('active')
27
+
28
+ delay = 200
29
+ navigationTimer = null
30
+
31
+ $(document).on 'mouseenter', 'nav#primary.transformed > ul > li:not(.active) > a', (e) ->
32
+ navigationTimer = setTimeout(->
33
+ $('nav#primary').addClass('animated')
34
+ $('nav#primary').removeClass('transformed')
35
+ , delay)
36
+
37
+ $(document).on 'mouseleave', 'nav#primary.transformed > ul > li:not(.active) > a', (e) ->
38
+ clearTimeout(navigationTimer)
@@ -0,0 +1,7 @@
1
+ $(document).on 'click', '.notification [data-close-notification]', (e) ->
2
+ $notification = $(this).parents('.notification')
3
+ $notification.removeClass('fadeInRight').addClass('fadeOutRight')
4
+ setTimeout ->
5
+ $notification.remove()
6
+ , 400
7
+ e.preventDefault()
@@ -31,7 +31,7 @@ show_page_parts = (page_parts) ->
31
31
  $('.horizontal-form-group.page-part[data-name=' + page_part + ']').show()
32
32
 
33
33
  # Dynamically add and remove fields in a nested form
34
- $(document).on 'click', 'form .add_fields', (event) ->
34
+ $(document).on 'click', 'form .add_structure_item_fields', (event) ->
35
35
  time = new Date().getTime()
36
36
  regexp = new RegExp($(this).data('id'), 'g')
37
37
  $(this).before($(this).data('fields').replace(regexp, time))
@@ -58,9 +58,12 @@ $(document).on 'click', 'form .add_structure', (event) ->
58
58
 
59
59
  $link.find('a').click()
60
60
 
61
+ # Fire event
62
+ $structureForm.trigger('spina:structure_added')
63
+
61
64
  event.preventDefault()
62
65
 
63
- $(document).on 'click', 'form .remove-structure-item-fields', (event) ->
66
+ $(document).on 'click', 'form .remove_structure_item_fields', (event) ->
64
67
  $(this).prev('input[type=hidden]').val('1')
65
68
  $pane = $(this).closest('.structure-form-pane')
66
69
  $link = $("a[href='##{$pane.attr('id')}']").parents('li')
@@ -71,6 +74,12 @@ $(document).on 'click', 'form .remove-structure-item-fields', (event) ->
71
74
  $pane.hide()
72
75
  event.preventDefault()
73
76
 
77
+ $(document).on 'change', '.structure-form-pane .structure-form-part:first-child input', (event) ->
78
+ value = $(this).val()
79
+ $pane = $(this).parents('.structure-form-pane')
80
+ $link = $("a[href='##{$pane.attr('id')}']")
81
+ $link.html("<i class='icon icon-bars'></i> #{value}")
82
+
74
83
  # Sort pages
75
84
  $(document).on 'click', '.sort-switch', (event) ->
76
85
  $($(this).attr('href') + ' .dd-item-inner').toggleClass('dd-handle')
@@ -0,0 +1,43 @@
1
+ # jQuery plugin checkbox
2
+ $.fn.spinaSwitch = ->
3
+ return this.each ->
4
+ unless $(this).attr('data-plugin-switch')
5
+ input = $(this)
6
+ input.attr('data-plugin-switch', true)
7
+ input.hide()
8
+
9
+ # Check if it is checked
10
+ if input.is(':checked')
11
+ klass = "switch active"
12
+ else
13
+ klass = "switch"
14
+
15
+ # Insert new HTML into the DOM
16
+ input.after('<a href="#' + input.attr("id") + '" class="' + klass + '">
17
+ <span class="knob"></span>
18
+ </a>')
19
+
20
+ # Click handlers for checkbox
21
+ $(document).on 'click', 'a.switch', (e) ->
22
+ toggleSwitch(e)
23
+
24
+ $(document).on 'touchend', 'a.switch', (e) ->
25
+ toggleSwitch(e)
26
+
27
+ toggleSwitch = (e) ->
28
+ checkbox = $(e.currentTarget)
29
+ input = $(checkbox.attr("href"))
30
+
31
+ if checkbox.hasClass('activated') || checkbox.hasClass('active')
32
+ checkbox.removeClass('active')
33
+ checkbox.removeClass('activated')
34
+ checkbox.addClass('deactivated')
35
+ input.prop("checked", false)
36
+ else
37
+ checkbox.addClass('activated')
38
+ checkbox.removeClass('deactivated')
39
+ input.prop("checked", true)
40
+
41
+ input.trigger('change')
42
+
43
+ return false
@@ -0,0 +1,13 @@
1
+ $(document).on 'click', '.tabs li a[href^="#"]', ->
2
+ link = $(this)
3
+ tabs = link.parents('.tabs')
4
+
5
+ # Remove active
6
+ $('.tab-content').removeClass('active')
7
+ tabs.find('li').removeClass('active')
8
+
9
+ # Add active
10
+ link.parent('li').addClass('active')
11
+ $(link.attr('href')).addClass('active')
12
+
13
+ return false