scrivito_highlightjs_widget 1.0.6 → 1.0.7
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1bced7243e33b159af8cfa8286b9ca251a5f96cc
|
4
|
+
data.tar.gz: 84d0aed7dc248f2f1090336bfcb3f010776546a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ce283ecff1dd4397e74137c1cf6b4f884d21ec5f3d081e4e9f007b7171e682eaf281565ab2a5bbc8dbc5b99ded06f1d6680b46b6f0793d905bc5877ecfc1005
|
7
|
+
data.tar.gz: 708a4f088f29bddee9d3164205da0ed1ea520bc0239a9ae02d64fc565f57e1a007d4fa1896b487f0e54c54be02b6b704611c847959798fc5d6b82030f0d98e34
|
@@ -1,25 +1,25 @@
|
|
1
1
|
(function($, App) {
|
2
2
|
'use strict';
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
var text = cmsField.val();
|
12
|
-
return cmsField.scrivito('save', text);
|
13
|
-
}
|
14
|
-
};
|
4
|
+
var TextAreaEditor = {
|
5
|
+
init_function: function(scrivito_tag) {
|
6
|
+
$(scrivito_tag).on('keyup', function() {
|
7
|
+
$(scrivito_tag).scrivito('save', scrivito_tag.value);
|
8
|
+
});
|
9
|
+
}
|
10
|
+
};
|
15
11
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
12
|
+
scrivito.on('content', function() {
|
13
|
+
if(scrivito.in_editable_view()) {
|
14
|
+
scrivito.define_editor("text_area_editor", {
|
15
|
+
can_edit: function(element) {
|
16
|
+
return $(element).is('textarea.form-control');
|
17
|
+
},
|
18
|
+
activate: function(element) {
|
19
|
+
TextAreaEditor.init_function(element);
|
20
20
|
}
|
21
21
|
});
|
22
|
-
}
|
22
|
+
}
|
23
23
|
});
|
24
24
|
|
25
25
|
})(jQuery, this);
|
@@ -1,15 +1,15 @@
|
|
1
|
-
<%= scrivito_details_for 'Code' do %>
|
1
|
+
<%= scrivito_details_for t('scrivito_highlightjs_widget.details.code', default: 'Code') do %>
|
2
2
|
<pre class="highlightjs">
|
3
|
-
<%= scrivito_tag(:textarea, widget, :code,
|
3
|
+
<%= scrivito_tag(:textarea, widget, :code, class: 'form-control', rows: 5) %>
|
4
4
|
</pre>
|
5
5
|
<% end %>
|
6
6
|
|
7
|
-
<%= scrivito_details_for 'Language' do %>
|
7
|
+
<%= scrivito_details_for t('scrivito_highlightjs_widget.details.language', default: 'Language') do %>
|
8
8
|
<div class="alert alert-info">
|
9
|
-
If automatic
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
<%= t('scrivito_highlightjs_widget.thumbnail.hint', default: 'If the automatic code highlighting does not work for you.') %>
|
10
|
+
</div>
|
11
|
+
<div class="alert alert-info">
|
12
|
+
<%= t('scrivito_highlightjs_widget.thumbnail.no_highlight', default: 'Enter nohighligh if no highlighting needed.') %>
|
13
13
|
</div>
|
14
14
|
<%= scrivito_tag(:div, widget, :language) %>
|
15
15
|
<% end %>
|
@@ -1,3 +1,3 @@
|
|
1
|
-
<%= scrivito_thumbnail '
|
2
|
-
Highlight your Source Code
|
1
|
+
<%= scrivito_thumbnail t('scrivito_highlightjs_widget.thumbnail.title', default: 'Syntx Highlighter'), image_tag("highlight.png") do %>
|
2
|
+
<%= t('scrivito_highlightjs_widget.thumbnail.description', default: 'Highlight your Source Code') %>
|
3
3
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scrivito_highlightjs_widget
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scrivito
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-08-
|
11
|
+
date: 2016-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: scrivito
|