alchemy_cms 3.5.0 → 3.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +82 -26
  3. data/.travis.yml +1 -1
  4. data/CHANGELOG.md +23 -1
  5. data/README.md +14 -5
  6. data/Rakefile +0 -1
  7. data/alchemy_cms.gemspec +2 -5
  8. data/app/assets/images/alchemy/alchemy-logo.png +0 -0
  9. data/app/assets/javascripts/alchemy/admin.js +1 -1
  10. data/app/assets/javascripts/alchemy/alchemy.base.js.coffee +4 -8
  11. data/app/assets/javascripts/alchemy/alchemy.buttons.js.coffee +2 -2
  12. data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +18 -27
  13. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +1 -1
  14. data/app/assets/javascripts/alchemy/alchemy.element_editors.js.coffee +3 -8
  15. data/app/assets/javascripts/alchemy/alchemy.elements_window.js.coffee +1 -1
  16. data/app/assets/javascripts/alchemy/alchemy.gui.js.coffee +0 -1
  17. data/app/assets/javascripts/alchemy/alchemy.page_sorter.js +22 -46
  18. data/app/assets/javascripts/alchemy/alchemy.preview_window.js.coffee +1 -1
  19. data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +2 -2
  20. data/app/assets/javascripts/alchemy/alchemy.spinner.js +32 -0
  21. data/app/assets/javascripts/alchemy/alchemy.tinymce.js.coffee +1 -1
  22. data/app/assets/javascripts/alchemy/templates/index.js +1 -0
  23. data/app/assets/javascripts/alchemy/templates/spinner.hbs +7 -0
  24. data/app/assets/stylesheets/alchemy/_extends.scss +1 -0
  25. data/app/assets/stylesheets/alchemy/admin.scss +1 -0
  26. data/app/assets/stylesheets/alchemy/base.scss +1 -7
  27. data/app/assets/stylesheets/alchemy/buttons.scss +1 -5
  28. data/app/assets/stylesheets/alchemy/dialogs.scss +0 -4
  29. data/app/assets/stylesheets/alchemy/elements.scss +2 -6
  30. data/app/assets/stylesheets/alchemy/frame.scss +0 -5
  31. data/app/assets/stylesheets/alchemy/image_library.scss +0 -13
  32. data/app/assets/stylesheets/alchemy/sitemap.scss +5 -34
  33. data/app/assets/stylesheets/alchemy/spinner.scss +52 -0
  34. data/app/controllers/alchemy/admin/attachments_controller.rb +12 -11
  35. data/app/controllers/alchemy/admin/base_controller.rb +3 -7
  36. data/app/controllers/alchemy/admin/essence_pictures_controller.rb +2 -1
  37. data/app/controllers/alchemy/admin/languages_controller.rb +3 -8
  38. data/app/controllers/alchemy/admin/pictures_controller.rb +11 -7
  39. data/app/controllers/alchemy/admin/resources_controller.rb +1 -1
  40. data/app/controllers/alchemy/attachments_controller.rb +2 -0
  41. data/app/controllers/alchemy/base_controller.rb +4 -5
  42. data/app/controllers/concerns/alchemy/admin/uploader_responses.rb +1 -1
  43. data/app/helpers/alchemy/admin/base_helper.rb +17 -8
  44. data/app/helpers/alchemy/admin/tags_helper.rb +31 -18
  45. data/app/helpers/alchemy/base_helper.rb +1 -1
  46. data/app/helpers/alchemy/pages_helper.rb +4 -7
  47. data/app/models/alchemy/attachment.rb +4 -0
  48. data/app/models/alchemy/cell.rb +1 -1
  49. data/app/models/alchemy/element.rb +6 -12
  50. data/app/models/alchemy/element/definitions.rb +2 -2
  51. data/app/models/alchemy/element/element_contents.rb +1 -1
  52. data/app/models/alchemy/essence_picture_view.rb +14 -2
  53. data/app/models/alchemy/language.rb +4 -4
  54. data/app/models/alchemy/page.rb +25 -28
  55. data/app/models/alchemy/page/page_elements.rb +1 -1
  56. data/app/models/alchemy/page/page_natures.rb +1 -1
  57. data/app/models/alchemy/picture.rb +5 -1
  58. data/app/models/alchemy/site.rb +27 -12
  59. data/app/views/alchemy/admin/attachments/_tag_list.html.erb +14 -13
  60. data/app/views/alchemy/admin/dashboard/info.html.erb +1 -1
  61. data/app/views/alchemy/admin/layoutpages/edit.html.erb +1 -1
  62. data/app/views/alchemy/admin/pages/_create_language_form.html.erb +1 -1
  63. data/app/views/alchemy/admin/pages/_form.html.erb +1 -1
  64. data/app/views/alchemy/admin/pages/_new_page_form.html.erb +1 -1
  65. data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
  66. data/app/views/alchemy/admin/pages/_sitemap.html.erb +2 -2
  67. data/app/views/alchemy/admin/pages/configure_external.html.erb +1 -1
  68. data/app/views/alchemy/admin/pages/index.html.erb +5 -7
  69. data/app/views/alchemy/admin/pages/sort.html.erb +19 -0
  70. data/app/views/alchemy/admin/pages/update.js.erb +1 -1
  71. data/app/views/alchemy/admin/pictures/_archive.html.erb +19 -19
  72. data/app/views/alchemy/admin/pictures/_tag_list.html.erb +3 -4
  73. data/app/views/alchemy/admin/resources/_tag_list.html.erb +3 -4
  74. data/app/views/alchemy/admin/resources/edit.html.erb +1 -1
  75. data/app/views/alchemy/admin/resources/new.html.erb +1 -1
  76. data/app/views/alchemy/pages/_meta_data.html.erb +1 -1
  77. data/app/views/alchemy/pages/show.rss.builder +0 -2
  78. data/app/views/alchemy/welcome.html.erb +1 -1
  79. data/app/views/layouts/alchemy/admin.html.erb +1 -1
  80. data/config/locales/alchemy.de.yml +4 -4
  81. data/config/locales/alchemy.en.yml +4 -4
  82. data/config/locales/alchemy.es.yml +3 -3
  83. data/config/locales/alchemy.fr.yml +4 -4
  84. data/config/locales/alchemy.it.yml +3 -3
  85. data/config/locales/alchemy.nl.yml +4 -4
  86. data/config/locales/alchemy.ru.yml +3 -3
  87. data/lib/alchemy/auth_accessors.rb +6 -6
  88. data/lib/alchemy/cache_digests/template_tracker.rb +5 -5
  89. data/lib/alchemy/controller_actions.rb +1 -6
  90. data/lib/alchemy/engine.rb +0 -53
  91. data/lib/alchemy/errors.rb +12 -3
  92. data/lib/alchemy/i18n.rb +1 -1
  93. data/lib/alchemy/logger.rb +1 -1
  94. data/lib/alchemy/page_layout.rb +5 -5
  95. data/lib/alchemy/seeder.rb +16 -49
  96. data/lib/alchemy/tasks/helpers.rb +1 -1
  97. data/lib/alchemy/test_support/config_stubbing.rb +28 -0
  98. data/lib/alchemy/test_support/essence_shared_examples.rb +6 -6
  99. data/lib/alchemy/test_support/factories/language_factory.rb +1 -1
  100. data/lib/alchemy/test_support/factories/page_factory.rb +7 -0
  101. data/lib/alchemy/test_support/factories/site_factory.rb +6 -0
  102. data/lib/alchemy/test_support/shared_contexts.rb +14 -0
  103. data/lib/alchemy/test_support/shared_uploader_examples.rb +10 -0
  104. data/lib/alchemy/touching.rb +1 -1
  105. data/lib/alchemy/version.rb +1 -1
  106. data/lib/alchemy_cms.rb +56 -1
  107. data/lib/{alchemy/kaminari → kaminari}/scoped_pagination_url_helper.rb +0 -0
  108. data/lib/rails/generators/alchemy/base.rb +1 -1
  109. data/lib/rails/generators/alchemy/elements/elements_generator.rb +2 -1
  110. data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +2 -1
  111. data/lib/rails/generators/alchemy/site_layouts/site_layouts_generator.rb +2 -1
  112. data/lib/tasks/alchemy/tidy.rake +91 -89
  113. data/lib/tasks/alchemy/upgrade.rake +15 -15
  114. metadata +29 -14
  115. data/app/assets/javascripts/alchemy/alchemy.spinner.js.coffee +0 -49
  116. data/app/views/alchemy/admin/pages/sort.js.erb +0 -4
  117. data/vendor/assets/javascripts/handlebars.js +0 -4608
  118. data/vendor/assets/javascripts/spin.min.js +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 14e8d027122008b488a73f9b024526409ebe50f7
