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.
- checksums.yaml +4 -4
- data/README.md +41 -12
- data/Rakefile +1 -0
- data/app/assets/fonts/spina/ics_spina.eot +0 -0
- data/app/assets/fonts/spina/ics_spina.svg +5 -3
- data/app/assets/fonts/spina/ics_spina.ttf +0 -0
- data/app/assets/fonts/spina/ics_spina.woff +0 -0
- data/app/assets/icons/spina/lock.svg +3 -0
- data/app/assets/icons/spina/preview/ics_spina-preview.html +16 -1
- data/app/assets/javascripts/spina/admin/application.coffee.erb +3 -25
- data/app/assets/javascripts/spina/admin/navigation.coffee +7 -0
- data/app/assets/javascripts/spina/admin/pages.coffee.erb +1 -13
- data/app/assets/javascripts/spina/admin/trix.coffee.erb +2 -1
- data/app/assets/stylesheets/spina/_admin_editing.sass +0 -4
- data/app/assets/stylesheets/spina/_buttons.sass +8 -8
- data/app/assets/stylesheets/spina/_configuration.sass +5 -1
- data/app/assets/stylesheets/spina/_custom_animations.sass +26 -26
- data/app/assets/stylesheets/spina/_fonts.sass +5 -1
- data/app/assets/stylesheets/spina/_forms.sass +66 -33
- data/app/assets/stylesheets/spina/_gallery.sass +32 -15
- data/app/assets/stylesheets/spina/_ics_spina.scss +1 -0
- data/app/assets/stylesheets/spina/_login.sass +10 -4
- data/app/assets/stylesheets/spina/_mixins.sass +5 -0
- data/app/assets/stylesheets/spina/_modal.sass +4 -4
- data/app/assets/stylesheets/spina/_notifications.sass +5 -5
- data/app/assets/stylesheets/spina/_sortable_lists.sass +9 -9
- data/app/assets/stylesheets/spina/_tables.sass +9 -9
- data/app/assets/stylesheets/spina/_wizard.sass +5 -5
- data/app/assets/stylesheets/spina/admin/application.sass +4 -1
- data/app/assets/stylesheets/spina/application.sass +0 -1
- data/app/assets/stylesheets/spina.sass +23 -27
- data/app/controllers/spina/admin/accounts_controller.rb +2 -7
- data/app/controllers/spina/admin/admin_controller.rb +8 -3
- data/app/controllers/spina/admin/attachments_controller.rb +0 -2
- data/app/controllers/spina/admin/navigations_controller.rb +3 -2
- data/app/controllers/spina/admin/pages_controller.rb +7 -8
- data/app/controllers/spina/admin/password_resets_controller.rb +49 -0
- data/app/controllers/spina/admin/photos_controller.rb +15 -34
- data/app/controllers/spina/admin/sessions_controller.rb +1 -1
- data/app/controllers/spina/admin/users_controller.rb +8 -9
- data/app/controllers/spina/application_controller.rb +3 -9
- data/app/controllers/spina/pages_controller.rb +3 -3
- data/app/helpers/spina/admin/pages_helper.rb +16 -23
- data/app/mailers/spina/user_mailer.rb +21 -0
- data/app/models/concerns/spina/optionable.rb +12 -0
- data/app/models/concerns/spina/part.rb +5 -1
- data/app/models/concerns/spina/partable.rb +20 -5
- data/app/models/concerns/spina/photo_collectable.rb +24 -0
- data/app/models/spina/account.rb +16 -6
- data/app/models/spina/layout_part.rb +1 -0
- data/app/models/spina/option.rb +17 -0
- data/app/models/spina/page.rb +36 -63
- data/app/models/spina/page_part.rb +1 -0
- data/app/models/spina/photo_collection.rb +1 -13
- data/app/models/spina/structure_item.rb +4 -8
- data/app/models/spina/structure_part.rb +2 -13
- data/app/models/spina/user.rb +1 -0
- data/app/presenters/spina/pages/menu_presenter.rb +18 -49
- data/app/views/layouts/spina/mail.html.erb +1 -0
- data/app/views/spina/admin/page_partables/{colors → options}/_form.html.haml +2 -3
- data/app/views/spina/admin/page_partables/photo_collections/_form.html.haml +7 -7
- data/app/views/spina/admin/page_partables/structures/_form.html.haml +7 -8
- data/app/views/spina/admin/pages/_form.html.haml +2 -2
- data/app/views/spina/admin/pages/_form_advanced.html.haml +2 -2
- data/app/views/spina/admin/password_resets/edit.html.haml +13 -0
- data/app/views/spina/admin/password_resets/new.html.haml +13 -0
- data/app/views/spina/admin/photos/_photo.html.haml +2 -1
- data/app/views/spina/admin/photos/{_wysihtml5_select.html.haml → _trix_select.html.haml} +2 -4
- data/app/views/spina/admin/photos/create.js.erb +3 -5
- data/app/views/spina/admin/photos/{wysihtml5_infinite_scroll.js.erb → trix_infinite_scroll.js.erb} +0 -2
- data/app/views/spina/admin/photos/{wysihtml5_insert.js.coffee → trix_insert.js.erb} +2 -2
- data/app/views/spina/admin/photos/trix_select.js.erb +3 -0
- data/app/views/spina/admin/sessions/new.html.haml +3 -1
- data/app/views/spina/admin/shared/_primary_navigation.html.haml +1 -1
- data/app/views/spina/admin/shared/_rich_text_field.html.haml +2 -1
- data/app/views/spina/admin/structure_items/_fields.html.haml +3 -3
- data/app/views/spina/admin/structure_partables/lines/_form.html.haml +5 -2
- data/app/views/spina/admin/structure_partables/options/_form.html.haml +7 -0
- data/app/views/spina/admin/structure_partables/photo_collections/_form.html.haml +12 -9
- data/app/views/spina/admin/structure_partables/photos/_form.html.haml +10 -7
- data/app/views/spina/admin/structure_partables/texts/_form.html.haml +5 -2
- data/app/views/spina/admin/users/_form.html.haml +1 -1
- data/app/views/spina/shared/_admin_bar.html.haml +1 -1
- data/app/views/spina/shared/_navigation.html.haml +1 -1
- data/app/views/spina/user_mailer/forgot_password.html.erb +1 -0
- data/app/views/spina/user_mailer/forgot_password.txt.erb +1 -0
- data/config/locales/en.yml +10 -0
- data/config/locales/nl.yml +2 -0
- data/config/routes.rb +5 -9
- data/db/migrate/1_create_spina_tables.rb +8 -7
- data/db/migrate/2_create_spina_translation_tables.rb +7 -26
- data/db/migrate/3_create_spina_navigations.rb +1 -1
- data/db/migrate/4_add_password_reset_token_to_spina_users.rb +6 -0
- data/db/migrate/5_remove_translated_columns.rb +11 -0
- data/db/migrate/6_create_spina_options.rb +8 -0
- data/lib/generators/spina/install_generator.rb +0 -22
- data/lib/generators/spina/templates/app/views/default/shared/_navigation.html.haml +1 -1
- data/lib/generators/spina/templates/app/views/demo/shared/_navigation.html.haml +1 -1
- data/lib/generators/spina/templates/config/initializers/themes/default.rb +9 -0
- data/lib/generators/spina/templates/config/initializers/themes/demo.rb +1 -9
- data/lib/spina/engine.rb +4 -3
- data/lib/spina/theme.rb +2 -1
- data/lib/spina/version.rb +1 -1
- data/lib/spina.rb +0 -23
- metadata +32 -69
- data/app/assets/images/spina/marker.png +0 -0
- data/app/assets/images/spina/mask.png +0 -0
- data/app/assets/images/spina/wheel.png +0 -0
- data/app/assets/stylesheets/spina/_cards.sass +0 -54
- data/app/assets/stylesheets/spina/_farbtastic.sass +0 -37
- data/app/assets/stylesheets/spina/_wysihtml5.sass +0 -79
- data/app/assets/stylesheets/spina/wysihtml5_textarea.sass +0 -14
- data/app/controllers/spina/admin/page_parts_controller.rb +0 -11
- data/app/helpers/spina/application_helper.rb +0 -30
- data/app/models/spina/ability.rb +0 -20
- data/app/models/spina/color.rb +0 -7
- data/app/presenters/spina/pages/breadcrumb.rb +0 -102
- data/app/views/layouts/spina/email.html.erb +0 -124
- data/app/views/spina/admin/layout_partables/colors/_form.html.haml +0 -4
- data/app/views/spina/admin/page_parts/_wysihtml5_link.html.haml +0 -12
- data/app/views/spina/admin/page_parts/insert_wysihtml5_link.js +0 -5
- data/app/views/spina/admin/page_parts/wysihtml5_link.js +0 -2
- data/app/views/spina/admin/photos/create_and_select.js.erb +0 -7
- data/app/views/spina/admin/photos/create_multiple.js.erb +0 -4
- data/app/views/spina/admin/photos/wysihtml5_select.js.erb +0 -3
- data/vendor/assets/javascripts/spina/jquery.farbtastic.js +0 -345
- data/vendor/assets/javascripts/spina/morris.js +0 -1767
- data/vendor/assets/javascripts/spina/raphael.js +0 -8111
- data/vendor/assets/javascripts/spina/wysihtml5.js +0 -269
- data/vendor/assets/javascripts/spina/wysihtml5_parser_rules.js +0 -551
- data/vendor/assets/stylesheets/spina/_morris.scss +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a434cf817128736d599401f7c0fb4f3db07254a
|
4
|
+
data.tar.gz: 1288622640295c335ad5a1d1f51465bf025dc23b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
[![
|
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
|
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
|
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,
|
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
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-
|
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
|
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-
|
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=""
|
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=""
|
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
|
@@ -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
|
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="&#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 .
|
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.
|
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
|
@@ -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
|
-
|
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
|
-
|
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
|
-
@
|
129
|
+
@keyframes rotate
|
130
130
|
from
|
131
|
-
|
131
|
+
transform: rotate(0deg)
|
132
132
|
to
|
133
|
-
|
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
|
-
|
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
|
-
@
|
1
|
+
@keyframes flyIn
|
2
2
|
0%
|
3
3
|
opacity: 0
|
4
|
-
|
4
|
+
transform: scale(.9)
|
5
5
|
100%
|
6
6
|
opacity: 1
|
7
|
-
|
7
|
+
transform: scale(1)
|
8
8
|
|
9
9
|
.animated.flyIn
|
10
|
-
|
10
|
+
animation: flyIn .4s ease
|
11
11
|
|
12
|
-
@
|
12
|
+
@keyframes flyOut
|
13
13
|
0%
|
14
14
|
opacity: 1
|
15
|
-
|
15
|
+
transform: scale(1)
|
16
16
|
100%
|
17
17
|
opacity: 0
|
18
|
-
|
18
|
+
transform: scale(.9)
|
19
19
|
|
20
20
|
.animated.flyOut
|
21
|
-
|
21
|
+
animation: flyOut .4s ease
|
22
22
|
|
23
|
-
@
|
23
|
+
@keyframes small-shake
|
24
24
|
0%, 100%
|
25
|
-
|
25
|
+
transform: translateX(0)
|
26
26
|
20%, 60%
|
27
|
-
|
27
|
+
transform: translateX(7px)
|
28
28
|
40%, 80%
|
29
|
-
|
29
|
+
transform: translateX(-7px)
|
30
30
|
|
31
31
|
.animated.small-shake
|
32
|
-
|
32
|
+
animation: small-shake .6s ease-in
|
33
33
|
|
34
|
-
@
|
34
|
+
@keyframes switchon
|
35
35
|
0%
|
36
|
-
|
36
|
+
transform: translate3d(0, 0, 0)
|
37
37
|
50%
|
38
38
|
width: 32px
|
39
|
-
|
39
|
+
transform: translate3d(0, 0, 0)
|
40
40
|
100%
|
41
41
|
width: 23px
|
42
|
-
|
42
|
+
transform: translate3d(17px, 0, 0)
|
43
43
|
|
44
|
-
@
|
44
|
+
@keyframes switchoff
|
45
45
|
0%
|
46
|
-
|
46
|
+
transform: translate3d(17px, 0, 0)
|
47
47
|
100%
|
48
|
-
|
48
|
+
transform: translate3d(0, 0, 0)
|
49
49
|
|
50
50
|
.deactivated .knob
|
51
|
-
|
51
|
+
animation: switchoff .2s ease
|
52
52
|
|
53
53
|
.activated .knob
|
54
|
-
|
55
|
-
|
54
|
+
animation: switchon .4s
|
55
|
+
animation-fill-mode: forwards
|
56
56
|
|
57
|
-
@
|
57
|
+
@keyframes rotate
|
58
58
|
0%
|
59
|
-
|
59
|
+
transform: rotate(0deg)
|
60
60
|
100%
|
61
|
-
|
61
|
+
transform: rotate(360deg)
|
@@ -1,6 +1,10 @@
|
|
1
1
|
// Icons
|
2
2
|
|
3
|
-
@
|
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
|