activeadmin_trumbowyg 0.2.0 → 0.2.4

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
  SHA256:
3
- metadata.gz: a39bc4ba3b6f2e02ceae34f4eb6387d202244ae79ddb3ddf055284e7cdb6cd5d
4
- data.tar.gz: 0bd93b2b9731ccc6435fb78aadef63278056d0d3a62467ffce24914b6f4ffb1b
3
+ metadata.gz: 2135ec8b6b680c3eaa9aa9ad24dcb095c8ecb8a3818f24eda7204ef9120805f2
4
+ data.tar.gz: dd969ae0f3d7ef14ae838704edb09ee55b992b9187da9377c640dfde4007722d
5
5
  SHA512:
6
- metadata.gz: 9e60dc5fb8ac876242f7b79fed94cf9e823250613dc0474f023332e0815a00f83d0335b967bd3ab08b04d4999c0cc4cb1db75db7cbb26028a2a262c35e3f3376
7
- data.tar.gz: a8cbca238c44daa9216b78c9b991cfba591a8be46612cf6653a2c44e14e3aca09e510d4d436360cfb4232f0bf54ab707cb0b65b60a2b2a59254a0fe15fc91fbe
6
+ metadata.gz: e9f58979d6e70d1deb175a4393eb12513c6f9c05248efeff7586c06bc43136d0d9d578fb8c5a50f2e62ede2175e6a75ac1adfb1e14b674c5f36bafa47e071fed
7
+ data.tar.gz: fff726c5cf4423c19dabcc20ed9681ea505479df1fa4b8895c93694b666187f6104dd0e68ad93b5a235358294e755e09380e78ea641663ae6db8e494edd3d5b7
@@ -1,4 +1,4 @@
1
- Copyright (c) 2017 Mattia Roccoberton
1
+ Copyright (c) 2017-2020 Mattia Roccoberton
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # ActiveAdmin Trumbowyg [![Gem Version](https://badge.fury.io/rb/activeadmin_trumbowyg.svg)](https://badge.fury.io/rb/activeadmin_trumbowyg)
1
+ # ActiveAdmin Trumbowyg [![Gem Version](https://badge.fury.io/rb/activeadmin_trumbowyg.svg)](https://badge.fury.io/rb/activeadmin_trumbowyg) [![CircleCI](https://circleci.com/gh/blocknotes/activeadmin_trumbowyg.svg?style=svg)](https://circleci.com/gh/blocknotes/activeadmin_trumbowyg)
2
2
 