4
- data.tar.gz: c5881956120319ae1223ba35525e29eba86d1656
3
+ metadata.gz: fbb80467f9060754456aff5d7ee3f93c825af361
4
+ data.tar.gz: c29648c89aa451268018de87774965f4892f6fdc
5
5
  SHA512:
6
- metadata.gz: 785a53f247086243c4d59290eb772de017819b423c4b359aac6da424b0d25c2159274a3e7e4baf430f3044aa489208c7fd3e785571a95b9d20c83f614e775399
7
- data.tar.gz: 4e34d1760942a244e941ffa38454b66c6b47c76c677cff91c39eaa40aed1c3e296825f13578aadbab9d6dae16a517459e9258568430a77668fac72bbaabeb426
6
+ metadata.gz: a3c7a2a710d4936710e554cb28ee68d2c14bed27b2b2e7a17bce0eacdd259a83e752dd4307a8b3517efdaadcdd6b0038e37fc48676093ef771ab6b830f7d9405
7
+ data.tar.gz: 3a45456f460a78af4d2eba395b9f88ca5a1029b0bc6a8b4068e83fb336d9c68a4319f01a8365a0dd8a06969eaf99a77e0cc6ac015e810ca820b4a4a87dd7fd54
@@ -5,13 +5,22 @@ AllCops:
5
5
  - 'bin/rspec'
