spina 0.11.1 → 0.12.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 (131) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -12
  3. data/Rakefile +1 -0
  4. data/app/assets/fonts/spina/ics_spina.eot +0 -0
  5. data/app/assets/fonts/spina/ics_spina.svg +5 -3
  6. data/app/assets/fonts/spina/ics_spina.ttf +0 -0
  7. data/app/assets/fonts/spina/ics_spina.woff +0 -0
  8. data/app/assets/icons/spina/lock.svg +3 -0
  9. data/app/assets/icons/spina/preview/ics_spina-preview.html +16 -1
  10. data/app/assets/javascripts/spina/admin/application.coffee.erb +3 -25
  11. data/app/assets/javascripts/spina/admin/navigation.coffee +7 -0
  12. data/app/assets/javascripts/spina/admin/pages.coffee.erb +1 -13
  13. data/app/assets/javascripts/spina/admin/trix.coffee.erb +2 -1
  14. data/app/assets/stylesheets/spina/_admin_editing.sass +0 -4
  15. data/app/assets/stylesheets/spina/_buttons.sass +8 -8
  16. data/app/assets/stylesheets/spina/_configuration.sass +5 -1
  17. data/app/assets/stylesheets/spina/_custom_animations.sass +26 -26
  18. data/app/assets/stylesheets/spina/_fonts.sass +5 -1
  19. data/app/assets/stylesheets/spina/_forms.sass +66 -33
  20. data/app/assets/stylesheets/spina/_gallery.sass +32 -15
  21. data/app/assets/stylesheets/spina/_ics_spina.scss +1 -0
  22. data/app/assets/stylesheets/spina/_login.sass +10 -4
  23. data/app/assets/stylesheets/spina/_mixins.sass +5 -0
  24. data/app/assets/stylesheets/spina/_modal.sass +4 -4
  25. data/app/assets/stylesheets/spina/_notifications.sass +5 -5
  26. data/app/assets/stylesheets/spina/_sortable_lists.sass +9 -9
  27. data/app/assets/stylesheets/spina/_tables.sass +9 -9
  28. data/app/assets/stylesheets/spina/_wizard.sass +5 -5
  29. data/app/assets/stylesheets/spina/admin/application.sass +4 -1
  30. data/app/assets/stylesheets/spina/application.sass +0 -1
  31. data/app/assets/stylesheets/spina.sass +23 -27
  32. data/app/controllers/spina/admin/accounts_controller.rb +2 -7
  33. data/app/controllers/spina/admin/admin_controller.rb +8 -3
  34. data/app/controllers/spina/admin/attachments_controller.rb +0 -2
  35. data/app/controllers/spina/admin/navigations_controller.rb +3 -2
  36. data/app/controllers/spina/admin/pages_controller.rb +7 -8
  37. data/app/controllers/spina/admin/password_resets_controller.rb +49 -0
  38. data/app/controllers/spina/admin/photos_controller.rb +15 -34
  39. data/app/controllers/spina/admin/sessions_controller.rb +1 -1
  40. data/app/controllers/spina/admin/users_controller.rb +8 -9
  41. data/app/controllers/spina/application_controller.rb +3 -9
  42. data/app/controllers/spina/pages_controller.rb +3 -3
  43. data/app/helpers/spina/admin/pages_helper.rb +16 -23
  44. data/app/mailers/spina/user_mailer.rb +21 -0
  45. data/app/models/concerns/spina/optionable.rb +12 -0
  46. data/app/models/concerns/spina/part.rb +5 -1
  47. data/app/models/concerns/spina/partable.rb +20 -5
  48. data/app/models/concerns/spina/photo_collectable.rb +24 -0
  49. data/app/models/spina/account.rb +16 -6
  50. data/app/models/spina/layout_part.rb +1 -0
  51. data/app/models/spina/option.rb +17 -0
  52. data/app/models/spina/page.rb +36 -63
  53. data/app/models/spina/page_part.rb +1 -0
  54. data/app/models/spina/photo_collection.rb +1 -13
  55. data/app/models/spina/structure_item.rb +4 -8
  56. data/app/models/spina/structure_part.rb +2 -13
  57. data/app/models/spina/user.rb +1 -0
  58. data/app/presenters/spina/pages/menu_presenter.rb +18 -49
  59. data/app/views/layouts/spina/mail.html.erb +1 -0
  60. data/app/views/spina/admin/page_partables/{colors → options}/_form.html.haml +2 -3
  61. data/app/views/spina/admin/page_partables/photo_collections/_form.html.haml +7 -7
  62. data/app/views/spina/admin/page_partables/structures/_form.html.haml +7 -8
  63. data/app/views/spina/admin/pages/_form.html.haml +2 -2
  64. data/app/views/spina/admin/pages/_form_advanced.html.haml +2 -2
  65. data/app/views/spina/admin/password_resets/edit.html.haml +13 -0
  66. data/app/views/spina/admin/password_resets/new.html.haml +13 -0
  67. data/app/views/spina/admin/photos/_photo.html.haml +2 -1
  68. data/app/views/spina/admin/photos/{_wysihtml5_select.html.haml → _trix_select.html.haml} +2 -4
  69. data/app/views/spina/admin/photos/create.js.erb +3 -5
  70. data/app/views/spina/admin/photos/{wysihtml5_infinite_scroll.js.erb → trix_infinite_scroll.js.erb} +0 -2
  71. data/app/views/spina/admin/photos/{wysihtml5_insert.js.coffee → trix_insert.js.erb} +2 -2
  72. data/app/views/spina/admin/photos/trix_select.js.erb +3 -0
  73. data/app/views/spina/admin/sessions/new.html.haml +3 -1
  74. data/app/views/spina/admin/shared/_primary_navigation.html.haml +1 -1
  75. data/app/views/spina/admin/shared/_rich_text_field.html.haml +2 -1
  76. data/app/views/spina/admin/structure_items/_fields.html.haml +3 -3
  77. data/app/views/spina/admin/structure_partables/lines/_form.html.haml +5 -2
  78. data/app/views/spina/admin/structure_partables/options/_form.html.haml +7 -0
  79. data/app/views/spina/admin/structure_partables/photo_collections/_form.html.haml +12 -9
  80. data/app/views/spina/admin/structure_partables/photos/_form.html.haml +10 -7
  81. data/app/views/spina/admin/structure_partables/texts/_form.html.haml +5 -2
  82. data/app/views/spina/admin/users/_form.html.haml +1 -1
  83. data/app/views/spina/shared/_admin_bar.html.haml +1 -1
  84. data/app/views/spina/shared/_navigation.html.haml +1 -1
  85. data/app/views/spina/user_mailer/forgot_password.html.erb +1 -0
  86. data/app/views/spina/user_mailer/forgot_password.txt.erb +1 -0
  87. data/config/locales/en.yml +10 -0
  88. data/config/locales/nl.yml +2 -0
  89. data/config/routes.rb +5 -9
  90. data/db/migrate/1_create_spina_tables.rb +8 -7
  91. data/db/migrate/2_create_spina_translation_tables.rb +7 -26
  92. data/db/migrate/3_create_spina_navigations.rb +1 -1
  93. data/db/migrate/4_add_password_reset_token_to_spina_users.rb +6 -0
  94. data/db/migrate/5_remove_translated_columns.rb +11 -0
  95. data/db/migrate/6_create_spina_options.rb +8 -0
  96. data/lib/generators/spina/install_generator.rb +0 -22
  97. data/lib/generators/spina/templates/app/views/default/shared/_navigation.html.haml +1 -1
  98. data/lib/generators/spina/templates/app/views/demo/shared/_navigation.html.haml +1 -1
  99. data/lib/generators/spina/templates/config/initializers/themes/default.rb +9 -0
  100. data/lib/generators/spina/templates/config/initializers/themes/demo.rb +1 -9
  101. data/lib/spina/engine.rb +4 -3
  102. data/lib/spina/theme.rb +2 -1
  103. data/lib/spina/version.rb +1 -1
  104. data/lib/spina.rb +0 -23
  105. metadata +32 -69
  106. data/app/assets/images/spina/marker.png +0 -0
  107. data/app/assets/images/spina/mask.png +0 -0
  108. data/app/assets/images/spina/wheel.png +0 -0
  109. data/app/assets/stylesheets/spina/_cards.sass +0 -54
  110. data/app/assets/stylesheets/spina/_farbtastic.sass +0 -37
  111. data/app/assets/stylesheets/spina/_wysihtml5.sass +0 -79
  112. data/app/assets/stylesheets/spina/wysihtml5_textarea.sass +0 -14
  113. data/app/controllers/spina/admin/page_parts_controller.rb +0 -11
  114. data/app/helpers/spina/application_helper.rb +0 -30
  115. data/app/models/spina/ability.rb +0 -20
  116. data/app/models/spina/color.rb +0 -7
  117. data/app/presenters/spina/pages/breadcrumb.rb +0 -102
  118. data/app/views/layouts/spina/email.html.erb +0 -124
  119. data/app/views/spina/admin/layout_partables/colors/_form.html.haml +0 -4
  120. data/app/views/spina/admin/page_parts/_wysihtml5_link.html.haml +0 -12
  121. data/app/views/spina/admin/page_parts/insert_wysihtml5_link.js +0 -5
  122. data/app/views/spina/admin/page_parts/wysihtml5_link.js +0 -2
  123. data/app/views/spina/admin/photos/create_and_select.js.erb +0 -7
  124. data/app/views/spina/admin/photos/create_multiple.js.erb +0 -4
  125. data/app/views/spina/admin/photos/wysihtml5_select.js.erb +0 -3
  126. data/vendor/assets/javascripts/spina/jquery.farbtastic.js +0 -345
  127. data/vendor/assets/javascripts/spina/morris.js +0 -1767
  128. data/vendor/assets/javascripts/spina/raphael.js +0 -8111
  129. data/vendor/assets/javascripts/spina/wysihtml5.js +0 -269
  130. data/vendor/assets/javascripts/spina/wysihtml5_parser_rules.js +0 -551
  131. data/vendor/assets/stylesheets/spina/_morris.scss +0 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 046211e519bf447988ae325988cbc82be0be058f
