ckeditor 4.0.7 → 4.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (160) hide show
  1. data/README.md +16 -2
  2. data/app/assets/javascripts/ckeditor/application.js +1 -0
  3. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/application.js.erb +10 -0
  4. data/app/assets/javascripts/ckeditor/filebrowser/javascripts/jquery.endless-scroll.js +300 -0
  5. data/app/assets/javascripts/ckeditor/filebrowser/stylesheets/uploader.css.erb +4 -0
  6. data/app/controllers/ckeditor/attachment_files_controller.rb +3 -1
  7. data/app/controllers/ckeditor/pictures_controller.rb +3 -1
  8. data/app/views/ckeditor/attachment_files/index.html.erb +11 -5
  9. data/app/views/ckeditor/pictures/index.html.erb +12 -6
  10. data/app/views/ckeditor/shared/_asset.html.erb +1 -1
  11. data/app/views/ckeditor/shared/_asset_tmpl.html.erb +1 -1
  12. data/config/locales/cs.ckeditor.yml +1 -0
  13. data/config/locales/de.ckeditor.yml +1 -0
  14. data/config/locales/el-GR.cdkeditor.yml +2 -1
  15. data/config/locales/en.ckeditor.yml +1 -0
  16. data/config/locales/es.ckeditor.yml +1 -0
  17. data/config/locales/fr.ckeditor.yml +1 -0
  18. data/config/locales/hu.ckeditor.yml +1 -0
  19. data/config/locales/it.ckeditor.yml +1 -0
  20. data/config/locales/nl.ckeditor.yml +2 -1
  21. data/config/locales/pl.ckeditor.yml +1 -0
  22. data/config/locales/pt-BR.ckeditor.yml +2 -1
  23. data/config/locales/pt-PT.ckeditor.yml +1 -0
  24. data/config/locales/ru.ckeditor.yml +1 -0
  25. data/config/locales/sv-SE.ckeditor.yml +1 -0
  26. data/config/locales/uk.ckeditor.yml +1 -0
  27. data/config/locales/zh-CN.ckeditor.yml +1 -0
  28. data/lib/ckeditor.rb +11 -0
  29. data/lib/ckeditor/helpers/controllers.rb +1 -1
  30. data/lib/ckeditor/paginatable.rb +56 -0
  31. data/lib/ckeditor/utils.rb +41 -18
  32. data/lib/ckeditor/version.rb +2 -2
  33. data/lib/generators/ckeditor/templates/ckeditor.rb +3 -0
  34. data/test/dummy/public/uploads/tmp/20140108-1222-52217-3986/rails.tar.gz +0 -0
  35. data/test/dummy/public/uploads/tmp/20140108-1222-52217-6261/rails.tar.gz +0 -0
  36. data/test/dummy/public/uploads/tmp/20140108-1222-52217-6421/rails.tar.gz +0 -0
  37. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3058/content_rails.png +0 -0
  38. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3058/rails.png +0 -0
  39. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3058/thumb_rails.png +0 -0
  40. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3990/content_rails.png +0 -0
  41. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3990/rails.png +0 -0
  42. data/test/dummy/public/uploads/tmp/20140108-1223-52217-3990/thumb_rails.png +0 -0
  43. data/test/dummy/public/uploads/tmp/20140108-1223-52217-8126/content_rails.png +0 -0
  44. data/test/dummy/public/uploads/tmp/20140108-1223-52217-8126/rails.png +0 -0
  45. data/test/dummy/public/uploads/tmp/20140108-1223-52217-8126/thumb_rails.png +0 -0
  46. data/test/dummy/public/uploads/tmp/20140108-1228-52513-0400/content_rails.png +0 -0
  47. data/test/dummy/public/uploads/tmp/20140108-1228-52513-0400/rails.png +0 -0
  48. data/test/dummy/public/uploads/tmp/20140108-1228-52513-0400/thumb_rails.png +0 -0
  49. data/test/dummy/public/uploads/tmp/20140108-1228-52513-1537/content_rails.png +0 -0
  50. data/test/dummy/public/uploads/tmp/20140108-1228-52513-1537/rails.png +0 -0
  51. data/test/dummy/public/uploads/tmp/20140108-1228-52513-1537/thumb_rails.png +0 -0
  52. data/test/dummy/public/uploads/tmp/20140108-1228-52513-4718/rails.tar.gz +0 -0
  53. data/test/dummy/public/uploads/tmp/20140108-1228-52513-4820/rails.tar.gz +0 -0
  54. data/test/dummy/public/uploads/tmp/20140108-1228-52513-8057/content_rails.png +0 -0
  55. data/test/dummy/public/uploads/tmp/20140108-1228-52513-8057/rails.png +0 -0
  56. data/test/dummy/public/uploads/tmp/20140108-1228-52513-8057/thumb_rails.png +0 -0
  57. data/test/dummy/public/uploads/tmp/20140108-1228-52513-9147/rails.tar.gz +0 -0
  58. data/test/dummy/public/uploads/tmp/20140108-1228-52590-3606/rails.tar.gz +0 -0
  59. data/test/dummy/public/uploads/tmp/20140108-1228-52590-4369/content_rails.png +0 -0
  60. data/test/dummy/public/uploads/tmp/20140108-1228-52590-4369/rails.png +0 -0
  61. data/test/dummy/public/uploads/tmp/20140108-1228-52590-4369/thumb_rails.png +0 -0
  62. data/test/dummy/public/uploads/tmp/20140108-1228-52590-4698/rails.tar.gz +0 -0
  63. data/test/dummy/public/uploads/tmp/20140108-1228-52590-7541/rails.tar.gz +0 -0
  64. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9146/content_rails.png +0 -0
  65. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9146/rails.png +0 -0
  66. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9146/thumb_rails.png +0 -0
  67. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9782/content_rails.png +0 -0
  68. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9782/rails.png +0 -0
  69. data/test/dummy/public/uploads/tmp/20140108-1228-52590-9782/thumb_rails.png +0 -0
  70. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3256/content_rails.png +0 -0
  71. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3256/rails.png +0 -0
  72. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3256/thumb_rails.png +0 -0
  73. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3565/content_rails.png +0 -0
  74. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3565/rails.png +0 -0
  75. data/test/dummy/public/uploads/tmp/20140108-1230-52768-3565/thumb_rails.png +0 -0
  76. data/test/dummy/public/uploads/tmp/20140108-1230-52768-4292/rails.tar.gz +0 -0
  77. data/test/dummy/public/uploads/tmp/20140108-1230-52768-4514/rails.tar.gz +0 -0
  78. data/test/dummy/public/uploads/tmp/20140108-1230-52768-7430/rails.tar.gz +0 -0
  79. data/test/dummy/public/uploads/tmp/20140108-1230-52768-9145/content_rails.png +0 -0
  80. data/test/dummy/public/uploads/tmp/20140108-1230-52768-9145/rails.png +0 -0
  81. data/test/dummy/public/uploads/tmp/20140108-1230-52768-9145/thumb_rails.png +0 -0
  82. data/vendor/assets/javascripts/ckeditor/CHANGES.md +36 -0
  83. data/vendor/assets/javascripts/ckeditor/ckeditor.js +465 -463
  84. data/vendor/assets/javascripts/ckeditor/config.js +1 -1
  85. data/vendor/assets/javascripts/ckeditor/contents.css +17 -0
  86. data/vendor/assets/javascripts/ckeditor/lang/ca.js +1 -1
  87. data/vendor/assets/javascripts/ckeditor/lang/cs.js +1 -1
  88. data/vendor/assets/javascripts/ckeditor/lang/cy.js +1 -1
  89. data/vendor/assets/javascripts/ckeditor/lang/de.js +1 -1
  90. data/vendor/assets/javascripts/ckeditor/lang/el.js +1 -1
  91. data/vendor/assets/javascripts/ckeditor/lang/en-au.js +1 -1
  92. data/vendor/assets/javascripts/ckeditor/lang/en-ca.js +1 -1
  93. data/vendor/assets/javascripts/ckeditor/lang/en-gb.js +1 -1
  94. data/vendor/assets/javascripts/ckeditor/lang/es.js +1 -1
  95. data/vendor/assets/javascripts/ckeditor/lang/fi.js +1 -1
  96. data/vendor/assets/javascripts/ckeditor/lang/it.js +1 -1
  97. data/vendor/assets/javascripts/ckeditor/lang/ja.js +1 -1
  98. data/vendor/assets/javascripts/ckeditor/lang/km.js +1 -1
  99. data/vendor/assets/javascripts/ckeditor/lang/nb.js +1 -1
  100. data/vendor/assets/javascripts/ckeditor/lang/nl.js +1 -1
  101. data/vendor/assets/javascripts/ckeditor/lang/no.js +1 -1
  102. data/vendor/assets/javascripts/ckeditor/lang/pt-br.js +1 -1
  103. data/vendor/assets/javascripts/ckeditor/lang/ru.js +1 -1
  104. data/vendor/assets/javascripts/ckeditor/lang/sv.js +1 -1
  105. data/vendor/assets/javascripts/ckeditor/lang/tr.js +1 -1
  106. data/vendor/assets/javascripts/ckeditor/lang/zh-cn.js +1 -1
  107. data/vendor/assets/javascripts/ckeditor/lang/zh.js +1 -1
  108. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/cy.js +3 -3
  109. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/fi.js +2 -2
  110. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh-cn.js +1 -1
  111. data/vendor/assets/javascripts/ckeditor/plugins/a11yhelp/dialogs/lang/zh.js +7 -0
  112. data/vendor/assets/javascripts/ckeditor/plugins/scayt/dialogs/options.js +16 -16
  113. data/vendor/assets/javascripts/ckeditor/plugins/specialchar/dialogs/lang/zh.js +12 -0
  114. data/vendor/assets/javascripts/ckeditor/plugins/templates/templates/default.js +1 -1
  115. data/vendor/assets/javascripts/ckeditor/plugins/wsc/dialogs/wsc.js +31 -31
  116. data/vendor/assets/javascripts/ckeditor/samples/ajax.html +82 -0
  117. data/vendor/assets/javascripts/ckeditor/samples/api.html +207 -0
  118. data/vendor/assets/javascripts/ckeditor/samples/appendto.html +57 -0
  119. data/vendor/assets/javascripts/ckeditor/samples/assets/inlineall/logo.png +0 -0
  120. data/vendor/assets/javascripts/ckeditor/samples/assets/outputxhtml/outputxhtml.css +204 -0
  121. data/vendor/assets/javascripts/ckeditor/samples/assets/posteddata.php +59 -0
  122. data/vendor/assets/javascripts/ckeditor/samples/assets/sample.css +3 -0
  123. data/vendor/assets/javascripts/ckeditor/samples/assets/sample.jpg +0 -0
  124. data/vendor/assets/javascripts/ckeditor/samples/assets/uilanguages/languages.js +7 -0
  125. data/vendor/assets/javascripts/ckeditor/samples/datafiltering.html +401 -0
  126. data/vendor/assets/javascripts/ckeditor/samples/divreplace.html +141 -0
  127. data/vendor/assets/javascripts/ckeditor/samples/index.html +128 -0
  128. data/vendor/assets/javascripts/ckeditor/samples/inlineall.html +311 -0
  129. data/vendor/assets/javascripts/ckeditor/samples/inlinebycode.html +121 -0
  130. data/vendor/assets/javascripts/ckeditor/samples/inlinetextarea.html +110 -0
  131. data/vendor/assets/javascripts/ckeditor/samples/jquery.html +97 -0
  132. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/assets/my_dialog.js +48 -0
  133. data/vendor/assets/javascripts/ckeditor/samples/plugins/dialog/dialog.html +187 -0
  134. data/vendor/assets/javascripts/ckeditor/samples/plugins/enterkey/enterkey.html +103 -0
  135. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.fla +0 -0
  136. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/outputforflash.swf +0 -0
  137. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/assets/outputforflash/swfobject.js +18 -0
  138. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputforflash.html +280 -0
  139. data/vendor/assets/javascripts/ckeditor/samples/plugins/htmlwriter/outputhtml.html +221 -0
  140. data/vendor/assets/javascripts/ckeditor/samples/plugins/magicline/magicline.html +206 -0
  141. data/vendor/assets/javascripts/ckeditor/samples/plugins/toolbar/toolbar.html +232 -0
  142. data/vendor/assets/javascripts/ckeditor/samples/plugins/wysiwygarea/fullpage.html +77 -0
  143. data/vendor/assets/javascripts/ckeditor/samples/readonly.html +73 -0
  144. data/vendor/assets/javascripts/ckeditor/samples/replacebyclass.html +57 -0
  145. data/vendor/assets/javascripts/ckeditor/samples/replacebycode.html +56 -0
  146. data/vendor/assets/javascripts/ckeditor/samples/sample.css +356 -0
  147. data/vendor/assets/javascripts/ckeditor/samples/sample.js +50 -0
  148. data/vendor/assets/javascripts/ckeditor/samples/sample_posteddata.php +16 -0
  149. data/vendor/assets/javascripts/ckeditor/samples/tabindex.html +75 -0
  150. data/vendor/assets/javascripts/ckeditor/samples/uicolor.html +69 -0
  151. data/vendor/assets/javascripts/ckeditor/samples/uilanguages.html +119 -0
  152. data/vendor/assets/javascripts/ckeditor/samples/xhtmlstyle.html +231 -0
  153. metadata +139 -16
  154. data/test/dummy/db/test.sqlite3 +0 -0
  155. data/test/dummy/log/test.log +0 -1425
  156. data/test/tmp/app/models/ckeditor/asset.rb +0 -5
  157. data/test/tmp/app/models/ckeditor/attachment_file.rb +0 -12
  158. data/test/tmp/app/models/ckeditor/picture.rb +0 -13
  159. data/test/tmp/config/initializers/ckeditor.rb +0 -19
  160. data/test/tmp/config/routes.rb +0 -6
