kuhsaft 2.6.0 → 2.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/app/assets/javascripts/kuhsaft/cms/application.js.coffee.erb +19 -1
- data/app/controllers/kuhsaft/cms/bricks_controller.rb +2 -1
- data/app/views/kuhsaft/cms/bricks/_brick_header.html.haml +1 -1
- data/app/views/kuhsaft/cms/bricks/_brick_item.html.haml +4 -3
- data/app/views/kuhsaft/pages/show.html.haml +1 -1
- data/lib/kuhsaft/version.rb +1 -1
- data/spec/spec_helper.rb +1 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f48c54fc9835d1c425f143c773aa93b85c94eab2
|
4
|
+
data.tar.gz: 6e54f3e91d24a7f7705c92b189b8c59fd49f72b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: de22955455630cabe26e8ae610dbcca4419b422c1cc0179c98211e2a1e7864790b8c06ae7c82b95ee6a0d1fb90e6f92add3526a6bb2959f5ac3983c6f2a24cd3
|
7
|
+
data.tar.gz: fb6a08a93a30f74f5a12f9282492e150ea0088492203ef32e07cd90e5e7de4c6e7fcf5c85655cd3c38f4d64e715b81a40363ceb212cb22799efee0728505b058
|
data/README.md
CHANGED
@@ -23,6 +23,20 @@ CKEDITOR.config.customConfig = "<%= asset_path('kuhsaft/cms/ck-config.js') %>"
|
|
23
23
|
loadTextEditor = ->
|
24
24
|
CKEDITOR.replaceAll('ckeditor')
|
25
25
|
|
26
|
+
reloadTextEditor = (ui) ->
|
27
|
+
editor_ids = ui.item.find('.ckeditor').map ->
|
28
|
+
@id
|
29
|
+
|
30
|
+
for editor in editor_ids
|
31
|
+
CKEDITOR.replace editor
|
32
|
+
|
33
|
+
destroyTextEditor = (ui)->
|
34
|
+
editor_ids = ui.item.find('.ckeditor').map ->
|
35
|
+
@id
|
36
|
+
|
37
|
+
for editor in editor_ids
|
38
|
+
CKEDITOR.instances[editor].destroy(true)
|
39
|
+
|
26
40
|
pageType = ->
|
27
41
|
$('#page_page_type option:selected').val()
|
28
42
|
|
@@ -59,7 +73,11 @@ sortableBrick = ->
|
|
59
73
|
sortForm = $('#bricks-sort-form form')
|
60
74
|
sortForm.find('input[name="bricks[ids]"]').val(idList.toArray().join(','))
|
61
75
|
sortForm.trigger('submit')
|
62
|
-
)
|
76
|
+
stop: (event, ui) ->
|
77
|
+
reloadTextEditor(ui)
|
78
|
+
start: (event, ui) ->
|
79
|
+
destroyTextEditor(ui)
|
80
|
+
).disableSelection()
|
63
81
|
|
64
82
|
window.initSubmitLinks = (selector = null)->
|
65
83
|
selector ||= $('body')
|
@@ -23,8 +23,9 @@ module Kuhsaft
|
|
23
23
|
|
24
24
|
def update
|
25
25
|
@brick = Kuhsaft::Brick.find(params[:id])
|
26
|
+
@brick.image_size ||= ImageSize.all.first.name.to_s
|
27
|
+
params['brick'].delete('image_cache') if params['brick']['image']
|
26
28
|
@brick.update_attributes(brick_params)
|
27
|
-
|
28
29
|
#
|
29
30
|
# rails will fall back to html if ajax can't be used
|
30
31
|
# this is the case with the image brick, because ajax does not
|
@@ -1,14 +1,15 @@
|
|
1
1
|
.brick-item{ id: brick.to_brick_item_id, class: brick.to_style_class, 'data-id' => brick.id }
|
2
|
-
= simple_form_for brick, as: :brick, url: kuhsaft.cms_brick_path(brick), remote:
|
2
|
+
= simple_form_for brick, as: :brick, url: kuhsaft.cms_brick_path(brick), remote: true, html: { id: nil }, wrapper: :bootstrap do |form|
|
3
3
|
= form.hidden_field :position, class: 'position-field'
|
4
4
|
- brick_content = render(brick.to_edit_partial_path, brick: brick, form: form)
|
5
5
|
|
6
6
|
.brick-item-header.clearfix
|
7
7
|
= render('kuhsaft/cms/bricks/brick_header', brick: brick, brick_content: brick_content, form: form)
|
8
8
|
|
9
|
-
- if brick_content.present?
|
9
|
+
- if brick_content.present? || brick.user_can_save?
|
10
10
|
.brick-item-content.collapse.in{ id: "brick-content-#{brick.id}", 'data-toggle' => true }
|
11
|
-
|
11
|
+
- if brick_content.present?
|
12
|
+
= brick_content
|
12
13
|
- if brick.user_can_save?
|
13
14
|
- # save button
|
14
15
|
.clearfix
|
@@ -5,7 +5,7 @@
|
|
5
5
|
- if @page.google_verification_key.present? && @page == homepage
|
6
6
|
%meta{ name: 'google-site-verification', content: @page.google_verification_key }
|
7
7
|
|
8
|
-
- cache [@page, I18n.locale, @page.children
|
8
|
+
- cache [@page, I18n.locale, "relatedhash-#{(@page.children + @page.bricks).map(&:cache_key).join.hash}"] do
|
9
9
|
- unless @page.blank?
|
10
10
|
.page-content
|
11
11
|
-# TODO: refactor into scopes or simplify otherwise:
|
data/lib/kuhsaft/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -26,6 +26,7 @@ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require_relative f }
|
|
26
26
|
ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration)
|
27
27
|
|
28
28
|
RSpec.configure do |config|
|
29
|
+
config.infer_spec_type_from_file_location!
|
29
30
|
|
30
31
|
# Remove this line if you don't want RSpec's should and should_not
|
31
32
|
# methods or matchers
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kuhsaft
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.6.
|
4
|
+
version: 2.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Immanuel Häussermann
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2015-03-19 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rspec-rails
|
@@ -777,7 +777,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
777
777
|
version: '0'
|
778
778
|
requirements: []
|
779
779
|
rubyforge_project: kuhsaft
|
780
|
-
rubygems_version: 2.
|
780
|
+
rubygems_version: 2.0.3
|
781
781
|
signing_key:
|
782
782
|
specification_version: 4
|
783
783
|
summary: A tool that helps you to manage your content within your app.
|