6
6
  - 'vendor/**/*'
7
7
  - 'spec/dummy/**/*'
8
+ - 'alchemy_cms.gemspec'
9
+
8
10
  TargetRubyVersion: 2.1
9
11
 
12
+ # Really, rubocop?
13
+ Bundler/OrderedGems:
14
+ Enabled: false
15
+
10
16
  # Sometimes I believe this reads better
11
17
  # This also causes spacing issues on multi-line fixes
12
18
  Style/BracesAroundHashParameters:
13
19
  Enabled: false
14
20
 
21
+ Style/EmptyLiteral:
22
+ Enabled: false
23
+
15
24
  # We use class vars and will have to continue doing so for compatability
16
25
  Style/ClassVars:
17
26
  Enabled: false
@@ -30,6 +39,10 @@ Style/ClassAndModuleChildren:
30
39
  Style/GuardClause:
31
40
  Enabled: false
32
41
 
42
+ # We support older versions of Ruby (2.1) that do not have the %i syntax
43
+ Style/SymbolArray:
44
+ Enabled: false
45
+
33
46
  Style/WordArray:
34
47
  Enabled: false
35
48
 
@@ -39,34 +52,69 @@ Style/ConditionalAssignment:
39
52
  Performance/Count:
40
53
  Enabled: false
41
54
 
42
- Lint/EndAlignment:
55
+ Layout/AlignHash:
43
56
  Enabled: false
44
57
 