4
- data.tar.gz: 540be8a7eed78c94b681008de0bbacc36b6ee827
3
+ metadata.gz: 7a434cf817128736d599401f7c0fb4f3db07254a
4
+ data.tar.gz: 1288622640295c335ad5a1d1f51465bf025dc23b
5
5
  SHA512:
6
- metadata.gz: 32e00372ee066b491faa67c99104caf0c2092a54fa8e88c2db777ef9e4805e104f390d25581e388db01cbe856e591802651941dc6b0eee66f789d0c0283ac14d
7
- data.tar.gz: 67fbfb563f796ea36f57c7507c16f7e4dba7d5c9c354645a670ea1a8afb72efc3d894d3423b972e004dd51f9513e712e4232fc6e0bf1ca33076ae5b27438a0ed
6
+ metadata.gz: c9d358241a468cf561e5cc4563e70bf27ee017b9b9610229d4b25e0801519d8c867f0de30dede42b83466a48728792b863cc5daf296b42582ff981918f53587f
7
+ data.tar.gz: 3ccf95f39de319bb1d7d072a0b3ef219f1a8a7ac0d6523299564c065e2af7686c8457f786dc585815c27779c9817ca3dfbaf131f46736c161003cb25385147c7
data/README.md CHANGED
@@ -2,14 +2,14 @@
2
2
 
