promethee 1.4.23 → 1.4.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/app/controllers/promethee_controller.rb +1 -0
- data/app/views/promethee/_edit.html.erb +9 -0
- data/lib/promethee/core_ext/tags.rb +2 -4
- data/lib/promethee/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5a597dfe16dab27efd0c0e90fc07e5ec42642023
|
4
|
+
data.tar.gz: '08e1e470475c6611400ff6933a17f18cabe93040'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aff244c67c8453f09b08af514df1414926ae0f86334bb9c9d11550470d3462eaa8d2f2910ce189b14fd1c7555f2e265993b4e3dc67872f5a083f5639add90e75
|
7
|
+
data.tar.gz: b3e5fdbb1fbbe0e80e15a72a55176aaa5452b9a95ef1b528158a28f4b869f4e641fdcc90aa6da2425c2e4757dce9ecc2721e496a52bd179fd25b2f6c84513853
|
data/README.md
CHANGED
@@ -188,6 +188,12 @@ To register a component, the code is:
|
|
188
188
|
To be able to preview responsivity, there is a POST "promethee/preview" route.
|
189
189
|
When you send your data, it renders the page in the default layout.
|
190
190
|
|
191
|
+
If you want to use a different layout, specify it in your editor's options :
|
192
|
+
|
193
|
+
```erb
|
194
|
+
<%= promethee_editor :page, :data, value: @page.data, back_url: root_path, preview_layout: 'layouts/my-preview' %>
|
195
|
+
```
|
196
|
+
|
191
197
|
This is used to generate a live responsive preview.
|
192
198
|
|
193
199
|
### Render localized (l10n)
|
@@ -103,6 +103,15 @@ promethee.controller('PrometheeController', ['$scope', 'summernoteConfig', 'pres
|
|
103
103
|
input.value = JSON.stringify($scope.promethee.data);
|
104
104
|
input.name = 'data';
|
105
105
|
form.appendChild(input);
|
106
|
+
|
107
|
+
<% if preview_layout.present? %>
|
108
|
+
var layoutInput = document.createElement('input');
|
109
|
+
layoutInput.type = 'text';
|
110
|
+
layoutInput.value = "<%= preview_layout %>";
|
111
|
+
layoutInput.name = 'preview_layout';
|
112
|
+
form.appendChild(layoutInput);
|
113
|
+
<% end %>
|
114
|
+
|
106
115
|
form.submit();
|
107
116
|
document.body.removeChild(form);
|
108
117
|
}
|
@@ -6,10 +6,8 @@ module ActionView
|
|
6
6
|
# https://github.com/rails/rails/blob/bdc581616b760d1e2be3795c6f0f3ab4b1e125a5/actionview/lib/action_view/helpers/tags/text_field.rb
|
7
7
|
class PrometheeEditor < Base
|
8
8
|
def render
|
9
|
-
master_data = object.send @method_name unless object.nil?
|
10
|
-
|
11
|
-
back_url = @options[:back_url]
|
12
|
-
ApplicationController.renderer.render partial: 'promethee/edit', locals: { master_data: master_data, back_url: back_url }
|
9
|
+
@options[:master_data] = object.send @method_name unless object.nil? || @options.include? :value
|
10
|
+
ApplicationController.renderer.render partial: 'promethee/edit', locals: @options
|
13
11
|
end
|
14
12
|
end
|
15
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: promethee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julien Dargelos
|
@@ -13,7 +13,7 @@ authors:
|
|
13
13
|
autorequire:
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
|
-
date: 2018-05-
|
16
|
+
date: 2018-05-14 00:00:00.000000000 Z
|
17
17
|
dependencies:
|
18
18
|
- !ruby/object:Gem::Dependency
|
19
19
|
name: rails
|