alchemy_cms 3.3.3 → 3.4.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +1 -1
  3. data/CHANGELOG.md +42 -4
  4. data/README.md +7 -3
  5. data/alchemy_cms.gemspec +1 -0
  6. data/app/assets/javascripts/alchemy/{alchemy.js → admin.js} +1 -2
  7. data/app/assets/javascripts/alchemy/alchemy.datepicker.js.coffee +28 -25
  8. data/app/assets/javascripts/alchemy/alchemy.dialog.js.coffee +1 -0
  9. data/app/assets/javascripts/alchemy/alchemy.i18n.js.coffee +7 -1
  10. data/app/assets/javascripts/alchemy/alchemy.link_dialog.js.coffee +1 -1
  11. data/app/assets/javascripts/alchemy/alchemy.sitemap.js.coffee +26 -0
  12. data/app/assets/javascripts/alchemy/alchemy.translations.js.coffee +56 -1
  13. data/app/assets/stylesheets/alchemy/_variables.scss +1 -0
  14. data/app/assets/stylesheets/alchemy/admin.scss +2 -1
  15. data/app/assets/stylesheets/alchemy/archive.scss +7 -0
  16. data/app/assets/stylesheets/alchemy/base.scss +0 -42
  17. data/app/assets/stylesheets/alchemy/buttons.scss +2 -1
  18. data/app/assets/stylesheets/alchemy/form_fields.scss +9 -0
  19. data/app/assets/stylesheets/alchemy/forms.scss +36 -10
  20. data/app/assets/stylesheets/alchemy/frame.scss +12 -1
  21. data/app/assets/stylesheets/alchemy/icons.scss +1 -1
  22. data/app/assets/stylesheets/alchemy/jquery-ui.scss +0 -260
  23. data/app/assets/stylesheets/alchemy/jquery.datetimepicker.scss +507 -0
  24. data/app/assets/stylesheets/alchemy/lists.scss +62 -0
  25. data/app/assets/stylesheets/alchemy/selects.scss +9 -2
  26. data/app/assets/stylesheets/alchemy/sitemap.scss +28 -51
  27. data/app/assets/stylesheets/alchemy/toolbar.scss +0 -2
  28. data/app/controllers/alchemy/admin/attachments_controller.rb +4 -6
  29. data/app/controllers/alchemy/admin/base_controller.rb +2 -2
  30. data/app/controllers/alchemy/admin/dashboard_controller.rb +2 -2
  31. data/app/controllers/alchemy/admin/languages_controller.rb +5 -0
  32. data/app/controllers/alchemy/admin/pages_controller.rb +14 -5
  33. data/app/controllers/alchemy/admin/resources_controller.rb +17 -1
  34. data/app/controllers/alchemy/base_controller.rb +1 -0
  35. data/app/controllers/alchemy/messages_controller.rb +1 -1
  36. data/app/controllers/alchemy/pages_controller.rb +16 -26
  37. data/app/controllers/alchemy/pictures_controller.rb +23 -10
  38. data/app/controllers/concerns/alchemy/page_redirects.rb +7 -7
  39. data/app/helpers/alchemy/admin/base_helper.rb +22 -19
  40. data/app/helpers/alchemy/admin/essences_helper.rb +26 -11
  41. data/app/helpers/alchemy/admin/pages_helper.rb +2 -1
  42. data/app/helpers/alchemy/essences_helper.rb +0 -35
  43. data/app/helpers/alchemy/url_helper.rb +1 -1
  44. data/app/mailers/alchemy/base_mailer.rb +18 -0
  45. data/app/mailers/alchemy/{messages.rb → messages_mailer.rb} +1 -1
  46. data/app/models/alchemy/attachment.rb +9 -0
  47. data/app/models/alchemy/cell.rb +1 -1
  48. data/app/models/alchemy/essence_picture.rb +4 -1
  49. data/app/models/alchemy/essence_picture_view.rb +68 -0
  50. data/app/models/alchemy/language.rb +8 -10
  51. data/app/models/alchemy/language/code.rb +4 -1
  52. data/app/models/alchemy/page.rb +69 -26
  53. data/app/models/alchemy/page/page_natures.rb +22 -0
  54. data/app/models/alchemy/page/page_scopes.rb +20 -6
  55. data/app/models/alchemy/picture.rb +37 -4
  56. data/app/models/alchemy/site.rb +8 -0
  57. data/app/serializers/alchemy/page_tree_serializer.rb +1 -1
  58. data/app/views/alchemy/admin/attachments/_archive_overlay.html.erb +9 -6
  59. data/app/views/alchemy/admin/attachments/_file_to_assign.html.erb +11 -9
  60. data/app/views/alchemy/admin/attachments/_filter_bar.html.erb +32 -0
  61. data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +14 -2
  62. data/app/views/alchemy/admin/attachments/index.html.erb +10 -9
  63. data/app/views/alchemy/admin/dashboard/_locked_pages.html.erb +20 -9
  64. data/app/views/alchemy/admin/dashboard/_recent_pages.html.erb +11 -1
  65. data/app/views/alchemy/admin/languages/_form.html.erb +1 -0
  66. data/app/views/alchemy/admin/languages/index.html.erb +7 -8
  67. data/app/views/alchemy/admin/layoutpages/_layoutpage.html.erb +1 -1
  68. data/app/views/alchemy/admin/layoutpages/index.html.erb +2 -2
  69. data/app/views/alchemy/admin/pages/_current_page.html.erb +4 -0
  70. data/app/views/alchemy/admin/pages/_form.html.erb +16 -1
  71. data/app/views/alchemy/admin/pages/_locked_page.html.erb +2 -12
  72. data/app/views/alchemy/admin/pages/_page.html.erb +1 -1
  73. data/app/views/alchemy/admin/pages/_page_for_links.html.erb +2 -2
  74. data/app/views/alchemy/admin/pages/_page_status.html.erb +23 -11
  75. data/app/views/alchemy/admin/pages/edit.html.erb +2 -1
  76. data/app/views/alchemy/admin/pages/index.html.erb +2 -2
  77. data/app/views/alchemy/admin/partials/_language_tree_select.html.erb +3 -0
  78. data/app/views/alchemy/admin/partials/_site_select.html.erb +9 -0
  79. data/app/views/alchemy/admin/pictures/_picture.html.erb +6 -1
  80. data/app/views/alchemy/admin/pictures/_picture_to_assign.html.erb +2 -1
  81. data/app/views/alchemy/admin/pictures/show.html.erb +1 -1
  82. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +31 -0
  83. data/app/views/alchemy/admin/resources/_form.html.erb +6 -0
  84. data/app/views/alchemy/admin/resources/_tag_list.html.erb +16 -0
  85. data/app/views/alchemy/admin/resources/index.html.erb +13 -1
  86. data/app/views/alchemy/essences/_essence_file_view.html.erb +2 -5
  87. data/app/views/alchemy/essences/_essence_picture_view.html.erb +5 -3
  88. data/app/views/alchemy/{messages → messages_mailer}/contact_form_mail.de.text.erb +0 -0
  89. data/app/views/alchemy/{messages → messages_mailer}/contact_form_mail.en.text.erb +0 -0
  90. data/app/views/alchemy/{messages → messages_mailer}/contact_form_mail.es.text.erb +0 -0
  91. data/app/views/alchemy/{messages → messages_mailer}/new.html.erb +0 -0
  92. data/app/views/layouts/alchemy/admin.html.erb +3 -8
  93. data/config/alchemy/config.yml +4 -3
  94. data/config/initializers/assets.rb +2 -2
  95. data/config/initializers/dragonfly.rb +3 -0
  96. data/config/initializers/mime_types.rb +1 -0
  97. data/config/locales/alchemy.de.yml +10 -2
  98. data/config/locales/alchemy.en.yml +6 -2
  99. data/config/locales/alchemy.es.yml +6 -3
  100. data/config/locales/alchemy.fr.yml +6 -2
  101. data/config/locales/alchemy.it.yml +937 -0
  102. data/config/locales/alchemy.nl.yml +6 -2
  103. data/config/locales/alchemy.ru.yml +3 -2
  104. data/config/locales/simple_form.it.yml +25 -0
  105. data/db/migrate/20160108174834_add_timebased_publishing_columns_to_pages.rb +32 -0
  106. data/db/migrate/20160422195310_add_image_file_format_to_alchemy_pictures.rb +21 -0
  107. data/db/migrate/20160617224938_change_alchemy_pages_locked_to_locked_at.rb +22 -0
  108. data/lib/alchemy/ability_helper.rb +23 -0
  109. data/lib/alchemy/configuration_methods.rb +2 -2
  110. data/lib/alchemy/controller_actions.rb +4 -33
  111. data/lib/alchemy/engine.rb +1 -0
  112. data/lib/alchemy/resource.rb +30 -13
  113. data/lib/alchemy/resources_helper.rb +17 -0
  114. data/lib/alchemy/test_support/factories/page_factory.rb +7 -2
  115. data/lib/alchemy/upgrader.rb +1 -0
  116. data/lib/alchemy/upgrader/tasks/install_asset_manifests.rb +15 -0
  117. data/lib/alchemy/upgrader/three_point_four.rb +16 -0
  118. data/lib/alchemy/version.rb +1 -1
  119. data/lib/rails/generators/alchemy/elements/elements_generator.rb +8 -7
  120. data/lib/rails/generators/alchemy/essence/essence_generator.rb +2 -6
  121. data/lib/rails/generators/alchemy/install/files/all.css +11 -0
  122. data/lib/rails/generators/alchemy/install/files/all.js +11 -0
  123. data/lib/rails/generators/alchemy/install/files/{alchemy.elements.css.scss → article.scss} +0 -0
  124. data/lib/rails/generators/alchemy/install/install_generator.rb +20 -19
  125. data/lib/rails/generators/alchemy/module/module_generator.rb +3 -5
  126. data/lib/rails/generators/alchemy/page_layouts/page_layouts_generator.rb +7 -6
  127. data/lib/rails/generators/alchemy/site_layouts/site_layouts_generator.rb +7 -6
  128. data/vendor/assets/javascripts/date-formatter.js +161 -0
  129. data/vendor/assets/javascripts/jquery_plugins/jquery.datetimepicker.full.min.js +2 -0
  130. data/vendor/assets/javascripts/tinymce/langs/it.js +219 -0
  131. metadata +48 -13
  132. data/app/assets/javascripts/alchemy/alchemy.custom.js +0 -1
  133. data/app/assets/stylesheets/alchemy/custom.scss +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e46cc1ad834f7414c9aa12266eb68ee85ce0040
