activeadmin_trumbowyg 0.1.1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/app/assets/fonts/{ui/icons.svg → active_admin-trumbowyg.svg} +0 -0
- data/app/assets/javascripts/activeadmin/trumbowyg_input.js +3 -1
- data/app/assets/stylesheets/activeadmin/_trumbowyg_input.sass +6 -0
- data/lib/activeadmin/trumbowyg/version.rb +1 -1
- data/lib/tasks/trumbowyg.rake +21 -0
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36e41988cfed616a2afc9daa57fbda243e9f836f
|
4
|
+
data.tar.gz: f76c69872bab48d448a87120b868007283602d67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: babf60787336da6ab5db133c888f1cf6cab5cac482f0056040464865fea59c82e08785ea730fb0fa7aaab33c2ef799442d538156f1ef3da42fb38f8df2bb4c4a
|
7
|
+
data.tar.gz: d3e0e7a888123089d20ad3bedb27eccbdb41052c058eb338b39169ce46d9f249a6ba26bc03247590e7a24009bb9f735a723538c66ae84e5812bfc9baaa5a998d
|
data/README.md
CHANGED
@@ -18,6 +18,7 @@ An Active Admin plugin to use [Trumbowyg Editor](https://alex-d.github.io/Trumbo
|
|
18
18
|
//= require activeadmin/trumbowyg_input
|
19
19
|
```
|
20
20
|
- Use the input with `as: :trumbowyg` in Active Admin model conf
|
21
|
+
- To fix icons in production execute the task: `rake trumbowyg:nondigest` (or `rails trumbowyg:nondigest` for Rails 5.x)
|
21
22
|
|
22
23
|
Why 2 separated scripts? In this way you can include a different version of *trumbowyg editor* if you like.
|
23
24
|
|
File without changes
|
@@ -1,6 +1,8 @@
|
|
1
1
|
$(document).ready( function() {
|
2
2
|
$('.trumbowyg-textarea').each(function () {
|
3
|
-
var options = {
|
3
|
+
var options = {
|
4
|
+
svgPath: '/assets/active_admin-trumbowyg.svg'
|
5
|
+
};
|
4
6
|
options = $.extend({}, options, $(this).data( 'options' ));
|
5
7
|
$(this).trumbowyg( options );
|
6
8
|
});
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
3
|
+
namespace :trumbowyg do
|
4
|
+
desc 'Create nondigest versions of all trumbowyg digest assets'
|
5
|
+
task nondigest: :environment do
|
6
|
+
# include ActionView::Helpers::AssetUrlHelper
|
7
|
+
# p font_path( 'active_admin-trumbowyg.svg' )
|
8
|
+
|
9
|
+
fingerprint = /\-[0-9a-f]{32,64}\./
|
10
|
+
path = Rails.root.join( 'public/assets/active_admin-trumbowyg*' )
|
11
|
+
|
12
|
+
Dir[path].each do |file|
|
13
|
+
next unless file =~ fingerprint
|
14
|
+
nondigest = file.sub fingerprint, '.'
|
15
|
+
|
16
|
+
if !File.exist?(nondigest) || File.mtime(file) > File.mtime(nondigest)
|
17
|
+
FileUtils.cp file, nondigest, verbose: true, preserve: true
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_trumbowyg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mattia Roccoberton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|
@@ -36,7 +36,7 @@ files:
|
|
36
36
|
- README.md
|
37
37
|
- Rakefile
|
38
38
|
- activeadmin_trumbowyg.gemspec
|
39
|
-
- app/assets/fonts/
|
39
|
+
- app/assets/fonts/active_admin-trumbowyg.svg
|
40
40
|
- app/assets/javascripts/activeadmin/trumbowyg/langs/ar.min.js
|
41
41
|
- app/assets/javascripts/activeadmin/trumbowyg/langs/bg.min.js
|
42
42
|
- app/assets/javascripts/activeadmin/trumbowyg/langs/by.min.js
|
@@ -190,6 +190,7 @@ files:
|
|
190
190
|
- lib/activeadmin/trumbowyg/version.rb
|
191
191
|
- lib/activeadmin_trumbowyg.rb
|
192
192
|
- lib/formtastic/inputs/trumbowyg_input.rb
|
193
|
+
- lib/tasks/trumbowyg.rake
|
193
194
|
- screenshot.jpg
|
194
195
|
homepage: https://github.com/blocknotes/activeadmin_trumbowyg
|
195
196
|
licenses:
|