biola_wcms_components 0.19.0 → 0.20.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 64707a51133721274a2d1442ff6c3bedcaa1cbc5
4
- data.tar.gz: 595b3c6481b8b71436e1abd48406543a6e0bec26
3
+ metadata.gz: b158bd9bf510455b661fda12814fc8efcebfe396
4
+ data.tar.gz: 2fc64c316eb4b9da4874c4e0379dba85a468ba54
5
5
  SHA512:
6
- metadata.gz: 51605effdefc964f3070b01ee305995b7af9eb392cb6e0c8c4498deb73181a6b68ae8b287ab34f1f72812815b82f3a63a0e3a7352cb44e48d82e97cea7c5f2ab
7
- data.tar.gz: 2ce7582ef2f4a1930c3963b611e4497753573c82e67bbda611077fdf3bec681287e2e924d05e7d64b9f189e2162a3f9118a63adf55b34197ad2eae964bc73c34
6
+ metadata.gz: e656f49021d1c0310014d25a0fdd3f192df6ef0e25a447a0e8794b155f7849c39551afefb2064535ba264407c5c423d7bd334d89afaa95ccddaab817916c0db9
7
+ data.tar.gz: f6f4e8c20d64e527364fe073a9787585cc92bd10ca88095a161b4c935cd842df974b5f63de5d389e8f7dbc9bf19b363f54586673de212b97a6b559613001a41c
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ### Master (unreleased)
4
4
 
5
+ ### 0.20.0
6
+
7
+ * Added Ace components for js and css text-area rendering of design elements for page editions.
8
+
5
9
  ### 0.19.0
6
10
 
7
11
  * Added Changes class for history tracking
@@ -12,8 +16,8 @@
12
16
 
13
17
  ### 0.18.0
14
18
 
15
- * collection select can set include blank with a message
16
- * redactor toolbar z-index fix
19
+ * Collection select can set include blank with a message
20
+ * Redactor toolbar z-index fix
17
21
 
18
22
  ### 0.17.0
19
23
 
@@ -1,5 +1,7 @@
1
1
  #= require ace/ace
2
2
  #= require ace/mode-yaml
3
+ #= require ace/mode-javascript
4
+ #= require ace/mode-css
3
5
  #= require ace/mode-json
4
6
  #= require ace/worker-json
5
7
  #
@@ -0,0 +1,20 @@
1
+ $(document).ready ->
2
+ $('.ace_css_editor').each ->
3
+ editor_area = document.createElement('div')
4
+ this.appendChild(editor_area)
5
+
6
+ # Initialize Ace Editor
7
+ editor = ace.edit(editor_area)
8
+ editor.getSession().setMode("ace/mode/css")
9
+ editor.getSession().setTabSize(2)
10
+ editor.getSession().setUseWrapMode(true);
11
+ editor.setPrintMarginColumn(800)
12
+ editor.setOptions({
13
+ minLines: 8,
14
+ maxLines: Infinity
15
+ });
16
+
17
+ textarea = $(this).children('textarea').hide()
18
+ editor.getSession().setValue textarea.val()
19
+ editor.getSession().on "change", ->
20
+ textarea.val editor.getSession().getValue()
@@ -0,0 +1,20 @@
1
+ $(document).ready ->
2
+ $('.ace_javascript_editor').each ->
3
+ editor_area = document.createElement('div')
4
+ this.appendChild(editor_area)
5
+
6
+ # Initialize Ace Editor
7
+ editor = ace.edit(editor_area)
8
+ editor.getSession().setMode("ace/mode/javascript")
9
+ editor.getSession().setTabSize(2)
10
+ editor.getSession().setUseWrapMode(true);
11
+ editor.setPrintMarginColumn(800)
12
+ editor.setOptions({
13
+ minLines: 8,
14
+ maxLines: Infinity
15
+ });
16
+
17
+ textarea = $(this).children('textarea').hide()
18
+ editor.getSession().setValue textarea.val()
19
+ editor.getSession().on "change", ->
20
+ textarea.val editor.getSession().getValue()
@@ -36,4 +36,3 @@ $(document).ready ->
36
36
  e.stopPropagation()
37
37
  fileUploader.sendFileToServer e.dataTransfer.files[0], 'embedded_image', (url) ->
38
38
  editor.insert('"' + url + '"')
39
-
@@ -0,0 +1,16 @@
1
+ / Example
2
+ / = wcms_component 'forms/css_editor',
3
+ / form: f,
4
+ / attribute: :design_css,
5
+ / value: @page_edition.design_css
6
+ /
7
+
8
+ ruby:
9
+ form ||= nil
10
+ attribute ||= nil
11
+ html_class ||= 'form-control'
12
+ value ||= nil
13
+ embedded_image_url ||= wcms_components_embedded_images_url
14
+
15
+ .ace_css_editor
16
+ = wcms_component("forms/text_area", {form: form, attribute: attribute, html_class: html_class, value: value})
@@ -0,0 +1,16 @@
1
+ / Example
2
+ / = wcms_component 'forms/javascript_editor',
3
+ / form: f,
4
+ / attribute: :design_javascript,
5
+ / value: @page_edition.design_javascript
6
+ /
7
+
8
+ ruby:
9
+ form ||= nil
10
+ attribute ||= nil
11
+ html_class ||= 'form-control'
12
+ value ||= nil
13
+ embedded_image_url ||= wcms_components_embedded_images_url
14
+
15
+ .ace_javascript_editor
16
+ = wcms_component("forms/text_area", {form: form, attribute: attribute, html_class: html_class, value: value})
@@ -1,3 +1,3 @@
1
1
  module BiolaWcmsComponents
2
- VERSION = "0.19.0"
2
+ VERSION = "0.20.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: biola_wcms_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hall
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-02 00:00:00.000000000 Z
11
+ date: 2015-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ace-rails-ap
@@ -165,7 +165,9 @@ files:
165
165
  - Rakefile
166
166
  - app/assets/images/.gitkeep
167
167
  - app/assets/javascripts/biola-wcms-components.js.coffee
168
+ - app/assets/javascripts/components/forms/css_editor.js.coffee
168
169
  - app/assets/javascripts/components/forms/gallery_photo.js.coffee
170
+ - app/assets/javascripts/components/forms/javascript_editor.js.coffee
169
171
  - app/assets/javascripts/components/forms/json_editor.js.coffee
170
172
  - app/assets/javascripts/components/forms/multiselect.js.coffee
171
173
  - app/assets/javascripts/components/forms/person_lookup.js.coffee
@@ -204,9 +206,11 @@ files:
204
206
  - app/views/wcms_components/changes/_changes.html.slim
205
207
  - app/views/wcms_components/changes/index.html.slim
206
208
  - app/views/wcms_components/changes/object_index.html.slim
209
+ - app/views/wcms_components/forms/_css_editor.html.slim
207
210
  - app/views/wcms_components/forms/_data_template_picker.html.slim
208
211
  - app/views/wcms_components/forms/_date.html.slim
209
212
  - app/views/wcms_components/forms/_datetime.html.slim
213
+ - app/views/wcms_components/forms/_javascript_editor.html.slim
210
214
  - app/views/wcms_components/forms/_json_editor.html.slim
211
215
  - app/views/wcms_components/forms/_multiselect.html.slim
212
216
  - app/views/wcms_components/forms/_person_lookup.html.slim