3
3
  An Active Admin plugin to use [Trumbowyg Editor](https://alex-d.github.io/Trumbowyg/)
4
4
 
@@ -22,6 +22,8 @@ An Active Admin plugin to use [Trumbowyg Editor](https://alex-d.github.io/Trumbo
22
22
 
23
23
  Why 2 separated scripts? In this way you can include a different version of *trumbowyg editor* if you like.
24
24
 
25
+ > **UPDATE FROM VERSION < 2.0**: please change the Trumbowyg line in your _app/assets/stylesheets/active_admin.scss_ to: `@import 'activeadmin/trumbowyg/trumbowyg';`
26
+
25
27
  ## Options
26
28
 
27
29
  **data-options**: permits to set *trumbowyg editor* options directly - see [options list](https://alex-d.github.io/Trumbowyg/documentation/)
data/Rakefile CHANGED
@@ -1,3 +1,3 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- require "bundler/gem_tasks"
3
+ require 'bundler/gem_tasks'
@@ -0,0 +1,67 @@
1
+ body.active_admin {
2
+ .trumbowyg-box {
3
+ border: 1px solid #c9d0d6;
4
+ border-radius: 3px;
5
+ display: inline-block;
6
+ margin-top: 0;
7
+ margin-bottom: 0;
8
+ width: calc(80% - 2px);
9
+
10
+ button {
11
+ background: transparent;
12
+ border-radius: 0;
13
+ box-shadow: none;
14
+ color: #222;
15
+ text-shadow: none;
16
+ }
17
+
18
+ textarea {
19
+ border: 0 none;
20
+ display: block;
21
+ }
22
+
23
+ >.trumbowyg-editor {
24
+ background-color: #fff;
25
+
26
+ // reset internal elements
27
+ * {
28
+ margin: initial;
29
+ padding: initial;
30
+ text-align: initial;
31
+ }
32
+
33
+ p {
34
+ margin-bottom: 1em;
35
+ }
36
+
37
+ ol {
38
+ list-style-type: decimal;
39
+ }
40
+
41
+ ul {
42
+ list-style-type: disc;
43
+ }
44
+
45
+ ul, ol {
46
+ margin: 0 1.5em 1.5em 0;
47
+ padding-left: 1.5em;
48
+ }
49
+ }
50
+
51
+ .trumbowyg-button-pane {
52
+ background: transparent;
53
+ border-bottom: 0 none;
54
+ }
55
+ }
56
+
57
+ .trumbowyg-modal {
58
+ .trumbowyg-modal-button {
59
+ line-height: initial;
60
+ text-shadow: none;
61
+ }
62
+ }
63
+
64
+ .field_with_errors >.trumbowyg-box {
65
+ border: 1px solid #932419;
66
+ }
67
+ }
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'activeadmin/trumbowyg/engine'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'active_admin'
2
4
 
3
5
  module ActiveAdmin
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module ActiveAdmin
2
4
  module Trumbowyg
3
- VERSION = '0.2.0'
5
+ VERSION = '0.2.4'
4
6
  end
5
7
  end
@@ -1,3 +1,4 @@
1
- require 'activeadmin/trumbowyg'
1
+ # frozen_string_literal: true
2
2
 
3
+ require 'activeadmin/trumbowyg'
3
4
  require 'formtastic/inputs/trumbowyg_input'
@@ -1,10 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Formtastic
2
4
  module Inputs
3
5
  class TrumbowygInput < Formtastic::Inputs::TextInput
4
6
  def to_html
5
7
  input_wrapping do
6
- label_html <<
7
- builder.text_area( method, input_html_options.merge( class: 'trumbowyg-textarea' ) )
8
+ label_html << builder.text_area(method, input_html_options.merge(class: 'trumbowyg-textarea'))
8
9
  end
9
10
  end
10
11
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'fileutils'
2
4
 
3
5
  namespace :trumbowyg do
@@ -6,13 +8,13 @@ namespace :trumbowyg do
6
8
  # include ActionView::Helpers::AssetUrlHelper
7
9
  # p font_path( 'active_admin-trumbowyg.svg' )
8
10
 
9
- fingerprint = /\-[0-9a-f]{32,64}\./
11
+ fingerprint = /-[0-9a-f]{32,64}\./
10
12
  path = Rails.root.join( 'public/assets/active_admin-trumbowyg*' )
11
13
 
12
14
  Dir[path].each do |file|
13
15
  next unless file =~ fingerprint
14
- nondigest = file.sub fingerprint, '.'
15
16
 
17
+ nondigest = file.sub fingerprint, '.'
16
18
  if !File.exist?(nondigest) || File.mtime(file) > File.mtime(nondigest)
17
19
  FileUtils.cp file, nondigest, verbose: true, preserve: true
18
20
  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.2.0
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mattia Roccoberton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-01 00:00:00.000000000 Z
11
+ date: 2020-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeadmin
@@ -109,33 +109,33 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: 4.0.1
111
111
  - !ruby/object:Gem::Dependency
112
- name: selenium-webdriver
112
+ name: rubocop
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 3.142.7
117
+ version: 0.90.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 3.142.7
124
+ version: 0.90.0
125
125
  - !ruby/object:Gem::Dependency
126
- name: simplecov
126
+ name: selenium-webdriver
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: 0.19.0
131
+ version: 3.142.7
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
136
  - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: 0.19.0
138
+ version: 3.142.7
139
139
  - !ruby/object:Gem::Dependency
140
140
  name: sqlite3
141
141
  requirement: !ruby/object:Gem::Requirement
@@ -323,7 +323,7 @@ files:
323
323
  - app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.js
324
324
  - app/assets/javascripts/activeadmin/trumbowyg/trumbowyg.min.js
325
325
  - app/assets/javascripts/activeadmin/trumbowyg_input.js
326
- - app/assets/stylesheets/activeadmin/_trumbowyg_input.sass
326
+ - app/assets/stylesheets/activeadmin/_trumbowyg_input.scss
327
327
  - app/assets/stylesheets/activeadmin/trumbowyg/trumbowyg.scss
328
328
  - lib/activeadmin/trumbowyg.rb
329
329
  - lib/activeadmin/trumbowyg/engine.rb
@@ -1,56 +0,0 @@
1
- @font-face
2
- font-family: 'trumbowyg-icons'
3
- font-weight: normal
4
- font-style: normal
5
- src: font-url('active_admin-trumbowyg.svg')
6
-
7
- body.active_admin form .trumbowyg-box
8
- display: inline-block
9
- width: calc(80% - 22px)
10
- button
11
- background: transparent
12
- border-radius: 0
13
- box-shadow: none
14
- color: #222
15
- text-shadow: none
16
- // &:hover, &.trumbowyg-active, &.trumbowyg-active-button
17
- // background: transparent
18
- textarea
19
- border: 0 none
20
- display: block
21
- >.trumbowyg-editor
22
- background-color: #fff
23
- // reset internal elements
24
- *
25
- margin: initial
26
- padding: initial
27
- text-align: initial
28
- p
29
- margin-bottom: 1em
30
- ol
31
- list-style-type: decimal
32
- ul
33
- list-style-type: disc
34
- ul, ol
35
- margin: 0 1.5em 1.5em 0
36
- padding-left: 1.5em
37
- .trumbowyg-button-pane
38
- background: transparent
39
- border-bottom: 0 none
40
- .trumbowyg-dropdown >button:hover
41
- background-color: #ecf0f1
42
- .trumbowyg-modal
43
- input[type="text"]
44
- border: 1px solid #DEDEDE
45
- height: 27px
46
- min-width: auto
47
- width: 70%
48
- label
49
- float: none
50
- font-weight: normal
51
- height: 27px
52
- width: auto
53
- .trumbowyg-modal-button
54
- line-height: initial
55
- &.trumbowyg-modal-submit
56
- color: #fff