@@ -4,7 +4,7 @@
4
4
  polymorphic_path(asset, :format => :json),
5
5
  :remote => true,
6
6
  :method => :delete,
7
- :confirm => t('ckeditor.confirm_delete'),
7
+ :data => {:confirm => t('ckeditor.confirm_delete')},
8
8
  :class => "fileupload-cancel gal-del" %>
9
9
 
10
10
  <div class="fileupload-file gal-inner-holder">
@@ -5,7 +5,7 @@
5
5
  "/ckeditor/${controller}/${id}.json",
6
6
  :remote => true,
7
7
  :method => :delete,
8
- :confirm => t('ckeditor.confirm_delete'),
8
+ :data => {:confirm => t('ckeditor.confirm_delete')},
9
9
  :class => "fileupload-cancel gal-del" %>
10
10
 
11
11
  <div class="fileupload-file gal-inner-holder">
@@ -6,3 +6,4 @@ cs:
6
6
  cancel: "Zrušit"
7
7
  upload: "Nahrát"
8
8
  delete: "Smazat"
9
+ next: "Next"
@@ -6,3 +6,4 @@ de:
6
6
  cancel: "Abbrechen"
7
7
  upload: "Hochladen"
8
8
  delete: "Löschen"
9
+ next: "Next"
@@ -5,4 +5,5 @@
5
5
  buttons:
