inverter 0.4.5 → 0.4.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +21 -17
- data/app/assets/javascripts/inputs/inverter-version.coffee +1 -1
- data/lib/inverter/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12a7230b597dc15572b8618178eb9c352953b969
|
4
|
+
data.tar.gz: aa2971ee76741ae4de514e00e5a22adc299342e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a708e702055b46b28862aead41c79338d1a89a77005e354941047c2c0b2605ddc6903e2dd6a4bbcaa8e725f6d8d03715c43bf2461747864a48971b308d37c7e1
|
7
|
+
data.tar.gz: 629283f63e4dc504224ce6190d905736cccdddea0209ec9ae347a0a0ebe3aa3cd39c80c65ef0c850e955daeed729d332af39286055971cb6efec77f2c9ea04bf
|
data/README.md
CHANGED
@@ -22,10 +22,10 @@ Inverter.configure do |config|
|
|
22
22
|
config.template_folders = %w( pages )
|
23
23
|
|
24
24
|
# templates from template_folders the are not editable
|
25
|
-
config.
|
25
|
+
config.excluded_templates = %w( pages/home )
|
26
26
|
|
27
27
|
# disable Inverter middleware
|
28
|
-
config.
|
28
|
+
config.disable_middleware = false
|
29
29
|
end
|
30
30
|
```
|
31
31
|
|
@@ -127,20 +127,24 @@ Inverter supports [chr](https://github.com/slate-studio/chr) out of the box. Inc
|
|
127
127
|
#= require inverter
|
128
128
|
|
129
129
|
pagesConfig = ->
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
130
|
+
config =
|
131
|
+
disableNewItems: true
|
132
|
+
disableDelete: true
|
133
|
+
|
134
|
+
arrayStore: new RailsArrayStore({
|
135
|
+
resource: 'page'
|
136
|
+
path: '/admin/pages'
|
137
|
+
})
|
138
|
+
|
139
|
+
formSchema:
|
140
|
+
version: { type: 'inverter-version', path: '/admin/pages' }
|
141
|
+
_meta_title: { type: 'string', label: 'Title' }
|
142
|
+
_meta_description: { type: 'text', label: 'Description' }
|
143
|
+
_meta_keywords: { type: 'text', label: 'Keywords' }
|
144
|
+
_opengraph_image_url: { type: 'string', label: 'Image URL' }
|
145
|
+
_blocks: { type: 'inverter' }
|
146
|
+
|
147
|
+
return config
|
144
148
|
```
|
145
149
|
|
146
150
|
Inverer ```version``` input allows to select previous version of the page to edit.
|
@@ -148,7 +152,7 @@ Inverer ```version``` input allows to select previous version of the page to edi
|
|
148
152
|
Inverter input has an option ```defaultInputType``` that specifies what input type should be used as default, if nothing specified ```text``` is used. This might be set to WYSIWYG editor of your choice, e.g:
|
149
153
|
|
150
154
|
```coffeescript
|
151
|
-
|
155
|
+
_blocks: { type: 'inverter', defaultInputType: 'redactor' }
|
152
156
|
```
|
153
157
|
|
154
158
|
You can also specify input type that you want to use for specific block like this: ```<!--[ Main Body : text ]-->``` — in this case ```Main Body``` would be a label and ```text``` is an input type that will be used to edit this block in CMS.
|
@@ -17,7 +17,7 @@ class @InputInverterVersion extends InputSelect
|
|
17
17
|
@config.default = 0
|
18
18
|
@url = "#{ @config.path }/#{ @object._id }.json"
|
19
19
|
|
20
|
-
@$el =$ "<div class='input-#{ @config.type }
|
20
|
+
@$el =$ "<div class='input-#{ @config.type } #{ @config.klass } #{ @config.klassName }'>"
|
21
21
|
|
22
22
|
|
23
23
|
_add_input: ->
|
data/lib/inverter/version.rb
CHANGED