45
- Style/ElseAlignment:
58
+ Layout/AlignParameters:
46
59
  Enabled: false
47
60
 
48
- Style/IndentationWidth:
61
+ Layout/ClosingParenthesisIndentation:
49
62
  Enabled: false
50
63
 
51
- Style/AlignParameters:
64
+ Layout/DotPosition:
52
65
  Enabled: false
66
+ StyleGuide: http://relaxed.ruby.style/#styledotposition
53
67
 
54
- Style/ClosingParenthesisIndentation:
68
+ Layout/ElseAlignment:
55
69
  Enabled: false
56
70
 
57
- Style/CollectionMethods:
71
+ Layout/EmptyLineAfterMagicComment:
58
72
  Enabled: false
59
73
 
60
- Style/MultilineMethodCallIndentation:
74
+ Layout/IndentArray:
61
75
  Enabled: false
62
76
 
63
- Style/IndentArray:
77
+ Layout/IndentHash:
64
78
  Enabled: false
65
79
 
66
- Style/IndentHash:
80
+ Layout/IndentHeredoc:
81
+ EnforcedStyle: active_support
82
+
83
+ Layout/IndentationWidth:
84
+ Enabled: false
85
+
86
+ Layout/MultilineHashBraceLayout:
87
+ Enabled: false
88
+
89
+ Layout/MultilineMethodCallBraceLayout:
90
+ Enabled: false
91
+
92
+ Layout/MultilineMethodCallIndentation:
93
+ Enabled: false
94
+
95
+ Layout/SpaceBeforeBlockBraces:
96
+ Enabled: false
97
+ StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces
98
+
99
+ Layout/SpaceInsideHashLiteralBraces:
100
+ Enabled: false
101
+
102
+ Layout/SpaceInsideParens:
103
+ Enabled: false
104
+ StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens
105
+
106
+ Lint/EndAlignment:
67
107
  Enabled: false
68
108
 
69
- Style/AlignHash:
109
+ Lint/HandleExceptions:
110
+ Exclude:
111
+ - 'config/initializers/mini_profiler.rb'
112
+
113
+ Lint/ShadowedException:
114
+ Exclude:
115
+ - 'lib/alchemy/sass_support.rb'
116
+
117
+ Style/CollectionMethods:
70
118
  Enabled: false
71
119
 
72
120
  Style/AccessorMethodName:
@@ -88,14 +136,13 @@ Style/Documentation:
88
136
  Enabled: false
89
137
  StyleGuide: http://relaxed.ruby.style/#styledocumentation
90
138
 
91
- Style/DotPosition:
92
- Enabled: false
93
- StyleGuide: http://relaxed.ruby.style/#styledotposition
94
-
95
139
  Style/DoubleNegation:
96
140
  Enabled: false
97
141
  StyleGuide: http://relaxed.ruby.style/#styledoublenegation
98
142
 
143
+ Style/EmptyMethod:
144
+ Enabled: false
145
+
99
146
  Style/EndBlock:
100
147
  Enabled: false
101
148
  StyleGuide: http://relaxed.ruby.style/#styleendblock
@@ -128,6 +175,9 @@ Style/NegatedWhile:
128
175
  Enabled: false
129
176
  StyleGuide: http://relaxed.ruby.style/#stylenegatedwhile
130
177
 
178
+ Style/NumericLiteralPrefix:
179
+ Enabled: false
180
+
131
181
  Style/ParallelAssignment:
132
182
  Enabled: false
133
183
  StyleGuide: http://relaxed.ruby.style/#styleparallelassignment
@@ -159,17 +209,6 @@ Style/SingleLineMethods:
159
209
  Enabled: false
160
210
  StyleGuide: http://relaxed.ruby.style/#stylesinglelinemethods
161
211
 