3
3
  [Visit the website](http://www.spinacms.com)
4
4
 
5
- [![Codeship Status for denkGroot/Spina](https://img.shields.io/codeship/e13debf0-e6af-0132-8abf-32d84f3372de.svg)](https://codeship.com/projects/82322)
5
+ [![CircleCI](https://img.shields.io/circleci/project/github/denkGroot/Spina.svg)](https://circleci.com/gh/denkGroot/Spina)
6
6
  [![Code Climate](https://codeclimate.com/github/denkGroot/Spina/badges/gpa.svg)](https://codeclimate.com/github/denkGroot/Spina)
7
7
  [![Test Coverage](https://codeclimate.com/github/denkGroot/Spina/badges/coverage.svg)](https://codeclimate.com/github/denkGroot/Spina/coverage)
8
8
  [![Slack](https://slack-spinacms.herokuapp.com/badge.svg)](https://slack-spinacms.herokuapp.com)
9
9
 
10
10
  # Getting Started
11
11
 
12
- Spina is a CMS built upon the Rails framework. This guide is designed for developers with experience using Ruby on Rails.
12
+ Spina is a CMS for Rails 5.1. This guide is designed for developers with experience using Ruby on Rails.
13
13
 
14
14
  To start using Spina CMS add the following line to your Gemfile:
15
15
 
@@ -23,7 +23,14 @@ Make sure you run the installer to get started.
23
23
 
24
24
  The installer will help you setup your first user.
25
25
 
26
- Then start `rails s` and access your admin panel at `/admin`.
26
+ Then start `rails s` and access Spina at `/admin`.
27
+
28
+ ## Upgrading from 0.11 to 0.12
29
+
30
+ Just run the new migrations.
31
+
32
+ rails spina:install:migrations
33
+ rails db:migrate
27
34
 
28
35
  ## Upgrading from 0.10 to 0.11
29
36
 
@@ -67,7 +74,7 @@ Spina.configure do |config| # NEW
67
74
 
68
75
  The installer generates a few initializers that contain necessary configuration for Spina.
69
76
 
70
- In the initializers folder there's a new folder named `themes`. Inside you will find a configuration file named `default.rb`. This file contains all of your theme-specific settings. You can define multiple Page parts, Layout parts, View templates and Custom pages.
77
+ In the initializers folder there's a new folder named `themes`. Inside you will find a configuration file named `default.rb`. This file contains all of your theme-specific settings. You can define multiple Page parts, View templates and Custom pages.
71
78
 
72
79
  ## Page parts
73
80
 
@@ -77,8 +84,8 @@ A page in Spina has many Page parts. By default these page parts can be one of t
77
84
  - `Spina::Text`
78
85
  - `Spina::Photo`
79
86
  - `Spina::PhotoCollection`
80
- - `Spina::Color`
81
87
  - `Spina::Structure`
88
+ - `Spina::Option`
82
89
 
83
90
  These are the building blocks of your view templates. You can have an unlimited number of page parts in a page. We prefer to keep the number of parts to a minimum so that managing your pages won't become too complex.
84
91
 
@@ -174,19 +181,41 @@ Finally, let's go to `views/default/pages/show.html.erb` and add the following:
174
181
 
175
182
  We have successfully added another textbox! Restart your server and load up the admin section again. You should see another text box below the content box.
176
183
 
177
- ## Layout parts
178
-
179
- Sometimes you need editable content that's not specific to a view template but to your theme as a whole. You can use the following parts in your layout.
180
-
181
- - `Spina::Line`
182
- - `Spina::Color`
183
-
184
184
  ## View templates
185
185
 
186
186
  Each theme typically has a few different view templates which make up your website. By default Spina generates a *homepage* and *show* template.
187
187
 
188
188
  The views for these templates are stored in `app/views/default/pages`.
189
189
 
190
+ ## Navigations
191
+
192
+ Usually managing a single list of pages is enough for most use cases. Sometimes however, you need a little more flexibility. This is where navigations come in. You can create multiple navigations which are basically different collections of your pages. You can choose to include all or just a few of your pages. You can also edit the order of pages per navigation.
193
+
194
+ You define navigations in your theme's config file:
195
+
196
+ ```ruby
197
+ ::Spina::Theme.register do |theme|
198
+ # ...
199
+
200
+ theme.navigations = [{
201
+ name: 'main',
202
+ label: 'Main navigation',
203
+ auto_add_pages: true
204
+ }, {
205
+ name: 'mobile',
206
+ label: 'Mobile'
207
+ }]
208
+
209
+ # ...
210
+ end
211
+ ```
212
+
213
+ `auto_add_pages` ensures that each page that you create automatically gets added to this navigation.
214
+
215
+ Besides navigations there's always a single overview of all pages. Your sitemap and friendly URLs are generated based on this overview.
216
+
217
+ Creating navigations is optional.
218
+
190
219
  ## Custom pages
191
220
 
192
221
  You can define custom pages for your theme that will be generated when bootstrapping your website. You can define whether or not they're deletable. By default Spina creates a custom page named Homepage which is not deletable.
data/Rakefile CHANGED
@@ -34,6 +34,7 @@ Rake::TestTask.new(:test) do |t|
34
34
  t.libs << 'test'
35
35
  t.pattern = 'test/**/*_test.rb'
36
36
  t.verbose = false
37
+ t.warning = false
37
38
  end
38
39
 
39
40
 
Binary file
@@ -1,11 +1,11 @@
1
1
  <?xml version="1.0" standalone="no"?>
2
2
  <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
3
3
  <!--
4
- 2017-2-7: Created with FontForge (http://fontforge.org)
4
+ 2017-5-23: Created with FontForge (http://fontforge.org)
5
5
  -->
6
6
  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">
7
7
  <metadata>
8
- Created by FontForge 20161116 at Tue Feb 7 16:25:08 2017
8
+ Created by FontForge 20170104 at Tue May 23 10:47:30 2017
9
9
  By Bram Jetten
10
10
  Copyright (c) 2017, Bram Jetten
11
11
  </metadata>
@@ -22,7 +22,7 @@ Copyright (c) 2017, Bram Jetten
22
22
  bbox="-18.2861 -64.0879 530.286 448"
23
23
  underline-thickness="25.6"
24
24
  underline-position="-51.2"
25
- unicode-range="U+0020-F137"
25
+ unicode-range="U+0020-F138"
26
26
  />
27
27
  <missing-glyph />
28
28
  <glyph glyph-name="space" unicode=" " horiz-adv-x="200"
@@ -157,6 +157,8 @@ c-1.14323 -4.47591 -2.00033 -8.28548 -2.57129 -11.4287c-0.571615 -3.14258 -1.286
157
157
  c-11.5241 -51.7142 -18.9053 -85.5713 -22.1436 -101.571c-0.380859 -1.71484 -1.61882 -7.23893 -3.71387 -16.5723s-4 -17.9046 -5.71484 -25.7139c-1.71419 -7.80924 -3.23796 -15.7617 -4.57129 -23.8574c-1.33333 -8.09505 -1.90462 -13.5713 -1.71387 -16.4287
158
158
  l0.285156 -5.14258c3.23828 -0.761719 20.8574 -3.71419 52.8574 -8.85742c-0.571615 -8.38086 -2.09538 -17.8092 -4.57129 -28.2852c-2.09505 0 -5.19043 -0.142904 -9.28613 -0.428711c-4.09505 -0.285807 -7.1901 -0.428711 -9.28516 -0.428711
159
159
  c-5.52409 0 -13.8099 0.952474 -24.8574 2.85742s-19.238 2.85742 -24.5713 2.85742c-26.2858 0.380859 -45.9049 0.571289 -58.8574 0.571289c-9.71419 0 -23.333 -0.857096 -40.8564 -2.57129c-17.5241 -1.71484 -29.0482 -2.7627 -34.5723 -3.14355z" />
160
+ <glyph glyph-name="uniF138" unicode="&#xf138;"
161
+ d="M352 192v64c0 52.9922 -43.0078 96 -96 96s-96 -43.0078 -96 -96v-64h192zM64 192h32v64c0 88.3203 71.6797 160 160 160s160 -71.6797 160 -160v-64h32v-224h-384v224z" />
160
162
  <glyph glyph-name="uniF123" unicode="&#xf123;"
161
163
  d="M448 352c35.29 0 64 -28.71 64 -64v-192c0 -35.29 -28.71 -64 -64 -64h-384c-35.29 0 -64 28.71 -64 64v192c0 35.29 28.71 64 64 64h384zM256 160.002c2.63574 0 5.27441 0.652344 7.66211 1.9541l175.996 95.998c7.75781 4.22949 10.6162 13.9502 6.38379 21.708
162
164
  c-4.23047 7.75586 -13.9521 10.6162 -21.708 6.38379l-168.334 -91.8203l-168.336 91.8184c-7.75781 4.23242 -17.4756 1.37207 -21.708 -6.38379c-4.23047 -7.75781 -1.37402 -17.4766 6.38379 -21.708l175.996 -95.998c2.38965 -1.2998 5.02832 -1.95215 7.66406 -1.95215
Binary file
Binary file
@@ -0,0 +1,3 @@
1
+ <svg id="lock" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="currentcolor">
2
+ <path d="M22 16 L22 12 A6 6 0 0 0 10 12 L10 16 z M4 16 L6 16 L6 12 A10 10 0 0 1 26 12 L26 16 L28 16 L28 30 L4 30 z"></path>
3
+ </svg>
@@ -195,6 +195,7 @@
195
195
  .icon-large-check:before,
196
196
  .icon-link:before,
197
197
  .icon-list-ul:before,
198
+ .icon-lock:before,
198
199
  .icon-mail:before,
199
200
  .icon-mail-outline:before,
200
201
  .icon-media-library:before,
@@ -265,6 +266,7 @@
265
266
  .icon-large-check:before { content: "\f120"; }
266
267
  .icon-link:before { content: "\f121"; }
267
268
  .icon-list-ul:before { content: "\f122"; }
269
+ .icon-lock:before { content: "\f138"; }
268
270
  .icon-mail:before { content: "\f123"; }
269
271
  .icon-mail-outline:before { content: "\f124"; }
270
272
  .icon-media-library:before { content: "\f125"; }
@@ -301,7 +303,7 @@
301
303
  <body class="characters-off">
302
304
  <div id="page" class="container">
303
305
  <header>
304
- <h1>ics_spina contains 56 glyphs:</h1>
306
+ <h1>ics_spina contains 57 glyphs:</h1>
305
307
  <a onclick="toggleCharacters(); return false;" href="#">Toggle Preview Characters</a>
306
308
  </header>
307
309
 
@@ -761,6 +763,19 @@
761
763
  </div>
762
764
  </div>
763
765
 
766
+ <div class="glyph">
767
+ <div class="preview-glyphs">
768
+ <span class="step size-12"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="icon-lock" class="icon-lock"></i></span>
769
+ </div>
770
+ <div class="preview-scale">
771
+ <span class="step">12</span><span class="step">14</span><span class="step">16</span><span class="step">18</span><span class="step">21</span><span class="step">24</span><span class="step">36</span><span class="step">48</span><span class="step">60</span><span class="step">72</span>
772
+ </div>
773
+ <div class="usage">
774
+ <input class="class" type="text" readonly="readonly" onClick="this.select();" value=".icon-lock" />
775
+ <input class="point" type="text" readonly="readonly" onClick="this.select();" value="&amp;#xf138;" />
776
+ </div>
777
+ </div>
778
+
764
779
  <div class="glyph">
765
780
  <div class="preview-glyphs">
766
781
  <span class="step size-12"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span><span class="step size-14"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span><span class="step size-16"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span><span class="step size-18"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span><span class="step size-21"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span><span class="step size-24"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span><span class="step size-36"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span><span class="step size-48"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span><span class="step size-60"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span><span class="step size-72"><span class="letters">Pp</span><i id="icon-mail" class="icon-mail"></i></span>
@@ -12,16 +12,11 @@
12
12
  #= require spina/jquery.ui
13
13
  #= require spina/jquery.nestable
14
14
  #= require spina/jquery.customfileinput
15
- #= require spina/jquery.farbtastic
16
15
  #= require jquery-fileupload/basic
17
16
 
18
17
  # Misc plugins
19
18
 
20
19
  #= require spina/sortable
21
- #= require spina/raphael
22
- #= require spina/morris
23
- #= require spina/wysihtml5_parser_rules
24
- #= require spina/wysihtml5
25
20
  #= require spina/trix
26
21
 
27
22
  # Own code
@@ -113,25 +108,6 @@ ready = ->
113
108
  # Image upload
114
109
  $('.new_photo').uploadPhoto()
115
110
 
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
111
  # Document upload
136
112
  $('.new_document').uploadDocument()
137
113
 
@@ -147,6 +123,8 @@ ready = ->
147
123
 
148
124
  # Datepicker
149
125
  if $('.datepicker').length > 0
150
- $('.datepicker').datepicker()
126
+ $('.datepicker').datepicker
127
+ dateFormat: "dd-mm-yy"
128
+ firstDay: 1
151
129
 
152
130
  $(document).on 'turbolinks:load', ready
@@ -1,3 +1,10 @@
1
+ ready = ->
2
+ if $('nav#primary ul li ul li.active').length > 0
3
+ $('nav#primary > ul > li').removeClass('active')
4
+ $('nav#primary ul li ul li.active').parents('li').addClass('active')
5
+
6
+ $(document).on 'turbolinks:load', ready
7
+
1
8
  $(document).on 'click', 'nav#primary a.back-to-main-menu', (e) ->
2
9
  $('nav#primary').addClass('animated')
3
10
  $('nav#primary').removeClass('transformed')
@@ -30,20 +30,8 @@ show_page_parts = (page_parts) ->
30
30
  for page_part in page_parts
31
31
  $('.horizontal-form-group.page-part[data-name=' + page_part + ']').show()
32
32
 
33
- # Dynamically add and remove fields in a nested form
34
- $(document).on 'click', 'form .add_structure_item_fields', (event) ->
35
- time = new Date().getTime()
36
- regexp = new RegExp($(this).data('id'), 'g')
37
- $(this).before($(this).data('fields').replace(regexp, time))
38
- event.preventDefault()
39
-
40
- $(document).on 'click', 'form .remove_fields', (event) ->
41
- $(this).prev('input[type=hidden]').val('1')
42
- $(this).closest('fieldset').slideUp()
43
- event.preventDefault()
44
-
45
33
  # Dynamically add and remove structures
46
- $(document).on 'click', 'form .add_structure', (event) ->
34
+ $(document).on 'click', 'form .add_structure_item_fields', (event) ->
47
35
  $structureForm = $(this).parents('.structure-form')
48
36
 
49
37
  time = new Date().getTime()
@@ -30,8 +30,9 @@ Trix.config.blockAttributes = $.extend Trix.config.blockAttributes, {
30
30
 
31
31
  class Spina.TrixAttachment
32
32
  @photoSelect: (e) ->
33
+ console.log 'hi'
33
34
  editor_id = $(this).closest('trix-toolbar').data('trix-editor-id')
34
- $.get("<%= Spina::Engine.routes.url_helpers.wysihtml5_select_admin_photos_path('') %>/#{editor_id}")
35
+ $.get("<%= Spina::Engine.routes.url_helpers.trix_select_admin_photos_path('') %>/#{editor_id}")
35
36
 
36
37
  @photoInsert: (e, url) ->
37
38
  length = this.editor.getDocument().toString().length
@@ -4,10 +4,6 @@
4
4
  // Normalizing
5
5
  @import spina/normalize
6
6
 
7
- // Mixins
8
- @import bourbon
9
- @import neat
10
-
11
7
  // Fonts
12
8
  @import fonts
13
9
 
@@ -15,7 +15,7 @@ button, input[type="submit"], input[type="button"]
15
15
  outline: none
16
16
  padding: 8px 16px
17
17
  text-decoration: none
18
- @include transition(all .3s ease)
18
+ transition: all .3s ease
19
19
 
20
20
  &:hover
21
21
  background: shade(#efefef, 5%)
@@ -26,7 +26,7 @@ button, input[type="submit"], input[type="button"]
26
26
 
27
27
  &:active, &.button-active, &.button-shaded, &.button-shaded:active
28
28
  background: shade(#efefef, 10%)
29
- @include transform(scale(0.95))
29
+ transform: scale(0.95)
30
30
 
31
31
  &:focus
32
32
  outline: none
@@ -123,14 +123,14 @@ button, input[type="submit"], input[type="button"]
123
123
  background: #999 !important
124
124
 
125
125
  &.button-saving:before
126
+ animation: rotate 3.0s linear infinite
126
127
  display: inline-block
127
- @include animation(rotate 3.0s linear infinite)
128
128
 
129
- @include keyframes(rotate)
129
+ @keyframes rotate
130
130
  from
131
- @include transform(rotate(0deg))
131
+ transform: rotate(0deg)
132
132
  to
133
- @include transform(rotate(360deg))
133
+ transform: rotate(360deg)
134
134
 
135
135
  .pull-right .button
136
136
  margin: 0 0 4px 4px
@@ -213,11 +213,11 @@ button, input[type="submit"], input[type="button"]
213
213
  z-index: 999
214
214
 
215
215
  &.animated
216
+ animation-duration: .3s
216
217
  display: block
217
- @include animation-duration(.3s)
218
218
 
219
219
  &.no-animation
220
- @include animation(none)
220
+ animation: none
221
221
 
222
222
  ul:before, .sliding-dropdown:before
223
223
  content: ""
@@ -4,6 +4,7 @@ $danger-color: #da3939
4
4
  $info-color: #17577c
5
5
  $error-color: #6a1515
6
6
  $alert-color: orange
7
+ $warning-color: orange
7
8
 
8
9
  $asset-pipeline: true
9
10
  $font-family: "Proxima Nova", "Helvetica Neue", "Helvetica", sans-serif
@@ -12,4 +13,7 @@ $gutter: 5em
12
13
 
13
14
  $desktop: min-width 768px 8
14
15
  $tablet: max-width 768px 8
15
- $mobile: max-width 480px 4
16
+ $mobile: max-width 480px 4
17
+
18
+ $all-text-inputs: 'input[type="color"]', 'input[type="date"]', 'input[type="datetime"]', 'input[type="datetime-local"]', 'input[type="email"]', 'input[type="month"]', 'input[type="number"]', 'input[type="password"]', 'input[type="search"]', 'input[type="tel"]', 'input[type="text"]', 'input[type="time"]', 'input[type="url"]', 'input[type="week"]', 'input:not([type])', 'textarea'
19
+ $all-text-inputs-focus: 'input[type="color"]:focus', 'input[type="date"]:focus', 'input[type="datetime"]:focus', 'input[type="datetime-local"]:focus', 'input[type="email"]:focus', 'input[type="month"]:focus', 'input[type="number"]:focus', 'input[type="password"]:focus', 'input[type="search"]:focus', 'input[type="tel"]:focus', 'input[type="text"]:focus', 'input[type="time"]:focus', 'input[type="url"]:focus', 'input[type="week"]:focus', 'input:not([type]):focus', 'textarea:focus'
@@ -1,61 +1,61 @@
1
- @include keyframes("flyIn")
1
+ @keyframes flyIn
2
2
  0%
3
3
  opacity: 0
4
- @include transform(scale(.9))
4
+ transform: scale(.9)
5
5
  100%
6
6
  opacity: 1
7
- @include transform(scale(1))
7
+ transform: scale(1)
8
8
 
9
9
  .animated.flyIn
10
- @include animation("flyIn" .4s ease)
10
+ animation: flyIn .4s ease
11
11
 
12
- @include keyframes("flyOut")
12
+ @keyframes flyOut
13
13
  0%
14
14
  opacity: 1
15
- @include transform(scale(1))
15
+ transform: scale(1)
16
16
  100%
17
17
  opacity: 0
18
- @include transform(scale(.9))
18
+ transform: scale(.9)
19
19
 
20
20
  .animated.flyOut
21
- @include animation("flyOut" .4s ease)
21
+ animation: flyOut .4s ease
22
22
 
23
- @include keyframes("small-shake")
23
+ @keyframes small-shake
24
24
  0%, 100%
25
- @include transform(translateX(0))
25
+ transform: translateX(0)
26
26
  20%, 60%
27
- @include transform(translateX(7px))
27
+ transform: translateX(7px)
28
28
  40%, 80%
29
- @include transform(translateX(-7px))
29
+ transform: translateX(-7px)
30
30
 
31
31
  .animated.small-shake
32
- @include animation("small-shake" .6s ease-in)
32
+ animation: small-shake .6s ease-in
33
33
 
34
- @include keyframes("switchon")
34
+ @keyframes switchon
35
35
  0%
36
- @include transform(translate3d(0, 0, 0))
36
+ transform: translate3d(0, 0, 0)
37
37
  50%
38
38
  width: 32px
39
- @include transform(translate3d(0, 0, 0))
39
+ transform: translate3d(0, 0, 0)
40
40
  100%
41
41
  width: 23px
42
- @include transform(translate3d(17px, 0, 0))
42
+ transform: translate3d(17px, 0, 0)
43
43
 
44
- @include keyframes("switchoff")
44
+ @keyframes switchoff
45
45
  0%
46
- @include transform(translate3d(17px, 0, 0))
46
+ transform: translate3d(17px, 0, 0)
47
47
  100%
48
- @include transform(translate3d(0, 0, 0))
48
+ transform: translate3d(0, 0, 0)
49
49
 
50
50
  .deactivated .knob
51
- @include animation("switchoff" .2s ease)
51
+ animation: switchoff .2s ease
52
52
 
53
53
  .activated .knob
54
- @include animation("switchon" .4s)
55
- @include animation-fill-mode(forwards)
54
+ animation: switchon .4s
55
+ animation-fill-mode: forwards
56
56
 
57
- @include keyframes("rotate")
57
+ @keyframes rotate
58
58
  0%
59
- @include transform(rotate(0deg))
59
+ transform: rotate(0deg)
60
60
  100%
61
- @include transform(rotate(360deg))
61
+ transform: rotate(360deg)
@@ -1,6 +1,10 @@
1
1
  // Icons
2
2
 
3
- @include font-face("ics_spina", "spina/ics_spina", $asset-pipeline: true, $file-formats: eot woff ttf svg)
3
+ @font-face
4
+ font-family: "ics_spina"
5
+ font-style: normal
6
+ font-weight: normal
7
+ src: url(asset-path('spina/ics_spina.woff')) format('woff')
4
8
 
5
9
  .icon
6
10
  display: inline-block