4
- data.tar.gz: 4ab3d7090f5c97ac01ee7c0e263950abbb645c48
3
+ metadata.gz: ccd7ef2204aab33386942efc46784bab6a2e40f4
4
+ data.tar.gz: b91fa94caa3ebffb1d9de950850fa12de33f019b
5
5
  SHA512:
6
- metadata.gz: 40701894774db2496b239cae14fbdcf8ff1e76f801f417e96711e1f218f7696877fc52fa642b9fadfc72e2ba617c125c156cd0214326e74e66b35a9615c5b3be
7
- data.tar.gz: d3543e573450058ce283b23e222488e70f58ab5c53433f8dd329f5a489949a3ce956c65cfc98421d15cd6699bdcf6d7612a2620fbdc1c9e7da9f768a6e5c4c37
6
+ metadata.gz: 55f8b83db6a43248ce5ed8a54173fdca726896affd34c55440ed0c06fa7bfc1a4eccd58fb4876ae96742575fb1f0d77f917d0b874ace52eff5829c98f75d45e9
7
+ data.tar.gz: 2805a1bee4575223459af51e7de6fcdb8c0e3bb7c9c6b8fb8e60c1952a8967d4290d0436d8beabcfd74741f8e705c16ce299825315193e4e3e209e80ec647f20
@@ -7,7 +7,7 @@ rvm:
7
7
  - 2.3.0