162
- Style/SpaceBeforeBlockBraces:
163
- Enabled: false
164
- StyleGuide: http://relaxed.ruby.style/#stylespacebeforeblockbraces
165
-
166
- Style/SpaceInsideHashLiteralBraces:
167
- Enabled: false
168
-
169
- Style/SpaceInsideParens:
170
- Enabled: false
171
- StyleGuide: http://relaxed.ruby.style/#stylespaceinsideparens
172
-
173
212
  Style/SpecialGlobalVars:
174
213
  Enabled: false
175
214
  StyleGuide: http://relaxed.ruby.style/#stylespecialglobalvars
@@ -178,10 +217,24 @@ Style/StringLiterals:
178
217
  Enabled: false
179
218
  StyleGuide: http://relaxed.ruby.style/#stylestringliterals
180
219
 
220
+ Style/VariableNumber:
221
+ Enabled: false
222
+
181
223
  Style/WhileUntilModifier:
182
224
  Enabled: false
183
225
  StyleGuide: http://relaxed.ruby.style/#stylewhileuntilmodifier
184
226
 
227
+ # We use a lot of
228
+ #
229
+ # expect {
230
+ # something
231
+ # }.to { happen }
232
+ #
233
+ # syntax in the specs files.
234
+ Lint/AmbiguousBlockAssociation:
235
+ Exclude:
236
+ - 'spec/**/*'
237
+
185
238
  Lint/AmbiguousRegexpLiteral:
186
239
  Enabled: false
187
240
  StyleGuide: http://relaxed.ruby.style/#lintambiguousregexpliteral
@@ -193,7 +246,7 @@ Lint/AssignmentInCondition:
193
246
  # We use eval to get the correct url proxy object of engines in:
194
247
  # - app/helpers/alchemy/admin/navigation_helper.rb:139
195
248
  # - lib/alchemy/resources_helper.rb:24
196
- Lint/Eval:
249
+ Security/Eval:
197
250
  Exclude:
198
251
  - app/helpers/alchemy/admin/navigation_helper.rb
199
252
  - lib/alchemy/resources_helper.rb
@@ -201,6 +254,9 @@ Lint/Eval:
201
254
  Metrics/AbcSize:
202
255
  Enabled: false
203
256
 
257
+ Metrics/BlockLength:
258
+ Enabled: false
259
+
204
260
  Metrics/BlockNesting:
205
261
  Enabled: false
206
262
 
@@ -10,7 +10,7 @@ rvm:
10
10
  - 2.3.0
11
11
  branches:
12
12
  only:
13
- - 3.5-stable
13
+ - master
14
14
 
15
15
  before_install:
16
16
  - "phantomjs --version"
@@ -1,5 +1,28 @@
1
1
  # Change Log
2
2
 
