activeadmin_tinymce 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8b5abd9c465e64a8acf2753315015a0172af6b62
4
- data.tar.gz: dee8faafefe5dbdc3a2a5ad1cfa587ad51d4dfdb
3
+ metadata.gz: c65e2e67c3a4a1cd9798e77742d7e14dfd945bfe
4
+ data.tar.gz: 3aa23549d358f5ebc19c303675bbb84ddee7933c
5
5
  SHA512:
6
- metadata.gz: 80d7433afa69c6e3dd200a075ca71e56fd22eab96b0d0430c840d2e79435a7a7d29dc0b49b80c3070a52f901ce0d67d4d7a568c3aa787936360eeea3b69a0987
7
- data.tar.gz: 10e8929f112809a566e57d3e1f23372f541da3d1a67b0699a0baf6f24a9fabff7a57a0c7f7a1795f6e929efa4e50825505f8ff44797f47d2ffc644f8a9443f21
6
+ metadata.gz: 48433dd9f8376783bd46232875daca17d1c08b5de24a43e84de69e34fa8b516c081d30b0f850aa7a7abb030658d08695c20a5f36576b43918ea2573e6dd4e18d
7
+ data.tar.gz: 8dbe81447ec48bd0fa00601c2da3670a1faa36a0962ae6ac0633208f149eb595ae2cdd2e439bfa1b068b71632ed0dc260d7cad4074d6ce36d0e983369fb2760e
@@ -8,6 +8,7 @@
8
8
  a.collection-image data-original="#{image.send(ActiveAdmin::Tinymce.attachment_attr_name).url(:original)}"
9
9
  img src="#{image.send(ActiveAdmin::Tinymce.attachment_attr_name).url(:thumb)}"
10
10
  div class="modal-footer"
11
+ = link_to 'Загрузить изображение', "/#{ActiveAdmin::Tinymce.admin_namespace}/#{ActiveAdmin::Tinymce.model_class.to_s.underscore.pluralize}/new"
11
12
  button type="button" class="btn btn-primary action-ok" Ok
12
13
  button type="button" data-dismiss="modal" class="btn close" Cancel
13
14
 
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module Tinymce
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
@@ -7,9 +7,11 @@ module ActiveAdmin
7
7
  mattr_accessor :attachment_attr_name
8
8
  @@attachment_attr_name = 'attachment'
9
9
 
10
+ mattr_accessor :admin_namespace
11
+ @@admin_namespace = 'admin'
12
+
10
13
  def self.setup
11
14
  yield self
12
15
  end
13
-
14
16
  end
15
17
  end
@@ -8,7 +8,7 @@ init = function() {
8
8
  type: 'get',
9
9
  url: '/modal',
10
10
  success: function(response){
11
- $('form').append(response)
11
+ $('form').append(response);
12
12
  window.modal = new(Modal);
13
13
  }
14
14
  })
@@ -23,7 +23,17 @@ init = function() {
23
23
  "searchreplace visualblocks code fullscreen",
24
24
  "insertdatetime media table contextmenu paste"
25
25
  ],
26
- toolbar: "insertfile vundo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
26
+ style_formats: [
27
+ {
28
+ title: 'Основной текст',
29
+ block: 'p'
30
+ },{
31
+ title: 'Вставка',
32
+ block: 'p',
33
+ classes: 'colorado'
34
+ }
35
+ ],
36
+ toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image",
27
37
  setup : function(ed) {
28
38
  // Add a custom button
29
39
  ed.addButton('insertfile', {
@@ -42,7 +52,7 @@ init = function() {
42
52
  };
43
53
 
44
54
  remove = function() {
45
- tinymce.remove()
55
+ tinymce.remove();
46
56
  return
47
57
  };
48
58
  $(document).on('page:load', init);
@@ -14,5 +14,12 @@ ActiveAdmin::Tinymce.setup do |config|
14
14
  # Defaults:
15
15
  # config.attachment_attr_name = 'attachment'
16
16
 
17
+ # == Active Admin namespace
18
+ #
19
+ # Name of the admin's namespace
20
+ #
21
+ # Defaults:
22
+ # config.admin_namespace = 'admin'
23
+
17
24
 
18
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_tinymce
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kerweb development team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-01 00:00:00.000000000 Z
11
+ date: 2014-07-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -201,3 +201,4 @@ test_files:
201
201
  - test/functional/modal_controller_test.rb
202
202
  - test/unit/active_admin_tinymce_test.rb
203
203
  - test/test_helper.rb
204
+ has_rdoc: