glebtv-ckeditor 4.7.3 → 4.7.3.1

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: fd5fc7c3e382765593ac119363137925683ead9e
4
- data.tar.gz: 7dfbb5ef069835cbce6c6dc1c7d499c2b118cd5c
3
+ metadata.gz: 6690f7032cb8255fe295eff357c58e86dd8aacad
4
+ data.tar.gz: 04faca4d589feec640d6bd4e1c4bb982bc5e054c
5
5
  SHA512:
6
- metadata.gz: e8359fb3faa349be8544cd5c46a50caf956c73195f73b12c01774a3fa945292193086925de5ee4d96afe439fd6c950396a5f46316c570baf87d7724bcddf83eb
7
- data.tar.gz: 97ef2bd911894eeebf88b36d363e5808edffcab219fa55ae056216a75142b3c678a25b35613c419dffc6b5e3c24c03d3d4f3ced07c589bf48145d725b1a961ee
6
+ metadata.gz: 73aa6c097949b6a5b82c539e993bb6521e28389c6f0fce1de7618c0d9d20ce28a22ee6019328478eb32a52ad02030de516bd785c3c23b1f2aed2585fb0ef0ec9
7
+ data.tar.gz: 39ad25188be993dc58815a505e165e7812cbc33bf1a592de49cb0879db9f0f5fb60498380ed9dc91e92a9d33dc154a2ef5586f7e9c9f85b67566a656d83d13e5
@@ -16,6 +16,8 @@ class Ckeditor::AttachmentFilesController < Ckeditor::ApplicationController
16
16
  end
17
17
 
18
18
  def destroy
19
+ return false unless Ckeditor.can_delete
20
+
19
21
  @attachment.destroy
20
22
 
21
23
  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,11 +1,13 @@
1
1
  <%= content_tag(:div, id: dom_id(asset), class: "gal-item", data: { url: image_path(asset.url_content) }) do %>
2
+
3
+ <% if Ckeditor.can_delete then %>
2
4
  <%= link_to '', polymorphic_path(asset, format: :json),
3
5
  remote: true,
4
6
  method: :delete,
5
7
  title: I18n.t('ckeditor.buttons.delete'),
6
8
  data: { confirm: t('ckeditor.confirm_delete') },
7
9
  class: "fileupload-cancel gal-del" %>
8
-
10
+ <% end %>
9
11
  <div class="fileupload-file gal-inner-holder">
10
12
  <div class="img"><%= image_tag(asset.url_thumb, title: asset.filename) %></div>
11
13
  <div class="img-data">
@@ -1,11 +1,13 @@
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 '', "/ckeditor/${controller}/${id}.json",
4
5
  remote: true,
5
6
  method: :delete,