3
+ ## 3.6.0 (2017-06-20)
4
+
5
+ __Notable Changes__
6
+
7
+ * The seeder does not generate default site and root page anymore (#1239) by tvdeyen
8
+ Alchemy handles this auto-magically now. No need to run `Alchemy::Seeder.seed!` any more |o/
9
+ * Security: Sanitize ActiveRecord queries in `Alchemy::Element`, `Alchemy::Page` and
10
+ `Alchemy::PagesHelper` (#1257) by jessedoyle
11
+ * Remove post install message reference to the `alchemy` standalone installer (#1256) by jessedoyle
12
+ * Fixes tag filtering for pictures and attachments in overlay (#1266) by robinboening
13
+ * Fix js error on page#update with single quote in page name (#1263) by robinboening
14
+ * Change meta charset from 'utf8' to 'utf-8' (#1253) by rbjoern84
15
+ * Render "text" as type for datepicker input fields (#1246) by robinboening
16
+ * Remove unused Page attr_accessors (#1240) by tvdeyen
17
+ * Permit search params while redirecting in library (#1236) by tvdeyen
18
+ * Only allow floats and ints as fixed ratio for crop (#1234) by tvdeyen
19
+ * Use at least dragonfly 1.0.7 (#1225) by tvdeyen
20
+ * Add handlebars-assets gem (#1203) by tvdeyen
21
+ * Add a new spinner animation (#1202) by tvdeyen
22
+ * Re-color the Turbolinks progressbar (#1199) by tvdeyen
23
+ * Use normal view for pages sort action (#1197) by tvdeyen
24
+ * Add srcset and sizes support for EssencePicture (#1193) by tvdeyen
25
+
3
26
  ## 3.5.0 (2016-12-22)
4
27
 
5
28
  __New Features__
@@ -53,7 +76,6 @@ __Notable Changes__
53
76
  __Fixed Bugs__
54
77
 
55
78
  * The `language_links` helper now only renders languages from the current site
56
- * Fixes alchemy module generator (#1159)
57
79
 
58
80
  ## 3.4.1 (2016-08-31)
59
81
 
data/README.md CHANGED
@@ -1,12 +1,15 @@
1
1
  [![Gem Version](https://badge.fury.io/rb/alchemy_cms.svg)](http://badge.fury.io/rb/alchemy_cms)
2
- [![Build Status](https://travis-ci.org/AlchemyCMS/alchemy_cms.svg?branch=3.5-stable)](https://travis-ci.org/AlchemyCMS/alchemy_cms)
2
+ [![Build Status](https://travis-ci.org/AlchemyCMS/alchemy_cms.svg?branch=master)](https://travis-ci.org/AlchemyCMS/alchemy_cms)
3
3
  [![Code Climate](https://codeclimate.com/github/AlchemyCMS/alchemy_cms.svg)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms)
4
4
  [![Test Coverage](https://codeclimate.com/github/AlchemyCMS/alchemy_cms/badges/coverage.svg)](https://codeclimate.com/github/AlchemyCMS/alchemy_cms)
5
5
  [![Slack Status](http://slack.alchemy-cms.com/badge.svg)](http://slack.alchemy-cms.com)
6
6
 
7
+ **CAUTION: This master branch is a development branch that *can* contain bugs. For productive environments you should use the [current Ruby gem version](https://rubygems.org/gems/alchemy_cms), or the [latest stable branch (3.6-stable)](https://github.com/AlchemyCMS/alchemy_cms/tree/3.6-stable).**
8
+
9
+
7
10
  ## About
8
11
 
9
- ![Alchemy CMS](app/assets/images/alchemy/alchemy-logo.svg)
12
+ ![Alchemy CMS](app/assets/images/alchemy/alchemy-logo.png)
10
13
 
11
14
  Alchemy is a powerful, flexible and user centric Rails CMS.
12
15
 
@@ -42,7 +45,9 @@ Read more about Alchemy on the [website](https://alchemy-cms.com) and in the [gu
42
45
 
43
46
  ## Ruby Version
44
47
 
45
- Alchemy runs with Ruby >= 2.0.0.
48
+ Alchemy runs with Ruby >= 2.1.0.
49
+
50
+ For a Ruby 2.0.0 compatible version use the [`3.2-stable` branch](https://github.com/AlchemyCMS/alchemy_cms/tree/3.2-stable).
46
51
 
47
52
  For a Ruby 1.9.3 compatible version use the [`3.1-stable` branch](https://github.com/AlchemyCMS/alchemy_cms/tree/3.1-stable).
48
53
 
@@ -56,9 +61,11 @@ For a Ruby 1.8.7 compatible version use the [`2.3-stable` branch](https://github
56
61
  Put this into your `Gemfile`:
57
62
 
58
63
  ```ruby
59
- gem 'alchemy_cms', github: 'AlchemyCMS/alchemy_cms', branch: '3.5-stable'
64
+ gem 'alchemy_cms', github: 'AlchemyCMS/alchemy_cms', branch: 'master'
60
65
  ```
61
66
 
67
+ **NOTE:** You normally want to use a stable branch, like `3.6-stable`.
68
+
62
69
  If you want to use Russian translation and have better i18n support, you should put:
63
70
 
64
71
  ```ruby
@@ -83,9 +90,11 @@ the Devise based user model that Alchemy provides and was extracted [into its ow
83
90
  If you don't have your own user class, you can use the Alchemy user model. Just add the following gem into your `Gemfile`:
84
91
 
85
92
  ```ruby
86
- gem 'alchemy-devise', github: 'AlchemyCMS/alchemy-devise', branch: '3.5-stable'
93
+ gem 'alchemy-devise', github: 'AlchemyCMS/alchemy-devise', branch: 'master'
87
94
  ```
88
95
 
96
+ **NOTE:** You normally want to use a stable branch, like `3.6-stable`.
97
+
89
98
  Then run:
90
99
 
91
100
  ```shell
data/Rakefile CHANGED
@@ -1,4 +1,3 @@
1
- #!/usr/bin/env rake
2
1
  begin
3
2
  require 'bundler/setup'
4
3
  rescue LoadError
@@ -25,8 +25,9 @@ Gem::Specification.new do |gem|
25
25
  gem.add_runtime_dependency 'bourbon', ['~> 4.2']
26
26
  gem.add_runtime_dependency 'cancancan', ['~> 1.9']
27
27
  gem.add_runtime_dependency 'coffee-rails', ['~> 4.0']
28
- gem.add_runtime_dependency 'dragonfly', ['~> 1.0.1']
28
+ gem.add_runtime_dependency 'dragonfly', ['~> 1.0.7']
29
29
  gem.add_runtime_dependency 'dragonfly_svg', ['~> 0.0.4']
30
+ gem.add_runtime_dependency 'handlebars_assets', ['~> 0.23']
30
31
  gem.add_runtime_dependency 'jquery-rails', ['~> 4.0']
31
32
  gem.add_runtime_dependency 'jquery-ui-rails', ['~> 5.0.0']
32
33
  gem.add_runtime_dependency 'kaminari', ['~> 0.15']
@@ -45,10 +46,6 @@ Gem::Specification.new do |gem|
45
46
  Thank you for installing Alchemy CMS
46
47
  -------------------------------------------------------------
47
48
 
48
- - Create a new standalone Alchemy project:
49
-
50
- $ alchemy new my_project_name
51
-
52
49
  - Complete the installation in an existing Rails application:
53
50
 
54
51
  $ bin/rake alchemy:install
@@ -11,7 +11,6 @@
11
11
  //= require tinymce/tinymce.min
12
12
  //= require_tree ../../../../vendor/assets/javascripts/jquery_plugins/
13
13
  //= require clipboard.min
14
- //= require spin.min
15
14
  //= require keymaster
16
15
  //= require requestAnimationFrame
17
16
  //= require select2
@@ -22,6 +21,7 @@
22
21
  //= require select2_locale_ru
23
22
  //= require select2_locale_it
24
23
  //= require handlebars
24
+ //= require alchemy/templates
25
25
  //= require alchemy/alchemy.base
26
26
  //= require alchemy/alchemy.autocomplete
27
27
  //= require alchemy/alchemy.browser
@@ -34,8 +34,8 @@ $.extend Alchemy,
34
34
  pleaseWaitOverlay: (show = true) ->
35
35
  $overlay = $('#overlay')
36
36
  if show
37
- spinner = Alchemy.Spinner.medium()
38
- $overlay.append(spinner.spin().el)
37
+ spinner = new Alchemy.Spinner('medium')
38
+ spinner.spin $overlay
39
39
  $overlay.show()
40
40
  else
41
41
  $overlay.find('.spinner').remove()
@@ -44,12 +44,12 @@ $.extend Alchemy,
44
44
 
45
45
  # Shows spinner while loading images and
46
46
  # fades the image after its been loaded
47
- ImageLoader: (scope = document, options = {color: '#fff'}) ->
47
+ ImageLoader: (scope = document, options = {fill: '#fff'}) ->
48
48
  $('img', scope).each ->
49
49
  if !this.complete
50
50
  image = $(this).hide()
51
51
  $parent = image.parent()
52
- spinner = Alchemy.Spinner.small options
52
+ spinner = new Alchemy.Spinner('small', options)
53
53
  spinner.spin $parent[0]
54
54
  image.on 'load', ->
55
55
  spinner.stop()
@@ -77,10 +77,6 @@ $.extend Alchemy,
77
77
  dropdownAutoWidth: true
78
78
  return
79
79
 
80
- Buttons: (options) ->
81
- $("button, input:submit, a.button").button options
82
- return
83
-
84
80
  # Selects cell tab for given name.
85
81
  # Creates it if it's not present yet.
86
82
  selectOrCreateCellTab: (cell_name, label) ->
@@ -20,14 +20,14 @@ Alchemy.Buttons =
20
20
 
21
21
  disable: (button) ->
22
22
  $button = $(button)
23
- spinner = Alchemy.Spinner.small()
23
+ spinner = new Alchemy.Spinner('small')
24
24
  $button.data('content', $button.html())
25
25
  $button.attr('disabled', true)
26
26
  $button.addClass('disabled')
27
27
  $button.css
28
28
  width: $button.outerWidth()
29
29
  $button.empty()
30
- spinner.spin($button[0])
30
+ spinner.spin($button)
31
31
  return true
32
32
 
33
33
  enable: (scope) ->
@@ -3,33 +3,24 @@ window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
3
3
  $.extend Alchemy,
4
4
 
5
5
  Datepicker: (scope) ->
6
- options =
7
- format: Alchemy.t('formats.datetime')
8
- formatDate: Alchemy.t('formats.date')
9
- formatTime: Alchemy.t('formats.time')
10
- dayOfWeekStart: Alchemy.t('formats.start_of_week')
11
- onSelectDate: ->
12
- Alchemy.setElementDirty $(this).closest(".element-editor")
13
-
14
- datepicker_options = $.extend {}, options,
15
- format: options.formatDate
16
- timepicker: false
17
-
18
- timepicker_options = $.extend {}, options,
19
- format: options.formatTime
20
- datepicker: false
21
-
22
6
  $.datetimepicker.setLocale(Alchemy.locale);
23
-
24
- # Initializes the datepickers and disables the browsers default Datepicker
25
- # unless the browser is iOS.
26
- $('input[type="date"], input.date', scope)
27
- .datetimepicker(datepicker_options).prop "type", "text" unless Alchemy.isiOS
28
-
29
- $('input[type="time"], input.time', scope)
30
- .datetimepicker(timepicker_options).prop "type", "text" unless Alchemy.isiOS
31
-
32
- $('input[type="datetime"], input.datetime', scope)
33
- .datetimepicker(options).prop "type", "text" unless Alchemy.isiOS
7
+ $datepicker_inputs = $('input[data-datepicker-type]', scope)
8
+
9
+ # Initializes the datepickers on the text inputs and sets the proper type
10
+ # to enable browsers default datepicker if the current OS is iOS.
11
+ if Alchemy.isiOS
12
+ $datepicker_inputs.prop "type", ->
13
+ return $(this).data('datepicker-type')
14
+ else
15
+ $datepicker_inputs.each ->
16
+ type = $(this).data('datepicker-type')
17
+ options =
18
+ format: Alchemy.t("formats.#{type}")
19
+ timepicker: /time/.test(type)
20
+ datepicker: /date/.test(type)
21
+ dayOfWeekStart: Alchemy.t('formats.start_of_week')
22
+ onSelectDate: ->
23
+ Alchemy.setElementDirty $(this).closest(".element-editor")
24
+ $(this).datetimepicker(options)
34
25
 
35
26
  return