6
6
  cancel: "Ακύρωση"
7
7
  upload: "Μεταφόρτωση"
8
- delete: "Διαγραφή"
8
+ delete: "Διαγραφή"
9
+ next: "Next"
@@ -6,3 +6,4 @@ en:
6
6
  cancel: "Cancel"
7
7
  upload: "Upload"
8
8
  delete: "Delete"
9
+ next: "Next"
@@ -6,3 +6,4 @@ es:
6
6
  cancel: "Cancelar"
7
7
  upload: "Subir"
8
8
  delete: "Borrar"
9
+ next: "Next"
@@ -6,3 +6,4 @@ fr:
6
6
  cancel: "Annuler"
7
7
  upload: "Ajouter"
8
8
  delete: "Supprimer"
9
+ next: "Next"
@@ -6,3 +6,4 @@ hu:
6
6
  cancel: "Mégsem"
7
7
  upload: "Feltöltés"
8
8
  delete: "Törlés"
9
+ next: "Next"
@@ -6,3 +6,4 @@ it:
6
6
  cancel: "Annulla"
7
7
  upload: "Carica"
8
8
  delete: "Elimina"
9
+ next: "Next"
@@ -5,4 +5,5 @@ nl:
5
5
  buttons:
6
6
  cancel: "Cancel"
