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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aedbedce984ba1cd48756ae9beddab7319538b2b
4
- data.tar.gz: da7f8b87b067a89cdeec278527a00a7ba3f81016
3
+ metadata.gz: d03c2e2c7f96737cad68a285e1f784078c30f5fc
4
+ data.tar.gz: 01caec07d8f358f80cacb4b59c84bd4b535de061
5
5
  SHA512:
6
- metadata.gz: 86ab7febdff6c5d6d8889b3217fa4ba9173e89e85aff6d816f417b2cd129a28c3fb462b3acce6439b51b3582d42c6b18ef9e60031737ff319010b1e7aeb99352
7
- data.tar.gz: 58448bd350ef02edd73b11f24396fd7a937d647de3a8d310a2c8d78110e944340084f60e8600619d2595072909eb87aafb7fc44c04db28b72d2f371204821cbd
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.4"
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", "~> 4.0.1"
18
+ gem "unicorn"
19
19
  end
20
20
 
21
21
  group :development, :test do
22
- gem 'jquery-rails', '~> 4.0.4'
23
- gem "capybara", ">= 0.4.0"
24
- gem "mynyml-redgreen", "~> 0.7.1", :require => '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
@@ -16,6 +16,7 @@ class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController
16
16
  end
17
17
 
18
18
  def destroy
19
+ return false unless Ckeditor.can_delete
19
20
  @attachment.destroy
20
21
 
21
22
  respond_to do |format|
@@ -16,6 +16,8 @@ class Ckeditor::PicturesController < Ckeditor::ApplicationController
16
16
  end
17
17
 
18
18
  def destroy
19
+ return false unless Ckeditor.can_delete
20
+
19
21
  @picture.destroy
20
22
 
21
23
  respond_to do |format|
@@ -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>
@@ -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") << "ckeditor/init.js"
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
@@ -1,6 +1,6 @@
1
1
  module Ckeditor
2
2
  module Version
3
- GEM = "4.5.10.1".freeze
3
+ GEM = "4.5.10.2".freeze
4
4
  EDITOR = "4.5.10".freeze
5
5
  end
6
6
  end
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.1
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-08 00:00:00.000000000 Z
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/generators/install_generator_test.rb
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/dummy/config.ru
582
- - test/dummy/public/404.html
583
- - test/dummy/public/422.html
584
- - test/dummy/public/500.html
585
- - test/dummy/public/favicon.ico
586
- - test/dummy/script/rails
587
- - test/dummy/test/fixtures/files/rails.png
588
- - test/dummy/test/fixtures/files/rails.tar.gz
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/assets/stylesheets/scaffold.css
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/controllers/application_controller.rb
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/db/migrate/20110623120047_create_posts.rb
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/database.yml
618
- - test/dummy/config/application.rb
618
+ - test/dummy/config/routes.rb
619
619
  - test/dummy/config/environment.rb
620
- - test/dummy/config/environments/development.rb
621
- - test/dummy/config/environments/production.rb
622
- - test/dummy/config/environments/test.rb
623
- - test/models/utils_test.rb
624
- - test/models/picture_test.rb
625
- - test/models/attachment_file_test.rb
626
- - test/models/ckeditor_test.rb
627
- - test/test_helper.rb
628
- - test/integration/navigation_test.rb
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