redactor-rails 0.4 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -2
- data/app/controller/redactor_rails/documents_controller.rb +9 -1
- data/app/controller/redactor_rails/pictures_controller.rb +9 -1
- data/lib/redactor-rails/helper.rb +1 -4
- data/lib/redactor-rails/orm/active_record.rb +1 -1
- data/lib/redactor-rails/version.rb +1 -1
- data/vendor/assets/javascripts/redactor-rails/index.js +1 -1
- data/vendor/assets/javascripts/redactor-rails/langs/ar.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/ba.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/bg.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/by.js +4 -3
- data/vendor/assets/javascripts/redactor-rails/langs/cs.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/da.js +4 -3
- data/vendor/assets/javascripts/redactor-rails/langs/de.js +4 -3
- data/vendor/assets/javascripts/redactor-rails/langs/en.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/eo.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/es.js +4 -3
- data/vendor/assets/javascripts/redactor-rails/langs/fa.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/fi.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/fr.js +4 -3
- data/vendor/assets/javascripts/redactor-rails/langs/hr.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/hu.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/id.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/it.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/ja.js +4 -3
- data/vendor/assets/javascripts/redactor-rails/langs/ko.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/lv.js +4 -3
- data/vendor/assets/javascripts/redactor-rails/langs/nl.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/pl.js +4 -3
- data/vendor/assets/javascripts/redactor-rails/langs/pt_br.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/ro.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/ru.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/sk.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/sq.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/sr-cir.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/sr-lat.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/sv.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/tr.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/ua.js +4 -3
- data/vendor/assets/javascripts/redactor-rails/langs/vi.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/zh_cn.js +3 -2
- data/vendor/assets/javascripts/redactor-rails/langs/zh_tw.js +74 -66
- data/vendor/assets/javascripts/redactor-rails/redactor.js +1114 -539
- data/vendor/assets/javascripts/redactor-rails/redactor.min.js +3 -3
- data/vendor/assets/stylesheets/redactor-rails/css/redactor-iframe.css +3 -2
- data/vendor/assets/stylesheets/redactor-rails/css/redactor.css +56 -43
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b682b1c7c9c12bcda1b2619337c55114ffa79fb1
|
4
|
+
data.tar.gz: b3be1e362676e20f93d105d807113351012d8d8c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae43769622c4035642e52b27182951de8bf7b428db280e1e6d10817014d2ec420e21986af9a09a8a9cc9a6afea5b6ed64ee4b27f98378ac9211cab61b85ec4d6
|
7
|
+
data.tar.gz: 34968fc5bfce52c121d8611cdd919f76ce56a4cd199f068b52d4f621c35b3a290819b62ee778407dc61fbce9c15abb88349dbcd1fe497f699c9100bcabcec8ff
|
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/redactor-rails.png)](http://badge.fury.io/rb/redactor-rails)
|
1
2
|
# Rails 3.2 Integration for Redactor (Devise Edition)
|
2
3
|
|
3
4
|
The redactor-rails gem integrates the [Redactor](http://redactorjs.com/) editor with the Rails 3.2 asset pipeline.
|
4
5
|
|
5
|
-
This gem bundles Redactor version 9.
|
6
|
+
This gem bundles Redactor version 9.1.4 which is the most recent version as of September 10, 2013. Check [Redactor's changelog](http://imperavi.com/redactor/log/) for further updates.
|
6
7
|
|
7
8
|
## Installation
|
8
9
|
|
@@ -80,10 +81,19 @@ In you file `app\assets\redactor-rails\config.js` set option
|
|
80
81
|
|
81
82
|
and
|
82
83
|
|
84
|
+
if redactor-rails gem version <= 0.3.7
|
85
|
+
|
83
86
|
Add to your layout
|
84
87
|
|
88
|
+
|
85
89
|
<%= redactor_lang('zh_tw') %>
|
86
|
-
|
90
|
+
|
91
|
+
elsif redactor-rails gem version >= 0.4
|
92
|
+
|
93
|
+
Add to your `application.js`:
|
94
|
+
|
95
|
+
//= require redactor-rails/langs/zh_tw
|
96
|
+
|
87
97
|
### Defining a Devise User Model
|
88
98
|
|
89
99
|
By default redactor-rails uses the `User` model.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class RedactorRails::DocumentsController < ApplicationController
|
2
|
-
before_filter :redactor_authenticate_user!
|
2
|
+
before_filter :redactor_authenticate_user!
|
3
3
|
|
4
4
|
def index
|
5
5
|
@documents = RedactorRails.document_model.where(
|
@@ -23,4 +23,12 @@ class RedactorRails::DocumentsController < ApplicationController
|
|
23
23
|
render :nothing => true
|
24
24
|
end
|
25
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def redactor_authenticate_user!
|
30
|
+
if RedactorRails.document_model.new.respond_to?(RedactorRails.devise_user)
|
31
|
+
super
|
32
|
+
end
|
33
|
+
end
|
26
34
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
class RedactorRails::PicturesController < ApplicationController
|
2
|
-
before_filter :redactor_authenticate_user!
|
2
|
+
before_filter :redactor_authenticate_user!
|
3
3
|
|
4
4
|
def index
|
5
5
|
@pictures = RedactorRails.picture_model.where(
|
@@ -23,4 +23,12 @@ class RedactorRails::PicturesController < ApplicationController
|
|
23
23
|
render :nothing => true
|
24
24
|
end
|
25
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def redactor_authenticate_user!
|
30
|
+
if RedactorRails.picture_model.new.respond_to?(RedactorRails.devise_user)
|
31
|
+
super
|
32
|
+
end
|
33
|
+
end
|
26
34
|
end
|
@@ -15,7 +15,7 @@ module RedactorRails
|
|
15
15
|
self.table_name = "redactor_assets"
|
16
16
|
|
17
17
|
belongs_to :assetable, :polymorphic => true
|
18
|
-
belongs_to RedactorRails.devise_user, :
|
18
|
+
belongs_to RedactorRails.devise_user, :foreign_key => RedactorRails.devise_user_key
|
19
19
|
|
20
20
|
if defined?(ActiveModel::ForbiddenAttributesProtection) && base.ancestors.include?(ActiveModel::ForbiddenAttributesProtection)
|
21
21
|
# Ok
|
@@ -1,2 +1,2 @@
|
|
1
|
-
//= require ./redactor
|
1
|
+
//= require ./redactor
|
2
2
|
//= require ./config
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['ba'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'Ubaci video',
|
5
5
|
image: 'Ubaci fotografiju',
|
@@ -67,3 +67,4 @@ RELANG['ba'] = {
|
|
67
67
|
deleted: 'Izbrisano',
|
68
68
|
anchor: 'Sidro'
|
69
69
|
};
|
70
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['by'] = {
|
3
3
|
html: 'Код',
|
4
4
|
video: 'Відэа',
|
5
5
|
image: 'Малюнак',
|
@@ -62,4 +62,5 @@ RELANG['by'] = {
|
|
62
62
|
fullscreen: 'Ва ўвесь экран',
|
63
63
|
deleted: 'Закрэслены',
|
64
64
|
anchor: 'Anchor'
|
65
|
-
};
|
65
|
+
};
|
66
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['da'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'Indsæt Video...',
|
5
5
|
image: 'Indsæt Billede...',
|
@@ -63,4 +63,5 @@ RELANG['da'] = {
|
|
63
63
|
fullscreen: 'Fuldskærm',
|
64
64
|
deleted: 'Slettet',
|
65
65
|
anchor: 'Anchor'
|
66
|
-
};
|
66
|
+
};
|
67
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['de'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'Video',
|
5
5
|
image: 'Bilder',
|
@@ -67,4 +67,5 @@ RELANG['de'] = {
|
|
67
67
|
fullscreen: 'Vollbild',
|
68
68
|
deleted: 'Durchgestrichen',
|
69
69
|
anchor: 'Anker'
|
70
|
-
};
|
70
|
+
};
|
71
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['en'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'Insert Video...',
|
5
5
|
image: 'Insert Image...',
|
@@ -64,3 +64,4 @@ RELANG['en'] = {
|
|
64
64
|
deleted: 'Deleted',
|
65
65
|
anchor: 'Anchor'
|
66
66
|
};
|
67
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['eo'] = {
|
3
3
|
html: 'HTML', // substantive
|
4
4
|
video: 'Enŝovu Videon...', // imperative
|
5
5
|
image: 'Enŝovu Bildon...', // imperative
|
@@ -64,3 +64,4 @@ RELANG['eo'] = {
|
|
64
64
|
deleted: 'Foriga', // adjective
|
65
65
|
anchor: 'Ankro' // substantive
|
66
66
|
};
|
67
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['es'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'Video',
|
5
5
|
image: 'Imagen',
|
@@ -63,4 +63,5 @@ RELANG['es'] = {
|
|
63
63
|
fullscreen: 'Pantalla completa',
|
64
64
|
deleted: 'Borrado',
|
65
65
|
anchor: 'Anclaje o anchor'
|
66
|
-
};
|
66
|
+
};
|
67
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['fr'] = {
|
3
3
|
html: 'Code HTML',
|
4
4
|
video: 'Vidéo',
|
5
5
|
image: 'Image',
|
@@ -73,4 +73,5 @@ RELANG['fr'] = {
|
|
73
73
|
deleted: 'Supprimer',
|
74
74
|
none: 'aucun',
|
75
75
|
anchor: 'Ancre'
|
76
|
-
};
|
76
|
+
};
|
77
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['id'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'Sisipkan Video...',
|
5
5
|
image: 'Sisipkan Gambar...',
|
@@ -64,3 +64,4 @@ RELANG['id'] = {
|
|
64
64
|
deleted: 'Coret',
|
65
65
|
anchor: 'Jangkar'
|
66
66
|
};
|
67
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['ja'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'ビデオ',
|
5
5
|
image: 'イメージ',
|
@@ -63,4 +63,5 @@ RELANG['ja'] = {
|
|
63
63
|
fullscreen: '全画面',
|
64
64
|
deleted: '打消し',
|
65
65
|
anchor: 'アンカー'
|
66
|
-
};
|
66
|
+
};
|
67
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['lv'] = {
|
3
3
|
html: 'HTML кods',
|
4
4
|
video: 'Video',
|
5
5
|
image: 'Attēls',
|
@@ -62,4 +62,5 @@ RELANG['lv'] = {
|
|
62
62
|
horizontalrule: 'Horizontāla līnija',
|
63
63
|
fullscreen: 'Pa visu ekrānu',
|
64
64
|
anchor: 'Anchor'
|
65
|
-
};
|
65
|
+
};
|
66
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['pl'] = {
|
3
3
|
html: 'Źródło',
|
4
4
|
video: 'Wideo',
|
5
5
|
image: 'Obrazek',
|
@@ -63,4 +63,5 @@ RELANG['pl'] = {
|
|
63
63
|
fullscreen: 'Fullscreen',
|
64
64
|
deleted: 'Deleted',
|
65
65
|
anchor: 'Anchor'
|
66
|
-
};
|
66
|
+
};
|
67
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['pt_br'] = {
|
3
3
|
html: 'Ver HTML',
|
4
4
|
video: 'Vídeo',
|
5
5
|
image: 'Imagem',
|
@@ -70,3 +70,4 @@ RELANG['pt_br'] = {
|
|
70
70
|
deleted: 'Removido',
|
71
71
|
anchor: 'Âncora'
|
72
72
|
};
|
73
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['ro'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'Adauga video...',
|
5
5
|
image: 'Adauga imagine...',
|
@@ -64,3 +64,4 @@ RELANG['ro'] = {
|
|
64
64
|
deleted: 'Taiat (Sters)',
|
65
65
|
anchor: 'Ancora'
|
66
66
|
};
|
67
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['sr-cir'] = {
|
3
3
|
html: 'ХТМЛ',
|
4
4
|
video: 'Убаци видео',
|
5
5
|
image: 'Убаци фотографију',
|
@@ -67,3 +67,4 @@ RELANG['sr-cir'] = {
|
|
67
67
|
deleted: 'Избрисано',
|
68
68
|
anchor: 'Сидро'
|
69
69
|
};
|
70
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['sr-lat'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'Ubaci video',
|
5
5
|
image: 'Ubaci fotografiju',
|
@@ -67,3 +67,4 @@ RELANG['sr-lat'] = {
|
|
67
67
|
deleted: 'Izbrisano',
|
68
68
|
anchor: 'Sidro'
|
69
69
|
};
|
70
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['sv'] = {
|
3
3
|
html: 'HTML',
|
4
4
|
video: 'Sätt In Video...',
|
5
5
|
image: 'Sätt In Bild...',
|
@@ -64,3 +64,4 @@ RELANG['sv'] = {
|
|
64
64
|
deleted: 'Överstrucken',
|
65
65
|
anchor: 'Ankare'
|
66
66
|
};
|
67
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['ua'] = {
|
3
3
|
html: 'Код',
|
4
4
|
video: 'Відео',
|
5
5
|
image: 'Зображення',
|
@@ -64,4 +64,5 @@ RELANG['ua'] = {
|
|
64
64
|
fullscreen: 'На весь екран',
|
65
65
|
deleted: 'Закреслений',
|
66
66
|
anchor: 'Anchor'
|
67
|
-
};
|
67
|
+
};
|
68
|
+
})( jQuery );
|
@@ -1,5 +1,5 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
(function ($) {
|
2
|
+
$.Redactor.opts.langs['vi'] = {
|
3
3
|
html: 'Xem HTML',
|
4
4
|
video: 'Chèn Video...',
|
5
5
|
image: 'Chèn hình ảnh...',
|
@@ -63,3 +63,4 @@ RELANG['vi'] = {
|
|
63
63
|
deleted: 'Xóa',
|
64
64
|
anchor: 'Liên kết'
|
65
65
|
};
|
66
|
+
})( jQuery );
|
@@ -1,6 +1,6 @@
|
|
1
1
|
//@chen1706@gmail.com
|
2
|
-
|
3
|
-
|
2
|
+
(function ($) {
|
3
|
+
$.Redactor.opts.langs['zh_cn'] = {
|
4
4
|
html: 'HTML代码',
|
5
5
|
video: '视频',
|
6
6
|
image: '图片',
|
@@ -68,3 +68,4 @@ RELANG['zh_cn'] = {
|
|
68
68
|
underline: '下划线',
|
69
69
|
alignment: '对齐方式'
|
70
70
|
};
|
71
|
+
})( jQuery );
|