7
7
  upload: "Upload"
8
- delete: "Delete"
8
+ delete: "Delete"
9
+ next: "Next"
@@ -6,3 +6,4 @@ pl:
6
6
  cancel: "Anuluj"
7
7
  upload: "Wyślij"
8
8
  delete: "Skasuj"
9
+ next: "Next"
@@ -5,4 +5,5 @@
5
5
  buttons:
6
6
  cancel: "Cancelar"
7
7
  upload: "Enviar"
8
- delete: "Apagar"
8
+ delete: "Apagar"
9
+ next: "Next"
@@ -6,3 +6,4 @@
6
6
  cancel: "Cancelar"
7
7
  upload: "Enviar"
8
8
  delete: "Apagar"
9
+ next: "Next"
@@ -6,3 +6,4 @@ ru:
6
6
  cancel: "Отмена"
7
7
  upload: "Загрузить"
8
8
  delete: "Удалить"
9
+ next: "Показать еще"
@@ -6,3 +6,4 @@
6
6
  cancel: "Avbryt"
7
7
  upload: "Ladda upp"
8
8
  delete: "Ta bort"
9
+ next: "Next"
@@ -6,3 +6,4 @@ uk:
6
6
  cancel: "Відміна"
7
7
  upload: "Завантажити"
8
8
  delete: "Видалити"