8
8
  branches:
9
9
  only:
10
- - 3.3-stable
10
+ - 3.4-stable
11
11
  before_install:
12
12
  - gem install bundler
13
13
  before_script: bundle exec rake alchemy:spec:prepare
@@ -1,11 +1,49 @@
1
1
  # Change Log
2
2
 
3
- ## 3.3.3 (2016-08-31)
3
+ ## 3.4.0 (unreleased)
4
4
 
5
- * Fix bug that rendered duplicate nested elements within a cell (#1100)
6
- * Merge `html_options` in EssenceFile view (#1115)
5
+ __New Features__
6
+
7
+ * `MessagesMailer` (formerly known as `Messages`) now inherits from `ApplicationMailer`
8
+ when it is defined.
9
+ * Adds time based published pages: The public status of a page is now made of two time stamps:
10
+ `public_on` and `public_until`
11
+ * Send page expiration cache headers
12
+ * Adds an +EssencePictureView+ class responsible for rendering the `essence_picture_view` partial
13
+ * Adds a file type filter to file archive
14
+ * Allow setting the type of EssenceText input fields in the elements.yml via `settings[:input_type]`
15
+ * Adds support for defining custom searchable attributes in resources
16
+ * Automatically add tag management to admin module views, when the resource model
17
+ has been set to `acts_as_taggable`.
18
+ * Automatically add scope filters to admin module views, when the resource model
19
+ has the class method `alchemy_resource_filters` defined.
20
+
21
+ __Notable Changes__
22
+
23
+ * `Messages` mailer class has been renamed to `MessagesMailer`
24
+ * Removed the auto-magically merge of Ability classes (#1022)
25
+ * Replace jQueryUI datepicker with $.datetimepicker
26
+ * Thumbnails now render in original file format, but GIFs will always be flattened
27
+ * Pictures will be rendered in original file format by default
28
+ * Allow SVG files to be rendered as EssencePicture
29
+ * When using Alchemy content outside of Alchemy, `current_ability` is no longer
30
+ included with `Alchemy::ControllerActions` to prevent method clashes. If you
31
+ need access to `current_ability` you also need to include `Alchemy::AbilityHelper`
32
+ * Asset manifests are now installed into `vendor/assets` folder in order to provide easy customization
33
+ Please don't use alchemy/custom files any more. Instead require your customizations in the manifests.
34
+ * Removes the default_scope from Language on_site current while ensuring to load languages by code
35
+ from current site only.
36
+ * Removes the `Language.get_default` method alias for `Language.default`
37
+ * Move site select into pages and languages module to avoid confusion about curent site (#1067)
38
+ * List pages from all sites in currently locked pages tabs and Dashboard widget (#1067)
39
+ * The locked value on page is now a timestamp (`locked_at`), so we can order locked pages by (#1070)
40
+ * Persist user in dummy app
41
+
42
+ __Fixed Bugs__
43
+
44
+ * Generators don't delete directories any more (#850)
7
45
 
8
- ## 3.3.2 (2016-08-02)
46
+ ## 3.3.2 (unreleased)
9
47
 
10
48
  * Use relative url for page preview frame in order to prevent cross origin errors (#1076)
11
49
 
data/README.md CHANGED
@@ -1,5 +1,5 @@
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.3-stable)](https://travis-ci.org/AlchemyCMS/alchemy_cms)
2
+ [![Build Status](https://travis-ci.org/AlchemyCMS/alchemy_cms.svg?branch=3.4-stable)](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)
@@ -75,9 +75,11 @@ $ alchemy --help
75
75
  Put this into your `Gemfile`:
76
76
 
77
77
  ```ruby
78
- gem 'alchemy_cms', github: 'AlchemyCMS/alchemy_cms', branch: '3.3-stable'
78
+ gem 'alchemy_cms', github: 'AlchemyCMS/alchemy_cms', branch: '3.4-stable'
79
79
  ```
80
80
 
81
+ **NOTE:** You normally want to use a stable branch, like `3.3-stable`.
82
+
81
83
  If you want to use Russian translation and have better i18n support, you should put:
82
84
 
83
85
  ```ruby
@@ -102,9 +104,11 @@ the Devise based user model that Alchemy provides and was extracted [into its ow
102
104
  If you don't have your own user class, you can use the Alchemy user model. Just add the following gem into your `Gemfile`:
103
105
 
104
106
  ```ruby
105
- gem 'alchemy-devise', github: 'AlchemyCMS/alchemy-devise', branch: '3.3-stable'
107
+ gem 'alchemy-devise', github: 'AlchemyCMS/alchemy-devise', branch: '3.4-stable'
106
108
  ```
107
109
 
110
+ **NOTE:** You normally want to use a stable branch, like `3.3-stable`.
111
+
108
112
  Then run:
109
113
 
110
114
  ```shell
@@ -28,6 +28,7 @@ Gem::Specification.new do |gem|
28
28
  gem.add_runtime_dependency 'coffee-rails', ['~> 4.0']
29
29
  gem.add_runtime_dependency 'compass-rails', ['>= 2.0.4', '< 4.0']
30
30
  gem.add_runtime_dependency 'dragonfly', ['~> 1.0.1']
31
+ gem.add_runtime_dependency 'dragonfly_svg', ['~> 0.0.4']
31
32
  gem.add_runtime_dependency 'jquery-rails', ['~> 4.0']
32
33
  gem.add_runtime_dependency 'jquery-ui-rails', ['~> 5.0.0']
33
34
  gem.add_runtime_dependency 'kaminari', ['~> 0.15']
@@ -3,7 +3,6 @@
3
3
  //= require jquery2
4
4
  //= require jquery_ujs
5
5
  //= require turbolinks
6
- //= require jquery-ui/datepicker
7
6
  //= require jquery-ui/draggable
8
7
  //= require jquery-ui/effect-drop
9
8
  //= require jquery-ui/effect-fade
@@ -20,6 +19,7 @@
20
19
  //= require select2_locale_fr
21
20
  //= require select2_locale_nl
22
21
  //= require select2_locale_ru
22
+ //= require select2_locale_it
23
23
  //= require handlebars
24
24
  //= require alchemy/alchemy.base
25
25
  //= require alchemy/alchemy.autocomplete
@@ -51,4 +51,3 @@
51
51
  //= require alchemy/alchemy.tinymce
52
52
  //= require alchemy/alchemy.translations
53
53
  //= require alchemy/alchemy.trash_window
54
- //= require alchemy/alchemy.custom
@@ -3,30 +3,33 @@ window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
3
3
  $.extend Alchemy,
4
4
 
5
5
  Datepicker: (scope) ->
6
- browserHasDatepicker = Alchemy.isiOS
7
- datepicker_options =
8
- dateFormat: "yy-mm-dd"
9
- changeMonth: true
10
- changeYear: true
11
- showWeek: true
12
- showButtonPanel: true
13
- showOtherMonths: true
14
- onSelect: ->
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: ->
15
12
  Alchemy.setElementDirty $(this).closest(".element-editor")
16
13
 
17
- if Alchemy.locale is "de"
18
- $.extend datepicker_options,
19
- dateFormat: "dd.mm.yy"
20
- firstDay: 1
21
- dayNames: ["Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag"]
22
- dayNamesMin: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"]
23
- monthNames: ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"]
24
- monthNamesShort: ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Okt", "Nov", "Dez"]
25
- closeText: "Ok"
26
- currentText: "Heute"
27
- weekHeader: "KW"
28
- nextText: "nächster"
29
- prevText: "vorheriger"
30
-
31
- # Initializes the jQueryUI datepicker and disables the browsers default Datepicker unless the browser is iOS.
32
- $('input[type="date"], input.date', scope).datepicker(datepicker_options).prop "type", "text" unless browserHasDatepicker
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
+ $.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
34
+
35
+ return
@@ -81,6 +81,7 @@ class window.Alchemy.Dialog
81
81
  @dialog_body.hide()
82
82
  @dialog_body.html(data)
83
83
  @init()
84
+ @dialog.trigger('DialogReady.Alchemy', @dialog_body)
84
85
  if @options.ready?
85
86
  @options.ready(@dialog_body)
86
87
  @dialog_body.show('fade', 200)
@@ -4,6 +4,8 @@ window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
4
4
 
5
5
  Alchemy.I18n =
6
6
 
7
+ KEY_SEPARATOR: /\./
8
+
7
9
  # Translates given string
8
10
  #
9
11
  translate: (key, replacement) ->
@@ -11,7 +13,11 @@ Alchemy.I18n =
11
13
  throw 'Alchemy.locale is not set! Please set Alchemy.locale to a locale string in order to translate something.'
12
14
  translations = Alchemy.translations[Alchemy.locale]
13
15
  if translations
14
- translation = translations[key] || key
16
+ if @KEY_SEPARATOR.test(key)
17
+ keys = key.split(@KEY_SEPARATOR)
18
+ translation = translations[keys[0]][keys[1]] || key
19
+ else
20
+ translation = translations[key] || key
15
21
  if replacement
16
22
  translation.replace(/%\{.+\}/, replacement)
17
23
  else
@@ -56,7 +56,7 @@ class window.Alchemy.LinkDialog extends Alchemy.Dialog
56
56
  attachTreeEvents: ->
57
57
  # The select page and show elements links.
58
58
  $('a.sitemap_pagename_link, a.show_elements_to_link', @dialog_body).click (e) =>
59
- $this = $(e.target)
59
+ $this = $(e.currentTarget)
60
60
  page_id = $this.data('page-id')
61
61
  url = $this.data('url')
62
62
  # Select page in page tree
@@ -1,3 +1,5 @@
1
+ #= require date-formatter
2
+
1
3
  window.Alchemy = {} if typeof(window.Alchemy) is 'undefined'
2
4
 
3
5
  # The admin sitemap Alchemy module
@@ -15,6 +17,8 @@ Alchemy.Sitemap =
15
17
  @list_template = Handlebars.compile(list_template_html)
16
18
  @items = null
17
19
  @options = options
20
+ @watchPagePublicationState()
21
+ true
18
22
 
19
23
  Handlebars.registerPartial('list', list_template_html)
20
24
 
@@ -92,3 +96,25 @@ Alchemy.Sitemap =
92
96
  @filter_field_clear.click =>
93
97
  @search_field.val('')
94
98
  filter('')
99
+
100
+ # Handles the page publication date fields
101
+ watchPagePublicationState: ->
102
+ $(document).on 'DialogReady.Alchemy', (e, $dialog) ->
103
+ $public_on_field = $('#page_public_on', $dialog)
104
+ $public_until_field = $('#page_public_until', $dialog)
105
+ $publication_date_fields = $('.page-publication-date-fields', $dialog)
106
+
107
+ $('#page_public', $dialog).click ->
108
+ $checkbox = $(this)
109
+ format = $checkbox.data('date-format')
110
+ now = new Date()
111
+ if $checkbox.is(':checked')
112
+ $publication_date_fields.removeClass('hidden')
113
+ $public_on_field.val Date.format(now, format)
114
+ else
115
+ $publication_date_fields.addClass('hidden')
116
+ $public_on_field.val('')
117
+ $public_until_field.val('')
118
+ true
119
+
120
+ return
@@ -24,6 +24,11 @@ Alchemy.translations =
24
24
  'File type not allowed': 'Dateityp nicht erlaubt.'
25
25
  'Maximum number of files exceeded': 'Maximale Anzahl gleichzeitig erlaubter Datei-Uploads erreicht.'
26
26
  'Uploaded bytes exceed file size': 'Maximale Größe der erlaubten Dateigröße erreicht.'
27
+ formats:
28
+ datetime: "d.m.Y H:i"
29
+ date: "d.m.Y"
30
+ time: "H:i"
31
+ start_of_week: 1
27
32
 
28
33
  # English
29
34
  en:
@@ -45,6 +50,11 @@ Alchemy.translations =
45
50
  'File type not allowed': 'File type not allowed'
46
51
  'Maximum number of files exceeded': 'Maximum number of files exceeded.'
47
52
  'Uploaded bytes exceed file size': 'Uploaded bytes exceed file size'
53
+ formats:
54
+ datetime: "Y-m-d H:i"
55
+ date: "Y-m-d"
56
+ time: "H:i"
57
+ start_of_week: 0
48
58
 
49
59
  # Dutch
50
60
  nl:
@@ -66,7 +76,11 @@ Alchemy.translations =
66
76
  'File type not allowed': 'File type not allowed'
67
77
  'Maximum number of files exceeded': 'Uploadlimiet bereikt.'
68
78
  'Uploaded bytes exceed file size': 'Uploaded bytes exceed file size'
69
-
79
+ formats:
80
+ datetime: "Y-m-d H:i"
81
+ date: "Y-m-d"
82
+ time: "H:i"
83
+ start_of_week: 1
70
84
 
71
85
  # French
72
86
  fr:
@@ -88,6 +102,11 @@ Alchemy.translations =
88
102
  'File type not allowed': 'Type de document non autorisé.'
89
103
  'Maximum number of files exceeded': 'Le nombre maximum de fichiers est atteint.'
90
104
  'Uploaded bytes exceed file size': 'Taille de fichier maximale autorisée atteint.'
105
+ formats:
106
+ datetime: "d.m.Y H:i"
107
+ date: "d.m.Y"
108
+ time: "H:i"
109
+ start_of_week: 1
91
110
 
92
111
  # Russian
93
112
  ru:
@@ -109,6 +128,11 @@ Alchemy.translations =
109
128
  'File type not allowed': 'Этот тип файла не разрешен'
110
129
  'Maximum number of files exceeded': 'Исчерпано максимальное количество файлов.'
111
130
  'Uploaded bytes exceed file size': 'Превышен максимальный размер файла'
131
+ formats:
132
+ datetime: "d.m.Y H:i"
133
+ date: "d.m.Y"
134
+ time: "H:i"
135
+ start_of_week: 1
112
136
 
113
137
  # Spanish
114
138
  es:
@@ -130,3 +154,34 @@ Alchemy.translations =
130
154
  'File type not allowed': 'El tipo de archivo no está permitido'
131
155
  'Maximum number of files exceeded': 'Número máximo de archivos excedido.'
132
156
  'Uploaded bytes exceed file size': 'Los bytes subidos exceden el tamaño del archivo'
157
+ formats:
158
+ datetime: "d/m/Y H:i"
159
+ date: "d/m/Y"
160
+ time: "H:i"
161
+ start_of_week: 1
162
+
163
+ # Italian
164
+ it:
165
+ allowed_chars: 'di %{count} caratteri'
166
+ cancel: 'Annulla'
167
+ cancelled: 'Annullato'
168
+ click_to_edit: 'clicca per modificare'
169
+ complete: 'Completato'
170
+ element_dirty_notice: 'Questo elemento contiene delle modifiche non salvate. Vuoi veramenter chiuderlo?'
171
+ help: 'Aiuto'
172
+ ok: 'Ok'
173
+ page_dirty_notice: 'Su questa pagina hai delle modifiche non salvate. Verranno perse se decidi di continuare.'
174
+ page_found: 'Pagina trovata'
175
+ pages_found: 'Pagine trovate'
176
+ url_validation_failed: 'Formato URL non valido.'
177
+ warning: 'Attenzione!'
178
+ 'File is too large': 'Il file è troppo grande'
179
+ 'File is too small': 'Il file è troppo piccolo'
180
+ 'File type not allowed': 'Tipo di file non consentito'
181
+ 'Maximum number of files exceeded': 'Numero massimo di file raggiunto.'
182
+ 'Uploaded bytes exceed file size': 'Il numero di byte caricati eccede la dimensione del file'
183
+ formats:
184
+ datetime: "Y-m-d H:i"
185
+ date: "Y-m-d"
186
+ time: "H:i"
187
+ start_of_week: 1
@@ -60,3 +60,4 @@ $error_background_color: #efd3d3;
60
60
 
61
61
  $form-left-width: 35%;
62
62
  $form-right-width: 65%;
63
+ $sitemap-line-height: 24px;
@@ -26,7 +26,8 @@
26
26
  @import "alchemy/selects";
27
27
  @import "alchemy/sitemap";
28
28
  @import "alchemy/tables";
29
+ @import "alchemy/lists";
29
30
  @import "alchemy/upload";
30
31
  @import "alchemy/jquery-ui";
31
32
  @import "jquery.Jcrop.min";
32
- @import "alchemy/custom";
33
+ @import "jquery.datetimepicker";
@@ -25,6 +25,13 @@ div#image_assign_filter_and_image_sizing {
25
25
  position: relative;
26
26
  @extend %rounded-border;
27
27
 
28
+ img {
29
+ width: auto;
30
+ height: auto;
31
+ max-width: 100%;
32
+ max-height: 100%;
33
+ }
34
+
28
35
  .thumbnail_background {
29
36
  @extend %thumbnail-background;
30
37
  width: 160px;
@@ -256,48 +256,6 @@ div#page_editing_menu {
256
256
  margin-top: 1em;
257
257
  }
258
258
 
259
- li.even {
260
- background-color: #fff;
261
- }
262
-
263
- li.odd {
264
- background-color: #eaf3f9;
265
- }
266
-
267
- ul.list {
268
- margin: 0;
269
- padding: 0;
270
- list-style-type: none;
271
- }
272
-
273
- ul#layoutpages.list {
274
- margin-top: 16px;
275
- }
276
-
277
- ul#layoutpages.list li {
278
- margin-left: 8px;
279
- }
280
-
281
- ul#sitemap.list {
282
- padding: 0 0 104px 0;
283
- }
284
-
285
- ul.list li {
286
- list-style-type: none;
287
- border-width: 0;
288
- border-style: none;
289
- display: block;
290
- }
291
-
292
- ul.list li.legend {
293
- background-color: transparent;
294
- font-weight: bold;
295
- }
296
-
297
- ul.list span.right {
298
- float: right;
299
- }
300
-
301
259
  .handle {
302
260
  cursor: move;
303
261
  }