glebtv-ckeditor 4.5.10.1 → 4.5.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +5 -5
- data/app/controllers/ckeditor/attachment_files_controller.rb +1 -0
- data/app/controllers/ckeditor/pictures_controller.rb +2 -0
- data/app/views/ckeditor/shared/_asset.html.erb +2 -0
- data/app/views/ckeditor/shared/_asset_tmpl.html.erb +2 -0
- data/lib/ckeditor.rb +8 -2
- data/lib/ckeditor/backend/paperclip.rb +1 -1
- data/lib/ckeditor/version.rb +1 -1
- metadata +41 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d03c2e2c7f96737cad68a285e1f784078c30f5fc
|
4
|
+
data.tar.gz: 01caec07d8f358f80cacb4b59c84bd4b535de061
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbd6dd35ea3b3414de47799990a8a2e3ab6e77637f3ff53053f562287ca6fa08d8658b14c64fbdeba8fb60b69613dd9f48af31e651454bb808e18fb9c7b80044
|
7
|
+
data.tar.gz: 8a025d64952c1253662424990fc33f3eb0607739b104bdf718b34e5afdbcf3c0d8ab4d204a14e8e9512e216d5ac70d1198cae096eee161bdaa62fb8b6a06a1c4
|
data/Gemfile
CHANGED
@@ -2,7 +2,7 @@ source "http://rubygems.org"
|
|
2
2
|
|
3
3
|
gemspec
|
4
4
|
|
5
|
-
gem "rails", "4.2.
|
5
|
+
gem "rails", "4.2.7.1"
|
6
6
|
|
7
7
|
platforms :mri_18 do
|
8
8
|
group :test do
|
@@ -15,13 +15,13 @@ platforms :ruby do
|
|
15
15
|
gem "sqlite3"
|
16
16
|
|
17
17
|
group :development do
|
18
|
-
gem "unicorn"
|
18
|
+
gem "unicorn"
|
19
19
|
end
|
20
20
|
|
21
21
|
group :development, :test do
|
22
|
-
gem 'jquery-rails'
|
23
|
-
gem "capybara"
|
24
|
-
gem "mynyml-redgreen",
|
22
|
+
gem 'jquery-rails'
|
23
|
+
gem "capybara"
|
24
|
+
gem "mynyml-redgreen", :require => 'redgreen'
|
25
25
|
end
|
26
26
|
|
27
27
|
group :active_record do
|
@@ -1,4 +1,5 @@
|
|
1
1
|
<%= content_tag(:div, :id => dom_id(asset), :class => "gal-item", :"data-url" => image_path(asset.url_content)) do %>
|
2
|
+
<% if Ckeditor.can_delete then %>
|
2
3
|
<%= link_to image_tag('ckeditor/filebrowser/images/gal_del.png',
|
3
4
|
:title => I18n.t('ckeditor.buttons.delete')),
|
4
5
|
polymorphic_path(asset, :format => :json),
|
@@ -6,6 +7,7 @@
|
|
6
7
|
:method => :delete,
|
7
8
|
:data => {:confirm => t('ckeditor.confirm_delete')},
|
8
9
|
:class => "fileupload-cancel gal-del" %>
|
10
|
+
<% end %>
|
9
11
|
|
10
12
|
<div class="fileupload-file gal-inner-holder">
|
11
13
|
<div class="img"><%= image_tag(asset.url_thumb, :title => asset.filename) %></div>
|
@@ -1,5 +1,6 @@
|
|
1
1
|
<script id="fileupload_tmpl" type="text/x-jquery-tmpl">
|
2
2
|
<div id="asset_${id}" class="gal-item" data-url="${url_content}">
|
3
|
+
<% if Ckeditor.can_delete then %>
|
3
4
|
<%= link_to image_tag('ckeditor/filebrowser/images/gal_del.png',
|
4
5
|
:title => I18n.t('ckeditor.buttons.delete')),
|
5
6
|
"/ckeditor/${controller}/${id}.json",
|
@@ -7,6 +8,7 @@
|
|
7
8
|
:method => :delete,
|
8
9
|
:data => {:confirm => t('ckeditor.confirm_delete')},
|
9
10
|
:class => "fileupload-cancel gal-del" %>
|
11
|
+
<% end %>
|
10
12
|
|
11
13
|
<div class="fileupload-file gal-inner-holder">
|
12
14
|
<div class="img"><img src="${url_thumb}" title="${filename}"></div>
|
data/lib/ckeditor.rb
CHANGED
@@ -38,6 +38,9 @@ module Ckeditor
|
|
38
38
|
request.env["warden"].try(:user) || respond_to?(:current_user) && current_user
|
39
39
|
end
|
40
40
|
|
41
|
+
mattr_accessor :can_delete
|
42
|
+
@@can_delete = true
|
43
|
+
|
41
44
|
# Allowed image file types for upload.
|
42
45
|
# Set to nil or [] (empty array) for all file types
|
43
46
|
mattr_accessor :image_file_types
|
@@ -120,7 +123,10 @@ module Ckeditor
|
|
120
123
|
@@assets ||= if Ckeditor.cdn_enabled?
|
121
124
|
["ckeditor/config.js"]
|
122
125
|
else
|
123
|
-
Utils.select_assets("ckeditor", "vendor/assets/javascripts")
|
126
|
+
assets = Utils.select_assets("ckeditor", "vendor/assets/javascripts")
|
127
|
+
assets << "ckeditor/init.js"
|
128
|
+
assets << 'ckeditor/filebrowser/images/gal_del.png'
|
129
|
+
assets
|
124
130
|
end
|
125
131
|
end
|
126
132
|
|
@@ -235,4 +241,4 @@ require 'ckeditor/version'
|
|
235
241
|
|
236
242
|
if Object.const_defined?("RailsAdmin")
|
237
243
|
require "ckeditor/rails_admin/field"
|
238
|
-
end
|
244
|
+
end
|
@@ -9,7 +9,7 @@ module Ckeditor
|
|
9
9
|
module ClassMethods
|
10
10
|
def self.extended(base)
|
11
11
|
base.class_eval do
|
12
|
-
before_validation :extract_content_type
|
12
|
+
# before_validation :extract_content_type
|
13
13
|
before_create :read_dimensions, :parameterize_filename
|
14
14
|
|
15
15
|
delegate :url, :path, :styles, :size, :content_type, :to => :data
|
data/lib/ckeditor/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glebtv-ckeditor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.5.10.
|
4
|
+
version: 4.5.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- glebtv
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-08-
|
12
|
+
date: 2016-08-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: cocaine
|
@@ -568,61 +568,61 @@ signing_key:
|
|
568
568
|
specification_version: 4
|
569
569
|
summary: Rails gem for easy integration ckeditor in your application
|
570
570
|
test_files:
|
571
|
-
- test/
|
571
|
+
- test/integration/navigation_test.rb
|
572
572
|
- test/support/helpers.rb
|
573
|
-
- test/support/integration_case.rb
|
574
573
|
- test/support/raw_post.rb
|
574
|
+
- test/support/integration_case.rb
|
575
575
|
- test/support/routes.txt
|
576
|
+
- test/test_helper.rb
|
577
|
+
- test/functional/posts_controller_test.rb
|
576
578
|
- test/controllers/attachment_files_controller_test.rb
|
577
579
|
- test/controllers/pictures_controller_test.rb
|
578
|
-
- test/functional/posts_controller_test.rb
|
579
|
-
- test/orm/mongoid.rb
|
580
580
|
- test/orm/active_record.rb
|
581
|
-
- test/
|
582
|
-
- test/
|
583
|
-
- test/
|
584
|
-
- test/
|
585
|
-
- test/
|
586
|
-
- test/dummy/
|
587
|
-
- test/dummy/
|
588
|
-
- test/dummy/
|
581
|
+
- test/orm/mongoid.rb
|
582
|
+
- test/models/ckeditor_test.rb
|
583
|
+
- test/models/picture_test.rb
|
584
|
+
- test/models/attachment_file_test.rb
|
585
|
+
- test/models/utils_test.rb
|
586
|
+
- test/dummy/Rakefile
|
587
|
+
- test/dummy/app/assets/javascripts/application.js
|
588
|
+
- test/dummy/app/assets/stylesheets/application.css
|
589
|
+
- test/dummy/app/assets/stylesheets/scaffold.css
|
590
|
+
- test/dummy/app/controllers/posts_controller.rb
|
591
|
+
- test/dummy/app/controllers/application_controller.rb
|
589
592
|
- test/dummy/app/views/layouts/application.html.erb
|
590
|
-
- test/dummy/app/views/posts/edit.html.erb
|
591
|
-
- test/dummy/app/views/posts/new.html.erb
|
592
|
-
- test/dummy/app/views/posts/show.html.erb
|
593
593
|
- test/dummy/app/views/posts/_form.html.erb
|
594
|
+
- test/dummy/app/views/posts/show.html.erb
|
595
|
+
- test/dummy/app/views/posts/edit.html.erb
|
594
596
|
- test/dummy/app/views/posts/index.html.erb
|
595
|
-
- test/dummy/app/
|
596
|
-
- test/dummy/app/assets/stylesheets/application.css
|
597
|
-
- test/dummy/app/assets/javascripts/application.js
|
598
|
-
- test/dummy/app/helpers/posts_helper.rb
|
597
|
+
- test/dummy/app/views/posts/new.html.erb
|
599
598
|
- test/dummy/app/helpers/application_helper.rb
|
600
|
-
- test/dummy/app/
|
601
|
-
- test/dummy/app/controllers/posts_controller.rb
|
599
|
+
- test/dummy/app/helpers/posts_helper.rb
|
602
600
|
- test/dummy/app/models/post.rb
|
603
|
-
- test/dummy/
|
604
|
-
- test/dummy/Rakefile
|
601
|
+
- test/dummy/script/rails
|
605
602
|
- test/dummy/config/locales/en.yml
|
603
|
+
- test/dummy/config/application.rb
|
604
|
+
- test/dummy/config/boot.rb
|
605
|
+
- test/dummy/config/environments/development.rb
|
606
|
+
- test/dummy/config/environments/production.rb
|
607
|
+
- test/dummy/config/environments/test.rb
|
608
|
+
- test/dummy/config/secrets.yml
|
609
|
+
- test/dummy/config/database.yml
|
610
|
+
- test/dummy/config/initializers/mime_types.rb
|
606
611
|
- test/dummy/config/initializers/session_store.rb
|
607
612
|
- test/dummy/config/initializers/cookies_serializer.rb
|
608
613
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
609
|
-
- test/dummy/config/initializers/ckeditor.rb
|
610
614
|
- test/dummy/config/initializers/inflections.rb
|
615
|
+
- test/dummy/config/initializers/ckeditor.rb
|
611
616
|
- test/dummy/config/initializers/wrap_parameters.rb
|
612
|
-
- test/dummy/config/initializers/mime_types.rb
|
613
|
-
- test/dummy/config/secrets.yml
|
614
|
-
- test/dummy/config/routes.rb
|
615
|
-
- test/dummy/config/boot.rb
|
616
617
|
- test/dummy/config/mongoid.yml
|
617
|
-
- test/dummy/config/
|
618
|
-
- test/dummy/config/application.rb
|
618
|
+
- test/dummy/config/routes.rb
|
619
619
|
- test/dummy/config/environment.rb
|
620
|
-
- test/dummy/config
|
621
|
-
- test/dummy/
|
622
|
-
- test/dummy/
|
623
|
-
- test/
|
624
|
-
- test/
|
625
|
-
- test/
|
626
|
-
- test/
|
627
|
-
- test/
|
628
|
-
- test/
|
620
|
+
- test/dummy/config.ru
|
621
|
+
- test/dummy/public/500.html
|
622
|
+
- test/dummy/public/422.html
|
623
|
+
- test/dummy/public/favicon.ico
|
624
|
+
- test/dummy/public/404.html
|
625
|
+
- test/dummy/test/fixtures/files/rails.png
|
626
|
+
- test/dummy/test/fixtures/files/rails.tar.gz
|
627
|
+
- test/dummy/db/migrate/20110623120047_create_posts.rb
|
628
|
+
- test/generators/install_generator_test.rb
|