9
+ next: "Показати більше"
@@ -6,3 +6,4 @@ zh-CN:
6
6
  cancel: "取消"
7
7
  upload: "上传"
8
8
  delete: "删除"
9
+ next: "Next"
data/lib/ckeditor.rb CHANGED
@@ -5,6 +5,7 @@ module Ckeditor
5
5
  autoload :Utils, 'ckeditor/utils'
6
6
  autoload :Http, 'ckeditor/http'
7
7
  autoload :TextArea, 'ckeditor/text_area'
8
+ autoload :Paginatable, 'ckeditor/paginatable'
8
9
 
9
10
  module Helpers
10
11
  autoload :ViewHelper, 'ckeditor/helpers/view_helper'
@@ -56,6 +57,16 @@ module Ckeditor
56
57
  mattr_accessor :parameterize_filenames
57
58
  @@parameterize_filenames = true
58
59
 
60
+ # Paginate assets
61
+ mattr_accessor :default_per_page
62
+ @@default_per_page = 24
63
+
64
+ # Asset restrictions
65
+ mattr_accessor :assets_languages
66
+ mattr_accessor :assets_plugins
67
+ @@assets_languages = nil
68
+ @@assets_plugins = nil
69
+
59
70
  # Model classes
60
71
  @@picture_model = nil
61
72
  @@attachment_file_model = nil
@@ -14,7 +14,7 @@ module Ckeditor
14
14
  end
15
15
 
16
16
  def ckeditor_before_create_asset(asset)
