biola_wcms_components 0.23.0 → 0.24.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/app/assets/javascripts/components/forms/{css_editor.js.coffee → code_editor.js.coffee} +3 -2
- data/app/views/wcms_components/forms/_code_editor.html.slim +22 -0
- data/app/views/wcms_components/forms/_css_editor.html.slim +3 -16
- data/app/views/wcms_components/forms/_javascript_editor.html.slim +3 -16
- data/app/views/wcms_components/forms/_json_editor.html.slim +3 -12
- data/lib/biola_wcms_components/version.rb +1 -1
- metadata +5 -6
- data/app/assets/javascripts/components/forms/javascript_editor.js.coffee +0 -20
- data/app/assets/javascripts/components/forms/json_editor.js.coffee +0 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fd07286ef38a9251dce1dccc510abd28694994b6
|
4
|
+
data.tar.gz: 802427f5cfde791f02c9d1173d42b85a7ff76c10
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 835ecf1613b5e2c8fcfb840b10fa4e26e78e86510c573809663a8be2c535da159b1f0e6265d3d7a5c4bd3985a3cc46c81e93f2933dceb4a36e4c0629eda4779f
|
7
|
+
data.tar.gz: 7a7dbb25f52078c1b4bb10859f20740ce02432ad4f6087c91ee5cb7c36da0bbb8f189b84b3e8d73cc99ad45a3982c1ae0a78db7b82fca9ed517332a4821c4b3c
|
data/CHANGELOG.md
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
$(document).ready ->
|
2
|
-
$('.
|
2
|
+
$('.ace_code_editor').each ->
|
3
3
|
editor_area = document.createElement('div')
|
4
4
|
this.appendChild(editor_area)
|
5
|
+
mode = "ace/mode/" + this.dataset.mode
|
5
6
|
|
6
7
|
# Initialize Ace Editor
|
7
8
|
editor = ace.edit(editor_area)
|
8
|
-
editor.getSession().setMode(
|
9
|
+
editor.getSession().setMode(mode)
|
9
10
|
editor.getSession().setTabSize(2)
|
10
11
|
editor.getSession().setUseWrapMode(true);
|
11
12
|
editor.setPrintMarginColumn(800)
|
@@ -0,0 +1,22 @@
|
|
1
|
+
/ Example
|
2
|
+
/ = wcms_component 'forms/code_editor',
|
3
|
+
/ form: f,
|
4
|
+
/ mode: 'html',
|
5
|
+
/ attribute: :design_javascript,
|
6
|
+
/ value: @page_edition.design_javascript
|
7
|
+
/
|
8
|
+
|
9
|
+
ruby:
|
10
|
+
form ||= nil
|
11
|
+
attribute ||= nil
|
12
|
+
html_class ||= 'form-control'
|
13
|
+
value ||= nil
|
14
|
+
mode ||= 'html'
|
15
|
+
#embedded_image_url ||= wcms_components_embedded_images_url
|
16
|
+
|
17
|
+
/ TODO: do we need this? It was being used in the json_editor, but I don't think we
|
18
|
+
/ are using it anymore.
|
19
|
+
/ = wcms_component("shared/embedded_image_uploader", embedded_image_url: embedded_image_url)
|
20
|
+
|
21
|
+
.ace_code_editor data-mode=mode
|
22
|
+
= wcms_component("forms/text_area", {form: form, attribute: attribute, html_class: html_class, value: value})
|
@@ -1,16 +1,3 @@
|
|
1
|
-
/
|
2
|
-
|
3
|
-
/
|
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})
|
1
|
+
/ Depricated, use forms/code_editor instead
|
2
|
+
- local_assigns[:mode] = 'css'
|
3
|
+
= wcms_component("forms/code_editor", local_assigns)
|
@@ -1,16 +1,3 @@
|
|
1
|
-
/
|
2
|
-
|
3
|
-
/
|
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
|
+
/ Depricated, use forms/code_editor instead
|
2
|
+
- local_assigns[:mode] = 'javascript'
|
3
|
+
= wcms_component("forms/code_editor", local_assigns)
|
@@ -1,12 +1,3 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
html_class ||= 'form-control json_editor'
|
5
|
-
value ||= nil
|
6
|
-
embedded_image_url ||= wcms_components_embedded_images_url
|
7
|
-
|
8
|
-
|
9
|
-
= wcms_component("shared/embedded_image_uploader", embedded_image_url: embedded_image_url)
|
10
|
-
|
11
|
-
.ace_json_editor
|
12
|
-
= wcms_component("forms/text_area", {form: form, attribute: attribute, html_class: html_class, value: value})
|
1
|
+
/ Depricated, use forms/code_editor instead
|
2
|
+
- local_assigns[:mode] = 'json'
|
3
|
+
= wcms_component("forms/code_editor", local_assigns)
|
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.
|
4
|
+
version: 0.24.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: 2016-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ace-rails-ap
|
@@ -209,10 +209,8 @@ files:
|
|
209
209
|
- Rakefile
|
210
210
|
- app/assets/images/.gitkeep
|
211
211
|
- app/assets/javascripts/biola-wcms-components.js.coffee
|
212
|
-
- app/assets/javascripts/components/forms/
|
212
|
+
- app/assets/javascripts/components/forms/code_editor.js.coffee
|
213
213
|
- app/assets/javascripts/components/forms/gallery_photo.js.coffee
|
214
|
-
- app/assets/javascripts/components/forms/javascript_editor.js.coffee
|
215
|
-
- app/assets/javascripts/components/forms/json_editor.js.coffee
|
216
214
|
- app/assets/javascripts/components/forms/multiselect.js.coffee
|
217
215
|
- app/assets/javascripts/components/forms/person_lookup.js.coffee
|
218
216
|
- app/assets/javascripts/components/forms/presentation_data_editor.js.coffee
|
@@ -250,6 +248,7 @@ files:
|
|
250
248
|
- app/views/wcms_components/changes/_changes.html.slim
|
251
249
|
- app/views/wcms_components/changes/index.html.slim
|
252
250
|
- app/views/wcms_components/changes/object_index.html.slim
|
251
|
+
- app/views/wcms_components/forms/_code_editor.html.slim
|
253
252
|
- app/views/wcms_components/forms/_css_editor.html.slim
|
254
253
|
- app/views/wcms_components/forms/_data_template_picker.html.slim
|
255
254
|
- app/views/wcms_components/forms/_date.html.slim
|
@@ -311,7 +310,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
311
310
|
version: '0'
|
312
311
|
requirements: []
|
313
312
|
rubyforge_project:
|
314
|
-
rubygems_version: 2.
|
313
|
+
rubygems_version: 2.5.1
|
315
314
|
signing_key:
|
316
315
|
specification_version: 4
|
317
316
|
summary: Reusable UX components for use in or WCMS projects
|
@@ -1,20 +0,0 @@
|
|
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()
|
@@ -1,20 +0,0 @@
|
|
1
|
-
$(document).ready ->
|
2
|
-
$('.ace_json_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/json")
|
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()
|