6
7
  title: I18n.t('ckeditor.buttons.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"><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
@@ -1,6 +1,6 @@
1
1
  module Ckeditor
2
2
  module Version
3
- GEM = '4.7.3'.freeze
3
+ GEM = '4.7.3.1'.freeze
4
4
  EDITOR = '4.7.3'.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.7.3
4
+ version: 4.7.3.1
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: 2017-12-11 00:00:00.000000000 Z
12
+ date: 2017-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cocaine
@@ -628,62 +628,62 @@ specification_version: 4
628
628
  summary: Rails gem for easy integration ckeditor in your application
629
629
  test_files:
630
630
  - test/test_helper.rb
631
- - test/integration/navigation_test.rb
632
- - test/models/attachment_file_test.rb
633
- - test/models/utils_test.rb
634
- - test/models/picture_test.rb
635
- - test/models/ckeditor_test.rb
636
631
  - test/orm/mongoid.rb
637
632
  - test/orm/active_record.rb
633
+ - test/controllers/attachment_files_controller_test.rb
634
+ - test/controllers/pictures_controller_test.rb
635
+ - test/support/routes.txt
636
+ - test/support/helpers.rb
637
+ - test/support/raw_post.rb
638
+ - test/support/integration_case.rb
639
+ - test/generators/install_generator_test.rb
640
+ - test/models/ckeditor_test.rb
641
+ - test/models/attachment_file_test.rb
642
+ - test/models/picture_test.rb
643
+ - test/models/utils_test.rb
644
+ - test/integration/navigation_test.rb
645
+ - test/functional/posts_controller_test.rb
646
+ - test/dummy/Rakefile
647
+ - test/dummy/config.ru
648
+ - test/dummy/public/favicon.ico
649
+ - test/dummy/public/422.html
650
+ - test/dummy/public/500.html
651
+ - test/dummy/public/404.html
652
+ - test/dummy/app/controllers/posts_controller.rb
653
+ - test/dummy/app/controllers/application_controller.rb
654
+ - test/dummy/app/models/post.rb
655
+ - test/dummy/app/helpers/posts_helper.rb
656
+ - test/dummy/app/helpers/application_helper.rb
657
+ - test/dummy/app/assets/javascripts/application.js
658
+ - test/dummy/app/assets/stylesheets/application.css
659
+ - test/dummy/app/assets/stylesheets/scaffold.css
660
+ - test/dummy/app/views/posts/index.html.erb
661
+ - test/dummy/app/views/posts/edit.html.erb
662
+ - test/dummy/app/views/posts/show.html.erb
663
+ - test/dummy/app/views/posts/_form.html.erb
664
+ - test/dummy/app/views/posts/new.html.erb
665
+ - test/dummy/app/views/layouts/application.html.erb
638
666
  - test/dummy/db/migrate/20110623120047_create_posts.rb
639
- - test/dummy/config/routes.rb
640
- - test/dummy/config/environment.rb
667
+ - test/dummy/test/fixtures/files/rails.tar.gz
668
+ - test/dummy/test/fixtures/files/rails.png
669
+ - test/dummy/script/rails
641
670
  - test/dummy/config/database.yml
642
- - test/dummy/config/initializers/wrap_parameters.rb
671
+ - test/dummy/config/boot.rb
672
+ - test/dummy/config/mongoid.yml
673
+ - test/dummy/config/locales/en.yml
643
674
  - test/dummy/config/initializers/assets.rb
644
- - test/dummy/config/initializers/inflections.rb
675
+ - test/dummy/config/initializers/cookies_serializer.rb
676
+ - test/dummy/config/initializers/wrap_parameters.rb
645
677
  - test/dummy/config/initializers/mime_types.rb
646
678
  - test/dummy/config/initializers/paperclip.rb
647
679
  - test/dummy/config/initializers/session_store.rb
648
- - test/dummy/config/initializers/backtrace_silencers.rb
649
680
  - test/dummy/config/initializers/ckeditor.rb
650
- - test/dummy/config/initializers/cookies_serializer.rb
681
+ - test/dummy/config/initializers/backtrace_silencers.rb
682
+ - test/dummy/config/initializers/inflections.rb
651
683
  - test/dummy/config/secrets.yml
652
- - test/dummy/config/mongoid.yml
684
+ - test/dummy/config/application.rb
685
+ - test/dummy/config/routes.rb
686
+ - test/dummy/config/environments/development.rb
653
687
  - test/dummy/config/environments/test.rb
654
688
  - test/dummy/config/environments/production.rb
655
- - test/dummy/config/environments/development.rb
656
- - test/dummy/config/locales/en.yml
657
- - test/dummy/config/boot.rb
658
- - test/dummy/config/application.rb
659
- - test/dummy/Rakefile
660
- - test/dummy/config.ru
661
- - test/dummy/test/fixtures/files/rails.tar.gz
662
- - test/dummy/test/fixtures/files/rails.png
663
- - test/dummy/app/models/post.rb
664
- - test/dummy/app/assets/stylesheets/application.css
665
- - test/dummy/app/assets/stylesheets/scaffold.css
666
- - test/dummy/app/assets/javascripts/application.js
667
- - test/dummy/app/controllers/posts_controller.rb
668
- - test/dummy/app/controllers/application_controller.rb
669
- - test/dummy/app/views/posts/index.html.erb
670
- - test/dummy/app/views/posts/new.html.erb
671
- - test/dummy/app/views/posts/_form.html.erb
672
- - test/dummy/app/views/posts/show.html.erb
673
- - test/dummy/app/views/posts/edit.html.erb
674
- - test/dummy/app/views/layouts/application.html.erb
675
- - test/dummy/app/helpers/application_helper.rb
676
- - test/dummy/app/helpers/posts_helper.rb
677
- - test/dummy/public/422.html
678
- - test/dummy/public/favicon.ico
679
- - test/dummy/public/404.html
680
- - test/dummy/public/500.html
681
- - test/dummy/script/rails
682
- - test/functional/posts_controller_test.rb
683
- - test/support/routes.txt
684
- - test/support/helpers.rb
685
- - test/support/raw_post.rb
686
- - test/support/integration_case.rb
687
- - test/controllers/pictures_controller_test.rb
688
- - test/controllers/attachment_files_controller_test.rb
689
- - test/generators/install_generator_test.rb
689
+ - test/dummy/config/environment.rb