17
- asset.assetable = ckeditor_current_user if respond_to?(:current_user)
17
+ asset.assetable = ckeditor_current_user if ckeditor_current_user
18
18
  return true
19
19
  end
20
20
 
@@ -0,0 +1,56 @@
1
+ module Ckeditor
2
+ # Simple paginate relation
3
+ class Paginatable
4
+ attr_reader :limit_value, :offset_value
5
+
6
+ def initialize(scope, options = {})
7
+ @scope = scope
8
+ @limit_value = (options[:limit] || Ckeditor.default_per_page).to_i
9
+ end
10
+
11
+ def page(num = 1)
12
+ @offset_value = limit_value * ([num.to_i, 1].max - 1)
13
+ self
14
+ end
15
+
16
+ def scoped
17
+ @scope.limit(limit_value).offset(offset_value)
18
+ end
19
+
20
+ # Next page number in the collection
21
+ def next_page
22
+ current_page + 1 unless last_page?
23
+ end
24
+
25
+ # Previous page number in the collection
26
+ def prev_page
27
+ current_page - 1 unless first_page?
28
+ end
29
+
30
+ # First page of the collection?
31
+ def first_page?
32
+ current_page == 1
33
+ end
34
+
35
+ # Last page of the collection?
36
+ def last_page?
37
+ current_page >= total_pages
38
+ end
39
+
40
+ # Total number of pages
41
+ def total_pages
42
+ (total_count.to_f / limit_value).ceil
43
+ end
44
+
45
+ # total item numbers of scope
46
+ def total_count
47
+ @total_count ||= @scope.count
48
+ end
49
+
50
+ # Current page number
51
+ def current_page
52
+ offset = (offset_value < 0 ? 0 : offset_value)
53
+ (offset / limit_value) + 1
54
+ end
55
+ end
56
+ end
@@ -4,13 +4,8 @@ require 'active_support/json/encoding'
4
4
  module Ckeditor
5
5
  module Utils
6
6
  class JavascriptCode < String
7
- def to_json(options = nil)
8
- self
9
- end
10
-
11
- def as_json(options = nil)
12
- ActiveSupport::JSON::Variable.new(to_s).freeze
13
- end
7
+ def as_json(options = nil) self end #:nodoc:
8
+ def encode_json(encoder) self end #:nodoc:
14
9
  end
15
10
 
16
11
  class << self
@@ -55,32 +50,60 @@ module Ckeditor
55
50
  options[:action] = JavascriptCode.new("EDITOR.config.filebrowserUploadUrl")
56
51
  options[:allowedExtensions] = Ckeditor.attachment_file_types
57
52
  end
58
-
53
+
59
54
  js_options = ActiveSupport::JSON.encode(options)
60
-
55
+
61
56
  "(function() { new qq.FileUploaderInput(#{js_options}); }).call(this);".html_safe
62
57
  end
63
-
58
+
64
59
  def filethumb(filename)
65
60
  extname = filename.blank? ? "unknown" : File.extname(filename).gsub(/^\./, '')
66
61
  image = "#{extname}.gif"
67
62
  source = Ckeditor.root_path.join("app/assets/javascripts/ckeditor/filebrowser/images/thumbs")
68
-
63
+
69
64
  unless File.exists?(File.join(source, image))
70
65
  image = "unknown.gif"
71
66
  end
72
-
67
+
73
68
  File.join(Ckeditor.relative_path, "filebrowser/images/thumbs", image)
74
69
  end
75
70
 
76
71
  def select_assets(path, relative_path)
77
- folder = File.join(relative_path, path, '**')
78
- relative_folder = Ckeditor.root_path.join(relative_path)
79
-
80
- Dir[Ckeditor.root_path.join(folder, '*.{js,css,png,gif,jpg}')].inject([]) do |list, file|
81
- list << Pathname.new(file).relative_path_from(relative_folder).to_s
82
- list
72
+ relative_folder = Ckeditor.root_path.join relative_path
73
+ folder = relative_folder.join path
74
+ extensions = '*.{js,css,png,gif,jpg}'
75
+
76
+ # Files at root
77
+ files = Dir[folder.join(extensions)]
78
+
79
+ # Plugins
80
+ if Ckeditor.assets_plugins.nil?
81
+ files += Dir[folder.join('plugins', '**', extensions)]
82
+ else
83
+ Ckeditor.assets_plugins.each do |plugin|
84
+ files += Dir[folder.join('plugins', plugin, '**', extensions)]
85
+ end
86
+ end
87
+
88
+ # Other folders
89
+ Dir[folder.join('*/')].each do |subfolder|
90
+ path = Pathname.new(subfolder)
91
+ unless path.basename.to_s == 'plugins'
92
+ files += Dir[path.join('**', extensions)]
93
+ end
83
94
  end
95
+
96
+ paths = files.map { |file| Pathname.new(file) }
97
+
98
+ # Filter languages
99
+ if Ckeditor.assets_languages.present?
100
+ paths.select! do |path|
101
+ path.dirname.basename.to_s != 'lang' ||
102
+ Ckeditor.assets_languages.include?(path.basename.to_s.split('.')[0])
103
+ end
104
+ end
105
+
106
+ paths.map { |path| path.relative_path_from(relative_folder).to_s }
84
107
  end
85
108
  end
86
109
  end
@@ -1,6 +1,6 @@
1
1
  module Ckeditor
2
2
  module Version
3
- GEM = "4.0.7".freeze
4
- EDITOR = "4.3".freeze
3
+ GEM = "4.0.8".freeze
4
+ EDITOR = "4.3.1".freeze
5
5
  end
6
6
  end
@@ -20,4 +20,7 @@ Ckeditor.setup do |config|
20
20
  # Asset model classes
21
21
  # config.picture_model { Ckeditor::Picture }
22
22
  # config.attachment_file_model { Ckeditor::AttachmentFile }
23
+
24
+ # Paginate assets
25
+ # config.default_per_page = 24
23
26
  end
@@ -1,6 +1,42 @@
1
1
  CKEditor 4 Changelog
2
2
  ====================
3
3
 
4
+ ## CKEditor 4.3.1
5
+
6
+ **Important Notes:**
7
+
8
+ * To match the naming convention, the `language` button is now `Language` ([#11201](http://dev.ckeditor.com/ticket/11201)).
9
+ * [Enhanced Image](http://ckeditor.com/addon/image2) button, context menu, command, and icon names match those of the [Image](http://ckeditor.com/addon/image) plugin ([#11222](http://dev.ckeditor.com/ticket/11222)).
10
+
11
+ Fixed Issues:
12
+
13
+ * [#11244](http://dev.ckeditor.com/ticket/11244): Changed: The [`widget.repository.checkWidgets()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method now fires the [`widget.repository.checkWidgets`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-event-checkWidgets) event, so from CKEditor 4.3.1 it is preferred to use the method rather than fire the event.
14
+ * [#11171](http://dev.ckeditor.com/ticket/11171): Fixed: [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) and [`editor.insertText()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertText) methods do not call the [`widget.repository.checkWidgets()`](http://docs.ckeditor.com/#!/api/CKEDITOR.plugins.widget.repository-method-checkWidgets) method.
15
+ * [#11085](http://dev.ckeditor.com/ticket/11085): [IE8] Replaced preview generated by the [Mathematical Formulas](http://ckeditor.com/addon/mathjax) widget with a placeholder.
16
+ * [#11044](http://dev.ckeditor.com/ticket/11044): Enhanced WAI-ARIA support for the [Language](http://ckeditor.com/addon/language) plugin drop-down menu.
17
+ * [#11075](http://dev.ckeditor.com/ticket/11075): With drop-down menu button focused, pressing the *Down Arrow* key will now open the menu and focus its first option.
18
+ * [#11165](http://dev.ckeditor.com/ticket/11165): Fixed: The [File Browser](http://ckeditor.com/addon/filebrowser) plugin cannot be removed from the editor.
19
+ * [#11159](http://dev.ckeditor.com/ticket/11159): [IE9-10] [Enhanced Image](http://ckeditor.com/addon/image2): Fixed buggy discovery of image dimensions.
20
+ * [#11101](http://dev.ckeditor.com/ticket/11101): Drop-down lists no longer break when given double quotes.
21
+ * [#11077](http://dev.ckeditor.com/ticket/11077): [Enhanced Image](http://ckeditor.com/addon/image2): Empty undo step recorded when resizing the image.
22
+ * [#10853](http://dev.ckeditor.com/ticket/10853): [Enhanced Image](http://ckeditor.com/addon/image2): Widget has paragraph wrapper when de-captioning unaligned image.
23
+ * [#11198](http://dev.ckeditor.com/ticket/11198): Widgets: Drag handler is not fully visible when an inline widget is in a heading.
24
+ * [#11132](http://dev.ckeditor.com/ticket/11132): [Firefox] Fixed: Caret is lost after drag and drop of an inline widget.
25
+ * [#11182](http://dev.ckeditor.com/ticket/11182): [IE10-11] Fixed: Editor crashes (IE11) or works with minor issues (IE10) if a page is loaded in Quirks Mode. See [`env.quirks`](http://docs.ckeditor.com/#!/api/CKEDITOR.env-property-quirks) for more details.
26
+ * [#11204](http://dev.ckeditor.com/ticket/11204): Added `figure` and `figcaption` styles to the `contents.css` file so [Enhanced Image](http://ckeditor.com/addon/image2) looks nicer.
27
+ * [#11202](http://dev.ckeditor.com/ticket/11202): Fixed: No newline in [BBCode](http://ckeditor.com/addon/bbcode) mode.
28
+ * [#10890](http://dev.ckeditor.com/ticket/10890): Fixed: Error thrown when pressing the *Delete* key in a list item.
29
+ * [#10055](http://dev.ckeditor.com/ticket/10055): [IE8-10] Fixed: *Delete* pressed on a selected image causes the browser to go back.
30
+ * [#11183](http://dev.ckeditor.com/ticket/11183): Fixed: Inserting a horizontal rule or a table in multiple row selection causes a browser crash. Additionally, the [`editor.insertElement()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-insertElement) method does not insert the element into every range of a selection any more.
31
+ * [#11042](http://dev.ckeditor.com/ticket/11042): Fixed: Selection made on an element containing a non-editable element was not auto faked.
32
+ * [#11125](http://dev.ckeditor.com/ticket/11125): Fixed: Keyboard navigation through menu and drop-down items will now cycle.
33
+ * [#11011](http://dev.ckeditor.com/ticket/11011): Fixed: The [`editor.applyStyle()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-applyStyle) method removes attributes from nested elements.
34
+ * [#11179](http://dev.ckeditor.com/ticket/11179): Fixed: [`editor.destroy()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-destroy) does not cleanup content generated by the [Table Resize](http://ckeditor.com/addon/tableresize) plugin for inline editors.
35
+ * [#11237](http://dev.ckeditor.com/ticket/11237): Fixed: Table border attribute value is deleted when pasting content from Microsoft Word.
36
+ * [#11250](http://dev.ckeditor.com/ticket/11250): Fixed: HTML entities inside the `<textarea>` element are not encoded.
37
+ * [#11260](http://dev.ckeditor.com/ticket/11260): Fixed: Initially disabled buttons are not read by JAWS as disabled.
38
+ * [#11200](http://dev.ckeditor.com/ticket/11200): Added [Clipboard](http://ckeditor.com/addon/clipboard) plugin as a dependency for [Widget](http://ckeditor.com/addon/widget) to fix drag and drop.
39
+
4
40
  ## CKEditor 4.3
5
41
 
6
42
  New Features: